Opinionated salt-stack deployment
- rvm
- ruby 1.9.3
- rubygems
- bundler gem
$ git clone [email protected]:auser/salt-cli.git
$ cd salt-cli
$ bundle install
$ gem build salt-cli.gemspec
$ gem install salt-cli
$ salt #should now show a list of salt-cli commands
SaltCli is an opinionated salt stack deployment. If you don't like it, make one for yourself :).
SaltStack provides a developer the ability to write salt stack states once and deploy them to various cloud providers with the same workflow.
By defining a salt-cloud.yml
file (or a Vagrantfile, for vagrant), you can easily launch instances in the "cloud" ready to be deployed and highstated.
- aws
- vagrant
- list
- launch
- bootstrap
- teardown
- ssh
- key
- role
- command
- run
- upload
- upgrade
- highstate
If you have a salt-config.yml at the current working directory, salt-cli will read this file and take care of the magic for you. The format of this file, looks like:
user: ubuntu
plans:
dev:
# In order
- master:
roles:
- master
- monitor:
roles:
- monitor
- hadoop1:
roles:
- hadoop_master
- hbase_master
- zookeeper
- elasticsearch
- hbase_slave
- hadoop2:
roles:
- hbase_slave
- zookeeper
aws:
access_key: [ACCESS_KEY]
secret_key: [SECRET_KEY]
keyname: [YOUR EC2 KEY]
# Configs
machines:
default:
flavor: m1.small
image_id: ami-0cdf4965
master:
ports:
tcp:
- 4505
- 4506
monitor:
flavor: m1.large
ports:
udp:
- 514
- 12201
tcp:
- 80
- 2003
- 2004
- 8080
- 9300
- 9200
hadoop: &hadoop
flavor: m1.xlarge
ports:
tcp:
- 54310
- 9200
- 9300
- 2181
- 60000
- 60010
- 60020
- 2888..3888
hadoop1:
<<: *hadoop
hadoop2:
api: &api
ports:
tcp:
- 80
- 8080
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request