SlideShare a Scribd company logo
1 of 28
Download to read offline
R.I.Pienaar
26 April 2017
How Choria Improves the
Operability of MCollective using
NATS
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Who am I?
• Consultant for 20+ years
• Government, Finance, Health, Social Media,
Fortune 50, Startups
• DevOps, Automation, Architect,
Development
• Open Source @ github.com/ripienaar
• Architect and Author of many Puppet
related tools
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Overview
• Large scale Operations orientated RPC framework
• Provides ad-hoc orchestration within the Puppet eco
system
• Flexible discovery that integrates into many data sources
• Strong Authentication, Authorisation, Auditing
• Extendible using Ruby
• Communications over Middleware
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
$ mco rpc service restart service=httpd -W country=uk -W customer=acme
* [ ============================================================> ] 15 / 15
windev1.example.net Unknown Request Status
Cannot stop https, error was: Execution of 'C:/WINDOWS/system32/net.exe stop httpd'
returned 2: The service name is invalid.
Summary of Service Status:
running = 14
unknown = 1
Finished processing 15 / 15 hosts in 8352.48 ms
MCollective - CLI
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
$ mco rpc service restart service=httpd -W country=uk -W customer=acme
* [ ============================================================> ] 15 / 15
windev1.example.net Unknown Request Status
Cannot stop https, error was: Execution of 'C:/WINDOWS/system32/net.exe stop httpd'
returned 2: The service name is invalid.
Summary of Service Status:
running = 14
unknown = 1
Finished processing 15 / 15 hosts in 8352.48 ms
MCollective - CLI
Context aware summaries
“service” api
“restart” action discovery
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
$ irb -r mcollective
irb(main):001:0> include MCollective::RPC
=> Object
irb(main):002:0> client = rpcclient("service")
=> …
irb(main):003:0> client.fact_filter("cluster", "a")
=> nil
irb(main):004:0> client.discover
=> ["dev1-1.choria"]
irb(main):005:0> client.progress = false
=> false
irb(main):006:0> puts client.status(:service => "sshd").first.to_json
{"agent":"service","action":"status","sender":"dev1-1.choria","statuscode":
0,"statusmsg":"OK","data":{"status":"running"}}
MCollective - API
“service” api
discovery
“status” action
result from 1 node
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Web
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
MCollective - Installation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Modernising MCollective
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Playbooks
Ease of Installation
Modern PKISRV Records
AuditingPuppetDB Integration
Improved
Connectivity
Batteries Included
JSON
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Choria - Middleware Needs
• Easy to deploy
• Easy to secure using standard TLS
• Easy to operate and monitor
• Must be scalable and highly available
• Good documentation
• Responsive community
• Good Ruby support - but others needed too
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
HTTP Monitoring
Single binary install
TLS
Good docs
and comm
Good trace logging
Full Mesh
Clustering
Many languages
supported
Scalable to
thousands
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
NATS - Configuration
$ gnatsd 
--tls
--tlscert ssl/nats1.example.net.pem 
--tlskey ssl/nats1.example.net.key 
--tlscacert ssl/ca.pem
--tlsverify 
-l logs/nats-0.log 
-p 4222 
-m 8222 
--cluster nats://nats2.example.net:4223 
--routes nats://nats2.example.net:4223 
-DV
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
NATS - Configuration
port: 4222
monitor_port: 8222
tls {
cert_file: “ssl/nats1.example.net.pem"
key_file: “ssl/nats1.example.net.key"
ca_file: "ssl/ca.pem"
verify: true
}
cluster {
port: 4223
tls {
cert_file: “ssl/nats1.example.net.pem”
key_file: “ssl/nats1.example.net.key”
ca_file: "ssl/ca.pem"
verify: true
timeout: 2
}
routes = [
nats-route://nats2.example.net:4223
]
}
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
NATS - Monitoring
% curl -s localhost:8222/varz| 
./jq '"port: (.port) uptime: (.uptime) connections: (.connections)”’
"port: 4222 uptime: 33d12h9m33s connections: 16"
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Federating NATS Clusters
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Choria - Federation
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Links
https://choria.io/
https://nats.io/
https://docs.puppet.com/mcollective
https://www.devco.net/
R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
Questions?
twitter: @ripienaar
email: rip@devco.net
blog: www.devco.net
github: ripienaar
freenode: Volcane
slack.puppet.com: ripienaar
https://www.devco.net/

