Skip to content

Latest commit

 

History

History
60 lines (39 loc) · 1.87 KB

File metadata and controls

60 lines (39 loc) · 1.87 KB

Andromeda Terraform - Getting Started

Terraform examples using net.DE Andromeda Cloud based on OpenStack.

Table of Contents

  1. Requirements
  2. Available examples
  3. Usage
  4. FAQ

Requirements

You need to met the following requirements in order to use this examples.

  • net.DE Andromeda hosting. You can get it here
  • Terraform >= 0.14

Available examples

Example name Description
single-instance A very basic example. Create a router, network and instance with floating IP. Readme
instance-from-volume Basic example booting an instance from volume Readme
vrrp-address-pair Bring up keepalived with a VIP using OpenStack address-pair Readme

Note: For all examples we use the network 192.168.1.0/24. Make sure you use it not already in your Andromeda project.

Usage

First place your public ssh rsa key in .tfvars file you want to use. Otherwise you won't be able to login to your instance.

Using a example is pretty easy.

cd examples/EXAMPLE-NAME
terraform init
terraform plan --var-file="../EXAMPLE-NAME.tfvars"
terraform apply --var-file="../EXAMPLE-NAME.tfvars"

After terraform is run successfully wait a bit until instances are booted. The floating IP associate with your instances is displayed after each terraform run.

To remove everything from your project do:

terraform destroy --var-file="../EXAMPLE-NAME.tfvars"

FAQ

Q: I use the network 192.168.1.0/24 in my project already. Can I change the network?

A: Yes, you can. In .tfvars file you want to use add an overwrite for network_cidr and network_short variable:

network_cidr  = "172.31.1.0/24"
network_short = "172.31.1"