After you have created a deployment, you must execute the process that will implement your application’s actual manifestation in your selected environment.
This process is achieved using the install workflow, which is the default workflow provided by Cloudify for deploying your application.
You can create workflows for different types of actions such as deploying code, changing the infrastructure state, and even for overriding the default Install Workflow.
Executing a Workflow via the CLI
To execute a workflow run the following command.
cfy executions start <WORKFLOW_NAME> -d <DEPLOYMENT_NAME>
Executing a Workflow via the Cloudify Management Console
Navigate to the Services page and click the relevant deployment on the Deployments widget.
Click Execute Workflow and select the required workflow from the dropdown menu.
Enter the required values and click Execute to start the workflow execution. You must supply the
Example: Installing an Application
This example shows how an
install workflow can be executed from the Node Cellar deployment:
- Type the following command in your terminal:
cfy executions start install -d nodecellar
The execution will take some time (depending on the IaaS provider), during which the resources are created and configured.
You can track the progress of the installation by reviewing the events displayed in the terminal window. Each event is labeled with its time, the deployment name, the node in the topology to which it relates, and so on.
2017-12-02T09:46:05 CFY <nodecellar> [nodejs_d36c8] Creating node
Testing the Installed Application
After the Node Cellar
installworkflow execution is complete, you can view the application endpoint by running:
cfy deployments outputs nodecellar
Navigate to the URL to see the application running.
Click the “Browse wines” button to verify that the application was installed successfully and can access the mongodb database to read the list of wines.
Uninstalling the Application
To uninstall the deployed application, you run a workflow that tears down all the resources that were provisioned by the
install workflow. For more information, see the uninstall workflow.
Type the following command in your terminal:
cfy executions start uninstall -d nodecellar
Similarly to the
install workflow, you can track the progress of the uninstall process in the CLI or the Cloudify Management Console.
After the workflow is complete, you can verify that the resources have been deleted.
After an application uninstallation process is complete, you can delete a deployment.