SlideShare a Scribd company logo
1 of 16
Download to read offline
Salter 
Using Go to Provision Saltstack Clusters on AWS
Dave Smith 
VP, Engineering 
@dizzyd
Motivations 
• Orchestrate manages clusters on AWS 
• Clusters should be reproducible 
• Love saltstack, but saltcloud didn’t exist yet 
Salter - https://github.com/orchestrate-io/salter
Background 
• Gen0: Ruby app (agh!) 
• Gen1: Python app (better…) 
• Gen2: Golang app (best!) 
Salter - https://github.com/orchestrate-io/salter
What’s It Do? 
• Constructs a reproducible cluster from a 
specification file 
• Bootstraps salt master + minions into the cluster 
• Provides commands to manage the cluster 
Salter - https://github.com/orchestrate-io/salter
Notable Features 
• Multithreaded instance initiation 
• Sandboxing of credentials based on AWS key 
• Clean logging of highstate for multiple nodes 
Salter - https://github.com/orchestrate-io/salter
Cluster Spec 
• nodes - count, roles, sgroup 
• sgroups - text-based rules 
• aws - flavor, ami, region, zone, keyname 
• salt - data dir, userdata file 
• salt.grains 
Salter - https://github.com/orchestrate-io/salter
Cluster Spec Example 
[nodes.prod-api] 
roles = ["api"] 
count = 3 
sgroup = “api” 
Salter - https://github.com/orchestrate-io/salter 
[sgroups.api] 
rules = [ 
# SSH access 
"tcp:22:22:0.0.0.0/0", 
# Monitoring 
"icmp:8:-1:monitor", # Ping 
“tcp:5666:5666:monitor",# NRPE 
"tcp:123:123:monitor", # NTP 
"udp:123:123:monitor", # NTP (udp) 
] 
[nodes.prod-monitor] 
roles = ["monitor"] 
sgroup = “monitor" 
[aws] 
ssh_username = "ubuntu" 
flavor = "m1.xlarge" 
ami = "ami-271a484e" 
region = "us-east-1"
Lifecycle Of A Cluster 
launch upload 
highstate 
ssh teardown 
sgroups 
Salter - https://github.com/orchestrate-io/salter
Launching A Cluster 
$ salter -c staging.cfg -a launch 
Using data dir: .salter/data/68ae66ab14900 
staging (i-4ca8171f): started 
staging (54.211.183.243): running 16:37:08 up 0 min, 0 users, 
load average: 0.75, 0.19, 0.06 
Salter - https://github.com/orchestrate-io/salter
Uploading Salt Config 
$ salter -c staging.cfg upload 
Using data dir: .salter/data/680b14900 
Uploading deploy/salt to 54.80.213.168:/srv/salt... 
building file list ... done 
created directory /srv/salt 
./ 
pillar/ 
pillar/global.sls 
pillar/top.sls 
pillar/users.sls 
… 
Running saltutil.sync_all... 
Running mine.update... 
Running saltutil.refresh_pillar... 
Salter - https://github.com/orchestrate-io/salter
Highstating 
$ salter -c staging.cfg highstate 
Using data dir: .salter/data/680cb14900 
staging: 0 errors 917 changes 352 states. 
master: 1 errors 917 changes 352 states. 
Salter - https://github.com/orchestrate-io/salter
Golang Joy 
• Static compilation / easy distribution 
• Parallelism constructs 
• Fun, new lang with good library support for AWS 
and SSH 
Salter - https://github.com/orchestrate-io/salter
Golang Pain 
• Source/library management 
• Forking a library requires code changes (?!) 
• Typing system can be awkward 
• for-each construct requires reflection 
Salter - https://github.com/orchestrate-io/salter
Nifty Utility Features 
• ssh - never lookup an IP again 
• hosts - get an easy hosts file for whole cluster 
• info - see internal/external IPs 
• csshx - access all nodes of a certain type 
Salter - https://github.com/orchestrate-io/salter
Questions?

More Related Content

More from Orchestrate

Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Orchestrate
 
Triumph of Simplicity: How databases will be replaced by simple services.
Triumph of Simplicity: How databases will be replaced by simple services.Triumph of Simplicity: How databases will be replaced by simple services.
Triumph of Simplicity: How databases will be replaced by simple services.Orchestrate
 
Databases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsDatabases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsOrchestrate
 
How To Evaluate an API
How To Evaluate an APIHow To Evaluate an API
How To Evaluate an APIOrchestrate
 
Our Brave Modular Future
Our Brave Modular FutureOur Brave Modular Future
Our Brave Modular FutureOrchestrate
 
The Architect is Not Convince
The Architect is Not ConvinceThe Architect is Not Convince
The Architect is Not ConvinceOrchestrate
 
API Con UK Workshop
API Con UK WorkshopAPI Con UK Workshop
API Con UK WorkshopOrchestrate
 

More from Orchestrate (8)

Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability. Databases and Queries: Matching Performance and Reliability.
Databases and Queries: Matching Performance and Reliability.
 
