Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 3.19 KB

README.md

File metadata and controls

74 lines (47 loc) · 3.19 KB

Terraform Provider for Feilong

Introduction and Ecosystem

The Terraform provider for Feilong enables to dynamically deploy guests on a s/390 system that runs z/VM operating system. It leverages Feilong connector, which is at the core of the Cloud Infrastructure Center of IBM. However, Feilong can be used alone, without a full CIC deployment.

Feilong offers an HTTP REST API that manages VMs by transmitting requests to the more complex Systems Management API, also known as SMAPI. The Go library for Feilong allows to call that REST API in a simple manner from a Go program. The Terraform provider for Feilong relies on that library and is seen by the Terraform automation tool as a plugin.

Terraform relies on main.tf files for deploying VMs. The Feilong provider extends the syntax of those configuration files to take into account the specificities of z/VM.

A normal cycle of commands to use the main.tf file is:

$ terraform init
$ terraform apply
(use the VMS)
$ terraform destroy

Global Structure of the Configuration File

The main.tf file is made of the following sections:

terraform {
  (...)
}

provider "feilong" {
  (...)
}

(other providers)


resource "feilong_cloudinit_params" "(some name)" {
  (...)
}

resource "feilong_vswitch" "(some name)" {
  (...)
}

resource "feilong_guest" "(some name)" {
  (...)
}

(other resources for Feilong)

(other resources for the other providers)


output "feilong_guest_mac_address" {
  value = feilong_guest.(some name).mac_address
}

output "feilong_guest_ip_address" {
  value = feilong_guest.(some name).ip_address
}

(other values for output)

The terraform section allows to define the required versions of terraform and of the various providers. The provider section allows to define global settings, like the IP address or the domain name of the Feilong connector. Both are described more in details in Global Parameters chapter.

The feilong_cloudinit_params resource sections allow to create locally a file that can be used to store parameters for cloud-init during the initial deployment. It is described more in details in Local Files chapter.

The feilong_vswitch resource sections allow to create s/390 virtual switches, in the case that the existing vswitches do not match your needs. They are decribed more in details in Virtual Switches chapter.

The feilong_guest resource sections allow to create s/390 guest VMs (userids in z/VM parlance). They are described more in details in Guests chapter.

The output sections allow to display computed values at the end of the terraform deployment. These are values that were unknown at the start of the deployment.

Terraform also has the notion of "data sources". They are currently not used in the Terraform provider for Feilong.