Giter Club home page Giter Club logo

terraform-ansible-openstack-boilerplate's Introduction

terraform-ansible-openstack-boilerplate

Boilerplate for building vps using terraform and ansible.

Features

  • Terraform
  • Ansible
  • OpenStack

Get started

Generate a ssh key

Before you start, generate a key for root and a key for the execution user.

ex. ssh-keygen -t rsa -b 4096 -C "[email protected]"

Setup tfvars

Copy example.tfvars with any name you like, and edit it like this.

ex.

user_name="user1234"
password="password1234"
tenant_name="tenant1234"
auth_url="https://identity.tyo2.conoha.io/v2.0"
image_name="vmi-ubuntu-20.04-amd64-30gb"
flavor_name="g-1gb"
keypair_name="keypair1234"
path_to_public_key_for_root="~/.ssh/publickey.pub"
path_to_private_key_for_root="~/.ssh/privatekey"
instance_name="instance1234"
instance_name_tag="instancetag1234"
host="web"
new_user_name="admin"
new_user_password="password1234"
shell="/bin/bash"
path_to_public_key="~/.ssh/publickey.pub"
port="22"

If you give tfvars file a name other than terraform.tfvars, you need to use option when executing a command. terraform COMMAND -var-file anyname.tfvars

If you name it terraform.tfvars, you do not need to specify -var-file option.

Init

terraform init

Plan

terraform plan

Apply

terraform apply

Check ssh connection

ssh username@ipaddress -i path_to_private_key

Destroy

terraform destory

Reference

License

This project is licensed under the terms of the MIT license.

terraform-ansible-openstack-boilerplate's People

Contributors

bmf-san avatar

Stargazers

 avatar  avatar

Watchers

 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.