Skip to content
This repository has been archived by the owner on Jun 22, 2019. It is now read-only.

Latest commit

 

History

History
53 lines (34 loc) · 1.36 KB

File metadata and controls

53 lines (34 loc) · 1.36 KB

Lab: Using Scripts in Lifecycle Events

The purpose of this lab is to fix a broken blueprint and install it locally.

Ensure that the LAB_ROOT environment variable points to the exercise's root directory by executing:

export LAB_ROOT=~/cloudify-training-labs/using-scripts/exercise

Step 1: Replace placeholders

You need to replace all the occurrences of the placeholders (“REPLACE_WITH”) wherever they are located under $LAB_ROOT, with the suitable values and to add missing parts as well.

To search:

grep -r "REPLACE_WITH" $LAB_ROOT

Step 2: Run in local mode

Once you're done, you can run the application in local mode:

cfy install $LAB_ROOT/blueprint/blueprint.yaml -b tomcat -d tomcat -i vm_ip_address=<your-app-VM-public-IP-address>

Then, run the following CLI command:

cfy deployments outputs tomcat

This command will display the deployment's outputs, as defined in the application's blueprint.

Browse to http://<cli-machine-public-ip>:8081/helloworld. The test application should show up:

HelloWorld app

NOTE: if you use curl instead of a browser, you must use the -L flag to have curl follow redirects:

curl -L http://<cli-machine-public-ip>:8081/helloworld

To clean up:

cfy uninstall tomcat