Skip to content

Use Terraform to automate Drone.io deployment on Digital Ocean

License

Notifications You must be signed in to change notification settings

kkarimi/drone-on-digitalocean

Repository files navigation

Drone.io Deployer

Deploy Drone.io CI on Digital Ocean with Terraform

First you need to:

Then in order to run:

  • Clone the repository and run with in docker with:

With Docker:

docker run -i -t hashicorp/terraform:light terraform apply \
    -var "DO_TOKEN=<YOUR-DIGITAL-OCEAN-TOKEN>" \
    -var "DRONE_GITHUB_CLIENT=<VCS-CLIENT-ID>" \
    -var "DRONE_GITHUB_SECRET=<VCS-CLIENT-SECRET>"

OR like it's still 2013:

Ensure you have terraform installed and then:

terraform apply \
    -var "DO_TOKEN=<YOUR-DIGITAL-OCEAN-TOKEN>" \
    -var "DRONE_GITHUB_CLIENT=<VCS-CLIENT-ID>" \
    -var "DRONE_GITHUB_SECRET=<VCS-CLIENT-SECRET>"

Alternatively, you can set the following environment variables to not have to declare vars:

  • TF_VAR_DO_TOKEN
  • TF_VAR_DRONE_GITHUB_CLIENT
  • TF_VAR_DRONE_GITHUB_SECRET

OR create a terraform.tfvars file in root with the content below.

# Digital Ocean
droplet_name            = "drone-ci"
droplet_region          = "LON1"
droplet_size            = "512"
DO_TOKEN                = ""

# GitHub API token
DRONE_GITHUB_CLIENT     = ""
DRONE_GITHUB_SECRET     = ""

# Drone related
DRONE_SECRET            = ""

..and run with terraform apply in the directory

About

Use Terraform to automate Drone.io deployment on Digital Ocean

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published