More Related Content

More from Apcera

Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATSApcera
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesApcera
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupApcera
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupApcera
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupApcera
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSApcera
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTPApcera
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingApcera
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyApcera
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native StackApcera
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Apcera
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustApcera
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016Apcera
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesApcera
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsApcera
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day AfterApcera
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldApcera
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesApcera
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826Apcera
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The FieldApcera
 

More from Apcera (20)

Implementing Microservices with NATS
Implementing Microservices with NATSImplementing Microservices with NATS
Implementing Microservices with NATS
 
NATS for Modern Messaging and Microservices
NATS for Modern Messaging and MicroservicesNATS for Modern Messaging and Microservices
NATS for Modern Messaging and Microservices
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
NATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder MeetupNATS Connector Framework - Boulder Meetup
NATS Connector Framework - Boulder Meetup
 
Simple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder MeetupSimple Solutions for Complex Problems - Boulder Meetup
Simple Solutions for Complex Problems - Boulder Meetup
 
Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATS
 
NATS vs HTTP
NATS vs HTTPNATS vs HTTP
NATS vs HTTP
 
Micro on NATS - Microservices with Messaging
Micro on NATS - Microservices with MessagingMicro on NATS - Microservices with Messaging
Micro on NATS - Microservices with Messaging
 
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQuearyNATS: A Central Nervous System for IoT Messaging - Larry McQueary
NATS: A Central Nervous System for IoT Messaging - Larry McQueary
 
Securing the Cloud Native Stack
Securing the Cloud Native StackSecuring the Cloud Native Stack
Securing the Cloud Native Stack
 
Simple Solutions for Complex Problems
Simple Solutions for Complex Problems Simple Solutions for Complex Problems
Simple Solutions for Complex Problems
 
How to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and TrustHow to Migrate to Cloud with Complete Confidence and Trust
How to Migrate to Cloud with Complete Confidence and Trust
 
KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016KURMA - A Containerized Container Platform - KubeCon 2016
KURMA - A Containerized Container Platform - KubeCon 2016
 
Integration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices ArchitecturesIntegration Patterns and Anti-Patterns for Microservices Architectures
Integration Patterns and Anti-Patterns for Microservices Architectures
 
NATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed SystemsNATS: Control Flow for Distributed Systems
NATS: Control Flow for Distributed Systems
 
Kubernetes, The Day After
Kubernetes, The Day AfterKubernetes, The Day After
Kubernetes, The Day After
 
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud WorldPolicy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
Policy-based Cloud Storage: Persisting Data in a Multi-Site, Multi-Cloud World
 
Integration Patterns for Microservices Architectures
Integration Patterns for Microservices ArchitecturesIntegration Patterns for Microservices Architectures
Integration Patterns for Microservices Architectures
 
Nats meetup sf 20150826
Nats meetup sf   20150826Nats meetup sf   20150826
Nats meetup sf 20150826
 
Microservices: Notes From The Field
Microservices: Notes From The FieldMicroservices: Notes From The Field
Microservices: Notes From The Field
 

Recently uploaded

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Recently uploaded (20)

Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 

