Configuration
Configuration
In the French academic Infrastructure-as-a-Service ecosystem, Openstack has been chosen as the platform for providing Cloud services.
Large-scale instances are federated through FG-cloud.
Large-scale instances are federated through FG-cloud.
Prerequisites
Network
At a minimum, the following OpenStack TCP/IP ports must be reachable (open outbound on the client side):
Software
The terraform and python-openstackclient commands must be available.
These commands are available for example via pkgx.
Configuration
dependencies:
opendev.org/openstack/python-openstackclient: ^6.3
terraform.io: ^1.6Activation
On a machine where the dev command provided by pkgx has never been invoked, it will cache the binary dependencies of our project.
✓ ~/.pkgx/terraform.io/v1.6.4
✓ ~/.pkgx/opendev.org/openstack/python-openstackclient/v6.3.0
env +opendev.org/openstack/python-openstackclient^6.3 +terraform.io^1.6python-openstackclient
We now point our project directory environment at the OpenStack project resinfo-discotech@stratuslab.production.virtualdata.
env:
OS_CLOUD: resinfo-discotech@stratuslab.production.virtualdata
dependencies:
opendev.org/openstack/python-openstackclient: ^6.3
terraform.io: ^1.6Test
Reload our environment.
env -opendev.org/openstack/python-openstackclient^6.3 -terraform.io^1.6
env +opendev.org/openstack/python-openstackclient^6.3 +terraform.io^1.6Query OpenStack to verify the authentication configuration is correct.
+----------------------+-------+
| Resource | Limit |
+----------------------+-------+
| cores | 40 |
| instances | 20 |
| ram | 51200 |
| fixed-ips | -1 |
| injected-file-size | 10240 |
| injected-path-size | 255 |
| injected-files | 5 |
| key-pairs | 100 |
| properties | 128 |
| server-groups | 10 |
| server-group-members | 10 |
| floating-ips | -1 |
| secgroup-rules | -1 |
| secgroups | -1 |
+----------------------+-------+terraform
OpenStack Provider
The terraform command will use the OS_CLOUD environment variable that we configured in the pkgx.yaml file of our working directory.
terraform {
required_version = ">= 1.6.0"
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = "~> 1.51.1"
}
}
}
provider openstack {}Initialisation
Initialise the terraform state via the init sub-command.
~/projet-cloud/ $ terraform initValidation
Check what terraform is going to do.
~/projet-cloud/ $ terraform plan