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

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

%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 

Recently uploaded (20)

tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

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