Orchestrate VP of Engineering Dave Smith, walks you through how to bootstrap Salt clusters on EC2.
Fast-track development and save 50-90% off your database costs. Sign up for a free Orchestrate account today: http://nodb.co/1wzT7Xj
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
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
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