Triumph of Simplicity: How databases will be replaced by simple services.
Triumph of Simplicity: How databases will be replaced by simple services.Triumph of Simplicity: How databases will be replaced by simple services.
Triumph of Simplicity: How databases will be replaced by simple services.
 
Databases, the Cloud and its Discontents
Databases, the Cloud and its DiscontentsDatabases, the Cloud and its Discontents
Databases, the Cloud and its Discontents
 
How To Evaluate an API
How To Evaluate an APIHow To Evaluate an API
How To Evaluate an API
 
Our Brave Modular Future
Our Brave Modular FutureOur Brave Modular Future
Our Brave Modular Future
 
The Architect is Not Convince
The Architect is Not ConvinceThe Architect is Not Convince
The Architect is Not Convince
 
API Con UK Workshop
API Con UK WorkshopAPI Con UK Workshop
API Con UK Workshop
 
NoSQL Now
NoSQL NowNoSQL Now
NoSQL Now
 

Recently uploaded

The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionWave PLM
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024Shane Coughlan
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationWave PLM
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesNeo4j
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Primacy Infotech
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfVictor Lopez
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1KnowledgeSeed
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024vaibhav130304
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAlluxio, Inc.
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Soroosh Khodami
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Henry Schreiner
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfsteffenkarlsson2
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationHelp Desk Migration
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
 

Recently uploaded (20)

The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
A Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data MigrationA Guideline to Zendesk to Re:amaze Data Migration
A Guideline to Zendesk to Re:amaze Data Migration
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 

Salter - Using Go To Provision Saltstack Clusters on AWS

  • 1. Salter Using Go to Provision Saltstack Clusters on AWS
  • 2. Dave Smith VP, Engineering @dizzyd
  • 3. Motivations • Orchestrate manages clusters on AWS • Clusters should be reproducible • Love saltstack, but saltcloud didn’t exist yet Salter - https://github.com/orchestrate-io/salter
  • 4. Background • Gen0: Ruby app (agh!) • Gen1: Python app (better…) • Gen2: Golang app (best!) Salter - https://github.com/orchestrate-io/salter
  • 5. What’s It Do? • Constructs a reproducible cluster from a specification file • Bootstraps salt master + minions into the cluster • Provides commands to manage the cluster Salter - https://github.com/orchestrate-io/salter
  • 6. Notable Features • Multithreaded instance initiation • Sandboxing of credentials based on AWS key • Clean logging of highstate for multiple nodes Salter - https://github.com/orchestrate-io/salter
  • 7. Cluster Spec • nodes - count, roles, sgroup • sgroups - text-based rules • aws - flavor, ami, region, zone, keyname • salt - data dir, userdata file • salt.grains Salter - https://github.com/orchestrate-io/salter
  • 8. Cluster Spec Example [nodes.prod-api] roles = ["api"] count = 3 sgroup = “api” Salter - https://github.com/orchestrate-io/salter [sgroups.api] rules = [ # SSH access "tcp:22:22:0.0.0.0/0", # Monitoring "icmp:8:-1:monitor", # Ping “tcp:5666:5666:monitor",# NRPE "tcp:123:123:monitor", # NTP "udp:123:123:monitor", # NTP (udp) ] [nodes.prod-monitor] roles = ["monitor"] sgroup = “monitor" [aws] ssh_username = "ubuntu" flavor = "m1.xlarge" ami = "ami-271a484e" region = "us-east-1"
  • 9. Lifecycle Of A Cluster launch upload highstate ssh teardown sgroups Salter - https://github.com/orchestrate-io/salter
  • 10. Launching A Cluster $ salter -c staging.cfg -a launch Using data dir: .salter/data/68ae66ab14900 staging (i-4ca8171f): started staging (54.211.183.243): running 16:37:08 up 0 min, 0 users, load average: 0.75, 0.19, 0.06 Salter - https://github.com/orchestrate-io/salter
  • 11. Uploading Salt Config $ salter -c staging.cfg upload Using data dir: .salter/data/680b14900 Uploading deploy/salt to 54.80.213.168:/srv/salt... building file list ... done created directory /srv/salt ./ pillar/ pillar/global.sls pillar/top.sls pillar/users.sls … Running saltutil.sync_all... Running mine.update... Running saltutil.refresh_pillar... Salter - https://github.com/orchestrate-io/salter
  • 12. Highstating $ salter -c staging.cfg highstate Using data dir: .salter/data/680cb14900 staging: 0 errors 917 changes 352 states. master: 1 errors 917 changes 352 states. Salter - https://github.com/orchestrate-io/salter
  • 13. Golang Joy • Static compilation / easy distribution • Parallelism constructs • Fun, new lang with good library support for AWS and SSH Salter - https://github.com/orchestrate-io/salter
  • 14. Golang Pain • Source/library management • Forking a library requires code changes (?!) • Typing system can be awkward • for-each construct requires reflection Salter - https://github.com/orchestrate-io/salter
  • 15. Nifty Utility Features • ssh - never lookup an IP again • hosts - get an easy hosts file for whole cluster • info - see internal/external IPs • csshx - access all nodes of a certain type Salter - https://github.com/orchestrate-io/salter