Skip to content

haggishunk/proj_mypaas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyPaaS: A Simple Framework for Automating the Deployment of a Roll-Your-Own PaaS

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.

Credentials

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.

TLDR

  1. Create a terraform.tfvars file to override some of the defaults set in variables.tf
  • ssh_id: MD5 fingerprint of ssh key on DigitalOcean
  • ssh_prikey: Specify the path to the ssh private key (optional)
  • domain: Your TLD or subdomain thereof
  • email: Your email, for Let's Encrypt
  • region: 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)
  1. Save DigitalOcean token in ~/.creds/do_token
  2. Save Google Cloud json credential in ~/.creds/gcp_credentials.json
  3. Save Google Cloud project id in ~/.creds/gcp_project_id

Init

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.

Standup PaaS

Simply type:

terraform plan

to see what resources will be deployed.

This command sets it all in motion:

terraform apply

Spin Down PaaS

This command takes it all down. No more charges to your account :)

terrafom destroy

More at

blog.pantageo.us

Next steps:

  • 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

About

Just testing out dokku on a digital ocean droplet... using terraform

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published