Skip to content

jacobbaek/terraform-libvirt-openstack

Repository files navigation

Create KVM VM using terraform

This terraform script will be made VMs that will be made as OpenStack.

Prerequite

Have to download terraform-provider-libvirt plugin at the following link.

have to copy the plugin file into .terraform.d/plugins at your home directory.

Environment

Verified below versions

  • terraform 0.13.4
  • libvirtd 5.4.0
  • QEMU 4.0.0
  • terraform-provider-libvirt 0.6.2

Recommended

It is better to use authentication with ssh-key. If the using ssh-key, don't use the password.

Terraform Output Example

Outputs:

ceph_instances_with_ipaddr = {
  "jacobbaek-ceph001" = []
  "jacobbaek-ceph002" = []
  "jacobbaek-ceph003" = []
}
deploy_instances_with_ipaddr = {
  "jacobbaek-deploy" = []
}
control_instances_with_ipaddr = {
  "jacobbaek-ctrl001" = []
  "jacobbaek-ctrl002" = []
  "jacobbaek-ctrl003" = []
}
compute_instances_with_ipaddr = {
  "jacobbaek-ctrl001" = []
  "jacobbaek-ctrl002" = []
  "jacobbaek-ctrl003" = []
}

Don't forget this

  • should use default network
  • check the virbr names (if there is duplicated name, this script will be failed.)

How to use

  1. should check and modify the variable.tf
  2. terraform init
  3. terraform plan
  4. terraform apply --auto-approve
  5. cd playbook
  6. bash get-playbooks.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages