Start the Terraform Runtime Service
This topic guides you through the steps required to start the Terraform Runtime Service.
-
Change the directory to
ibm-ucd-patterns-install/docker-install/terraform-service
. -
Review the docker-compose.yaml file. You may want to specify different
paths to the various volumes that are mounted in the containers.
For example:
where:... volumes: - /volumes/mongo:/data/db ... volumes: - /volumes/terraform:/stacks - /volumes/logs:/var/camlog ...
-
cam-mongo (/data/db)
: volume used for persistent Mongo DB storage of Terraform stack information cam-provider-terraform (/stacks)
: runtime location for terraform executioncam-provider-terraform (/var/camlog)
: log output from terraform execution
Note: The compose files are provided only as an example. You may manually need to change the files to fit your need. -
-
Run the following commands to set the permissions on the base directories. The paths used in
the commands are an example.
mkdir -p /volumes/mongo mkdir -p /volumes/terraform mkdir -p /volumes/logs chmod -R 2775 /volumes/mongo /volumes/terraform /volumes/logs chown -R 1000:1000 /volumes/mongo chown -R 1111:1111 /volumes/terraform /volumes/logs
-
Run the following command to start the Terraform Runtime Service:
docker-compose up -d
-
Run the following command to verify if the Terraform Runtime Service containers are running:
docker ps
-
Run the following command to verify if the Terraform Runtime Service is running:
curl http://<vm_ip>:7000
The output should resemble:{"started":"2018-09-07T19:30:59.755Z","uptime":165.544}