How Choria Improves the Operability of MCollective using NATS

  • 1. R.I.Pienaar 26 April 2017 How Choria Improves the Operability of MCollective using NATS
  • 2. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Who am I? • Consultant for 20+ years • Government, Finance, Health, Social Media, Fortune 50, Startups • DevOps, Automation, Architect, Development • Open Source @ github.com/ripienaar • Architect and Author of many Puppet related tools
  • 3. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Overview • Large scale Operations orientated RPC framework • Provides ad-hoc orchestration within the Puppet eco system • Flexible discovery that integrates into many data sources • Strong Authentication, Authorisation, Auditing • Extendible using Ruby • Communications over Middleware
  • 4. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar $ mco rpc service restart service=httpd -W country=uk -W customer=acme * [ ============================================================> ] 15 / 15 windev1.example.net Unknown Request Status Cannot stop https, error was: Execution of 'C:/WINDOWS/system32/net.exe stop httpd' returned 2: The service name is invalid. Summary of Service Status: running = 14 unknown = 1 Finished processing 15 / 15 hosts in 8352.48 ms MCollective - CLI
  • 5. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar $ mco rpc service restart service=httpd -W country=uk -W customer=acme * [ ============================================================> ] 15 / 15 windev1.example.net Unknown Request Status Cannot stop https, error was: Execution of 'C:/WINDOWS/system32/net.exe stop httpd' returned 2: The service name is invalid. Summary of Service Status: running = 14 unknown = 1 Finished processing 15 / 15 hosts in 8352.48 ms MCollective - CLI Context aware summaries “service” api “restart” action discovery
  • 6. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar $ irb -r mcollective irb(main):001:0> include MCollective::RPC => Object irb(main):002:0> client = rpcclient("service") => … irb(main):003:0> client.fact_filter("cluster", "a") => nil irb(main):004:0> client.discover => ["dev1-1.choria"] irb(main):005:0> client.progress = false => false irb(main):006:0> puts client.status(:service => "sshd").first.to_json {"agent":"service","action":"status","sender":"dev1-1.choria","statuscode": 0,"statusmsg":"OK","data":{"status":"running"}} MCollective - API “service” api discovery “status” action result from 1 node
  • 7. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Web
  • 8. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 9. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 10. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 11. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 12. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 13. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 14. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 15. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar MCollective - Installation
  • 16. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
  • 17. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Modernising MCollective
  • 18. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Playbooks Ease of Installation Modern PKISRV Records AuditingPuppetDB Integration Improved Connectivity Batteries Included JSON
  • 19. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Choria - Middleware Needs • Easy to deploy • Easy to secure using standard TLS • Easy to operate and monitor • Must be scalable and highly available • Good documentation • Responsive community • Good Ruby support - but others needed too
  • 20. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar
  • 21. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar HTTP Monitoring Single binary install TLS Good docs and comm Good trace logging Full Mesh Clustering Many languages supported Scalable to thousands
  • 22. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar NATS - Configuration $ gnatsd --tls --tlscert ssl/nats1.example.net.pem --tlskey ssl/nats1.example.net.key --tlscacert ssl/ca.pem --tlsverify -l logs/nats-0.log -p 4222 -m 8222 --cluster nats://nats2.example.net:4223 --routes nats://nats2.example.net:4223 -DV
  • 23. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar NATS - Configuration port: 4222 monitor_port: 8222 tls { cert_file: “ssl/nats1.example.net.pem" key_file: “ssl/nats1.example.net.key" ca_file: "ssl/ca.pem" verify: true } cluster { port: 4223 tls { cert_file: “ssl/nats1.example.net.pem” key_file: “ssl/nats1.example.net.key” ca_file: "ssl/ca.pem" verify: true timeout: 2 } routes = [ nats-route://nats2.example.net:4223 ] }
  • 24. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar NATS - Monitoring % curl -s localhost:8222/varz| ./jq '"port: (.port) uptime: (.uptime) connections: (.connections)”’ "port: 4222 uptime: 33d12h9m33s connections: 16"
  • 25. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Federating NATS Clusters
  • 26. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Choria - Federation
  • 27. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Links https://choria.io/ https://nats.io/ https://docs.puppet.com/mcollective https://www.devco.net/
  • 28. R.I.Pienaar | rip@devco.net | http://devco.net | @ripienaar Questions? twitter: @ripienaar email: rip@devco.net blog: www.devco.net github: ripienaar freenode: Volcane slack.puppet.com: ripienaar https://www.devco.net/