Existing OpenShift cluster
There are three different options for how to configure and run the automation:
- Interactive prompts
- Yaml configuration
- Terraform configuration
In this mode, you will be prompted interactively for the variables required to run the automation.
- Run the
apply.sh
script - At each prompt, provide a value for the variable.
- Once all the variables are collected, you will be asked to apply the automation. Enter
y
to continue orn
to stop. Either way, the values provided have been collected and written to two sets of files so that next time you can skip the prompts.
The apply.sh
script will generate credentials.yaml and variables.yaml input files that can be used
for future deployments as well as generating the credentials.auto.tfvars and terraform.tfvars files
used by the terraform. The variables.yaml and terraform.tfvars files can be checked in with the terraform
templates. However, credentials.yaml and credentials.auto.tfvars should be excluded since they contain
sensitive information. Those files should already be included in the .gitignore file.
In this mode, you provide the configuration for your instance in yaml configuration files and avoid the prompts.
- Copy the variables.template.yaml file to variables.yaml and credentials.template.yaml to credentials.yaml.
- Provide values for each of the variables in variables.yaml and credentials.yaml.
- Run
apply.sh --ci
to kick off the automation. You will not be prompted for input variables and the automation will start immediately
The apply.sh
script will generate the credentials.auto.tfvars and terraform.tfvars files from the
values provided in the yaml files. The variables.yaml and terraform.tfvars files can be checked in with the terraform
templates. However, credentials.yaml and credentials.auto.tfvars should be excluded since they contain
sensitive information. Those files should already be included in the .gitignore file.
In situations where you are comfortable working with the terraform directly, you can skip the yaml configuration files and directly configure the automation with the terraform configuration files.
- Copy the variables.template.tfvars file and credentials.auto.template.tfvars to variables.tfvars and credentials.auto.tfvars, respectively.
- Provide values for the different variables in variables.tfvars and credentials.auto.tfvars.
- Kick off the automation with
apply.sh --ci
or skip the script and runterragrunt run-all apply --terragrunt-parallelism 1 --terragrunt-non-interactive
The terraform.tfvars file can be checked in with the terraform templates. However, credentials.auto.tfvars should be excluded since it contains sensitive information. The credentials.auto.tfvars file should already be in .gitignore.
Name | Description | Version |
---|---|---|
ocp-login | Module to perform a simple cluster login and provide the cluster path | v1.6.0 |
Name | Description | Sensitive | Default value |
---|---|---|---|
server_url | The url for the OpenShift api | ||
cluster_login_token | Token used for authentication | true |