GithubHelp home page GithubHelp logo

asmtal / rancher-terraform-digitalocean Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lunagt/rancher-terraform-digitalocean

0.0 0.0 0.0 38 KB

Terraform module for a rancher server on digitalocean.

Smarty 47.15% HCL 52.85%

rancher-terraform-digitalocean's Introduction

rancherterraformdigitalocean

Rancher Terraform DigitalOcean

Terraform module for a rancher server on Digitalocean.

What you will get?

  • A Rancher server running on DigitalOcean
  • A Domain rule pointing to your Rancher server

Features

  • It works with your main DigitalOcean account or with DigitalOcean teams. For using a team you just need that team special token and your SSH keys installed there.
  • It doesn't install puppet, chef or ansible on the host. Instead it uses cloud-init.
  • It closes all the external and internal traffic and the only ports opened are the 80 and 8080.
  • Login with root user is disabled, you will need your SSH keys.
  • Iptables rules are persistent after reboot.
  • You will get the new DigitalOcean beta metrics agent installed.

What you will need?

  • Terraform installed. This was tested with the 0.8.5 version. You can see terraform instructions here.
  • A DigitalOcean account. If you still don't have one you can create one here for free.
  • You DigitalOcean token. You can get it from here.
  • Public and private SSH keys on your local machine and set them up on your Digital Ocean account. You can learn how to do that here.

How to use it

Clone this repository

git clone [email protected]:lunagt/rancher-terraform-digitalocean.git

Inside the repository folder create a copy of the example tfvars file

cp terraform.example.tfvars terraform.tfvars

Edit this new file with the variables you want (see variables section at the end).

Runing it

   terraform apply     If you don't need your server anymore, just destroy it

terraform destroy #and type 'yes' after this command

Variables

Mandatory DigitalOcean API Variables

Variable Default Description
do_token empty DigitalOcean Personal Access Token
pub_key empty Public key location, so it can be installed into new droplets
pvt_key empty Private key location, so Terraform can connect to new droplets
ssh_fingerprint empty Fingerprint of SSH key

Mandatory Host Variables

Variable Default Description
domain empty Existing DigitalOcean DNS in which the host will be added e.g. example.com

Optional Host Variables

Variable Default Description
host_name rancher-server Name of the host to be created
image docker-16-04 Base image for the host
region sfo1 Digital Ocean region for the host
size 1gb Digital Ocean size of the host (512mb, 1gb, 2gb)
private_networking false Enable/Disable private networking
domain_name rancher. Domain name, for example "rancher." (note the dot at the end), so you will have rancher.example.com
user rancher Username to be used to login to the host and for the home folder.

rancher-terraform-digitalocean's People

Contributors

gepser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.