.envrc to export environment variables$ 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
user-data.yml or cluster.tfEdit 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
Content type
Image
Digest
Size
19.5 MB
Last updated
over 8 years ago
docker pull tomohiro/rails