Welcome to the development reference for Camunda's Terraform Rosa module! This document provides guidance on setting up a testing environment, running tests, and managing releases.
To start developing or testing the Rosa module, follow these steps:
-
Clone the Repository:
- Clone the repository from camunda/camunda-tf-rosa to your local machine.
-
Install Dependencies:
- Ensure you have Terraform, the AWS CLI, and the ROSA CLI installed on your machine. Refer to their respective documentation for installation instructions.
-
Configure AWS Credentials:
- Configure your AWS CLI with the necessary credentials to interact with your AWS account:
aws configure
- Configure your AWS CLI with the necessary credentials to interact with your AWS account:
-
Set your RHCS token:
- Grab a token from https://console.redhat.com/openshift/token/rosa and set it as environment variable
export RHCS_TOKEN="yourToken"
- Grab a token from https://console.redhat.com/openshift/token/rosa and set it as environment variable
-
Initialize Terraform:
- Navigate to the module's directory, copy the backend definition and initialize Terraform:
cd modules/rosa-hcp cp ../fixtures/backend.tf ./ terraform init
- Navigate to the module's directory, copy the backend definition and initialize Terraform:
-
Run Terraform Plan and Apply:
- You can now plan and apply the Terraform configuration to create the ROSA cluster:
terraform plan -var "cluster_name=your-cluster-name" -var "replicas=2" -var "htpasswd_password=your-password" -var "htpasswd_username=your-username" -var "openshift_version=your-openshift-version" terraform apply -var "cluster_name=your-cluster-name" -var "replicas=2" -var "htpasswd_password=your-password" -var "htpasswd_username=your-username" -var "openshift_version=your-openshift-version"
- You can now plan and apply the Terraform configuration to create the ROSA cluster:
The tests in the CI can be triggered automatically by modifying Terraform or test files. It will be labeled either test
or terraform
automatically by the labeler.
You can choose to overwrite the name and disable the deletion of the cluster in the workflow dispatch.
We follow Semantic Versioning (SemVer) guidelines for versioning. Follow these steps to release a new version:
-
Commit History:
- Maintain a clear commit history with explicit messages detailing additions and deletions.
-
Versioning:
- Determine the appropriate version number based on the changes made since the last release.
- Follow the format
MAJOR.MINOR.PATCH
as per Semantic Versioning guidelines.
-
GitHub Releases:
- Publish the new version on GitHub Releases.
- Tag the release with the version number and include release notes summarizing changes.
Please pin GitHub action, if you need you can use pin-github-action cli tool.
By following these guidelines, we ensure smooth development iterations, robust testing practices, and clear version management for the Terraform ROSA module. Happy coding!