Skip to content

Terraform configuration to quickly set up SUSE Manager/Uyuni environments

License

Notifications You must be signed in to change notification settings

moio/sumaform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sumaform logo

sumaform is a way to quickly configure test Uyuni and SUSE Manager infrastructures with clients and servers.

Travis CI build status Join the chat at https://gitter.im/sumaform/Lobby

Installation

Terraform version: 1.0.10

Libvirt provider version: 0.6.3

openSUSE and SUSE Linux Enterprise Server:

# Uncomment one of the following lines depending on your distro

#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/openSUSE_Tumbleweed/systemsmanagement:sumaform.repo
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/openSUSE_Leap_15.2/systemsmanagement:sumaform.repo
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/openSUSE_Leap_15.3/systemsmanagement:sumaform.repo
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_12_SP5/systemsmanagement:sumaform.repo
#sudo zypper addrepo http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP3/systemsmanagement:sumaform.repo

sudo zypper install git-core
sudo zypper install --from systemsmanagement_sumaform terraform terraform-provider-libvirt
git clone https://github.com/uyuni-project/sumaform.git

Ubuntu and Debian:

sudo apt install alien
wget http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP1/x86_64/terraform.rpm
sudo alien -i terraform.rpm
wget http://download.opensuse.org/repositories/systemsmanagement:/sumaform/SLE_15_SP1/x86_64/terraform-provider-libvirt.rpm
sudo alien -i terraform-provider-libvirt.rpm
git clone https://github.com/uyuni-project/sumaform.git

NOTE: to deploy development versions of SUSE Manager you will have to have SUSE's internal CA certificates installed on your system.

You will need to edit HCL (HashiCorp Configuration Language) files. Syntax highlighting is available in major text editors like atom.

Backend choice

sumaform can deploy virtual machines to:

  • single libvirt hosts
  • Amazon Web Services
  • null backend

The simplest, recommended setup is to use libvirt on your local host. That needs at least 8 GB of RAM in your machine. If you need a lot of VMs or lack hardware you probably want to use an external libvirt host with bridged networking.

The Amazon Web Services backend is currently under maintenance and is not immediately usable as-is. We plan to restore it soon.

The null backend can be useful in a wide variety of scenarios, for example:

  • Test configurations before going live in another supported backend
  • Cases in which the virtual infrastructure is outside of the Terraform user's control
  • Cover architectures that will maybe never be covered by any other Terraform plugin

Basic main.tf configuration

In sumaform you define a set of virtual machines in a main.tf configuration file, then run Terraform to have them deployed. Contents of the file vary slightly depending on the backend you choose.

To choose the backend in use one should create a symbolic link to a backend_module module. Refer to the specific READMEs to get started:

Typical use

Refer to the official guides for a general understanding of Terraform and full commands.

For a very quick start:

vim main.tf     # change your VM setup
terraform init  # populate modules
terraform validate # check if the configuration is valid
terraform apply # prepare and apply a plan to create your systems (after manual confirmation)

Advanced use

I have a problem!

Check TROUBLESHOOTING.md first, if that does not help feel free to join the Gitter chat or directly drop a line to moio at suse dot de!

About

Terraform configuration to quickly set up SUSE Manager/Uyuni environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 49.8%
  • SaltStack 38.1%
  • Shell 6.5%
  • Python 3.8%
  • XSLT 1.2%
  • Ruby 0.4%
  • Groovy 0.2%