Skip to content

A quick example of bootstrapping Google Cloud and installing Dokku

License

Notifications You must be signed in to change notification settings

u2mejc/terraform-gce-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bootstrap GCE for Dokku

This is very simple example of how to use Terraform to bootstrap an instance in Google Cloud's Compute Engine and then install Dokku.

Requirements

Setup

This example tries to follow the Twelve-Factor app approach (sorta). Other then the json file you should have downloaded above, all configuration is stored in environment.

  1. Clone this repo locally
  2. Download your project's json key file and save it locally
  3. Copy the below to a text editor (like vim!) and amend the exports as necessary
  4. Either paste or source the exports after you have made changes
  5. cd into the repo and run terrafrom plan. It should not prompt you for any variables, if it does, make sure the full path to the key is correct in the env and all of the other exports are present: env | grep TF_VAR
  6. Use terraform apply to apply these changes

Env Vars to export

# Replace export if your not using a bash / borne shell
export TF_VAR_JSON_PATH='project.json'
export TF_VAR_REGION='us-west1'
export TF_VAR_METADATA_SCRIPT='wget https://raw.githubusercontent.com/dokku/dokku/v0.7.0/bootstrap.sh && sudo DOKKU_TAG=v0.7.0 bash bootstrap.sh'
export TF_VAR_PROJECT='nameofproject-123456'

Notes

This really applies changes to your Google Cloud account! Charges may apply! Don't run this in production, unless you know what your doing! Please see the license.

About

A quick example of bootstrapping Google Cloud and installing Dokku

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages