This project uses terraform to provision a virtual machine and install Dokkuas a PaaS host. I chose to use DigitalOcean for their cheap droplets/VMs and GoogleCloud's DNS for it's resilience. This is by no means the only viable provider schema; I consciously used two different providers to play with a frankencloud model.
You will notice several references to credentials, most of which are specific to the cloud provider being used (ie. GCP, Digitalocean). See terraform's documentation for help on accessing and working with your provider of choice.
- Create a
terraform.tfvars
file to override some of the defaults set invariables.tf
ssh_id:
MD5 fingerprint of ssh key on DigitalOceanssh_prikey:
Specify the path to the ssh private key (optional)domain:
Your TLD or subdomain thereofemail:
Your email, for Let's Encryptregion:
The DigitalOcean region to deploy into (optional)size:
The RAM of the droplet (optional)appname:
name for app to be deployed (optional)gitname:
source repo for app to be deployed (optional)
- Save DigitalOcean token in
~/.creds/do_token
- Save Google Cloud json credential in
~/.creds/gcp_credentials.json
- Save Google Cloud project id in
~/.creds/gcp_project_id
After cloning this repository, initialize terraform plugins like so:
terraform init
You will have to do these each time you add new providers to the .tf
files.
Simply type:
terraform plan
to see what resources will be deployed.
This command sets it all in motion:
terraform apply
This command takes it all down. No more charges to your account :)
terrafom destroy
- Allow any number of machines to be deployed
- Segment machines by role
- Add etcd interface
- Develop a better app to deploy than the sample ruby app from Heroku