- Ruby 2.2
- Direnv
- Terraform
- Atlas
- Digital Ocean
$ cp .envrc.example .envirc
$ vi .envrc
$ direnv allow
Install the Digtal Ocean command-line tool:
$ bundle install --path vendor/bundle
Create a user-data.yml
:
$ cp user-data.yml.example user-data.yml
Launch development machine:
$ vagrant up
Create cluster:
$ terraform plan # Check your plan
$ terraform apply
Login to a CoreOS server:
$ bundle exec tugboat core-X -u core -p 2222 # SSH port is 2222 in this example
Edit the user-data.yml
:
$ vi user-data.yml
Edit the cluster.tf
:
$ vi cluster.tf
Upload user-data.yml
to instances:
$ vagrant provision
Apply changes:
$ vagrant ssh
core@core-X ~$ sudo coreos-cloudinit --from-file /var/lib/coreos-vagrant/vagrantfile-user-data
$ terraform remote config -backend-config "name=tomohiro/cluster"
$ terraform remote pull
$ terraform plan
$ terraform apply
$ terraform remote push