Clone the repository and move into it:
git clone [email protected]:dnsimple/terraform-dnsimple-cts.git
cd terraform-dnsimple-cts
Add the required variables to test the integration.
cp test/terraform.tfvars.example test/terraform.tfvars
Plan:
terraform plan --var-file="test/terraform.tfvars"
Apply:
terraform apply --var-file="test/terraform.tfvars"
Add the required variables to test the integration. Making sure to comment out or remove the services
variable.
cp test/terraform.tfvars.example test/terraform.tfvars
NOTE: If you had previously uncommented the services
variable make sure to remove the variable or comment the variable out else the integration would not work, as CTS produces .tfvars
file with the same variable when it receives an update from the consul server.
Startup the datacenter:
docker compose up -d
docker compose ps
Follow the logs:
docker compose logs -f
In a separate terminal run helper script to register/deregester services. But first ensure to update the Meta.zone_name
attribute of the service config in test/api-service.json
and test/web-service.json
.
./test/servicesctl.sh <service_name> <action>
service_name - default: web, options: [web, api]
action - default: register, options: [register, deregester]
Registerting a service:
./test/servicesctl.sh api register
Deregisterting a service:
./test/servicesctl.sh api deregister
NOTES:
- The CTS container is stateless, which means that after shutting it down the tfstate will be lost.
- You can add more services by creating a config with the following convention
test/<service_name>-service.json
, and then you can use the helper the same way with the new service.
The following instructions uses $VERSION
as a placeholder, where $VERSION
is a MAJOR.MINOR.BUGFIX
release such as 1.2.0
.
-
Run the test suite and ensure all the tests pass.
-
Finalize the
## main
section inCHANGELOG.md
assigning the version. -
Commit and push the changes
git commit -a -m "Release $VERSION" git push origin main
-
Wait for CI to complete.
-
Create a signed tag.
git tag -a v$VERSION -s -m "Release $VERSION" git push origin --tags