Giter Site home page Giter Site logo

terraform-demo's Introduction

Terraform Demo

This is just a quickstart for using terraform on Elastx. It creates:

# Resource
1 Router
2 Subnets, web and db
4 instances, 2 web, 2 db
2 floating IPs for web cluster
2 Server Groups with anti-affiniy (web, db) makes sure instances aren't on same physical hardware
3 Security Groups "demo-ssh-sg", "demo-web-sg" and "demo-db-sg"
1 Key pair "demo_rsa"

Default user is changed to "elastx" with cloud-config.

File structure

Name Description
README.md This file, obviously
demo_rsa(|\.pub) SSH keypair, only to be used for this demonstration
terraform.tf The terraform manifest with all defined resources
terraform-openrc.sh should be run initially to setup username, tenant and password
terraform.tfstate(|\.backup) tfstate and tfstate.backup so that terraform can keep track on changes

How to use

Make sure you have installed Terraform

First off, run the terraform-openrc.sh script. It will ask about username, tenant and password. Then run "terraform plan". If that fails, make sure you've used the correct credentials (runt terraform-openrc.sh again)

Last, "terraform apply" will install

$ . ./terraform-openrc.sh
[...]
$ terraform init (if it is the first time you run terraform)
$ terraform plan
$ terraform apply

You should now have a fully working environment with everything described in the beginning of this README.

terraform-demo's People

Contributors

holmsten avatar joakimohman avatar wicked-wix avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.