Level 1: Hello-World

This example demonstrates a simple deployment of local HTTP server with a hello-world page on it.

Prerequisites

This example expects the following prerequisites:

Cloudify CLI or Cloudify Management Console?

Cloudify allows for multiple user interfaces. Some users find the Cloudify Management Console (web based UI) more intuitive while others prefer the Cloudify CLI (Command Line Interface). This tutorial and all following ones will describe both methods.

Cloudify Management Console

This section explains how to run the above described steps using the Cloudify Management Console. The Cloudify Management Console and Cloudify CLI can be used interchangeably for all Cloudify activities.

Upload Blueprint

A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. Blueprints are represented as descriptive code (yaml based files) and typically stored and managed as part of the source repository. The blueprint is available here.

The flow required to setup a service consists of:

  1. Upload the blueprint describing the service to the Cloudify Manager.
  2. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the Cloudify database and provides the “context” needed for running workflows.
  3. Run the install workflow for the created deployment to apply the model to the infrastructure.

Let’s run these one by one.

To upload a blueprint to the Cloudify Manager, select the Local Blueprints page, and use the Upload button.

Upload a Blueprint

Deploy & Install

Once the blueprint is uploaded, it will be displayed in the Blueprints widget. to deploy the blueprint click the Create deployment button next to the blueprint you wish to deploy. Specify the deployment name and click Deploy & Install

You will be directed to the Deployment page and will be able to track the progress of the execution.

The deployment you have created should be displayed in the deployments list in the Deployments page.

Validate

In this example we have setup a simple HTTP service hosting a static site.

To access it, simply open your browser to:

Teardown

To remove the deployment and destroy the orchestrated service, run the Uninstall workflow by clicking the Execute workflow menu next to the deployment, expanding Default workflows, and selecting Uninstall.


Cloudify CLI

Upload Blueprint and Deploy

A blueprint is a general purpose model for describing systems, services or any orchestrated object topology. Blueprints are represented as descriptive code (YAML-based files) and are typically stored and managed as part of the source code repository. The blueprint is available here.

Uploading a blueprint to Cloudify can be done by direct upload or by providing the link in the source code repository. The flow to do that is:

  1. Upload the blueprint.
  2. Create a deployment from the uploaded blueprint. This generates a model of the service topology in the Cloudify database and provides the “context” needed for running workflows.
  3. Run the install workflow for the created deployment to apply the model to the infrastructure.

In order to perform this flow as a single unit, we will use the install command.

cfy install https://github.com/cloudify-community/blueprint-examples/releases/download/latest/simple-hello-world-example.zip -n blueprint.yaml

Note: Usually, in order to connect and deploy instances on cloud platforms (such as AWS, Azure etc.) we need to upload the appropriate Cloudify plugins, but in this example the infrastructure is local and not interacting with any cloud provider.

Validate

In this example we have setup a simple HTTP service hosting a static site.

Firstly, in order to see that the deployment was successfully created, run:

$ cfy deployments list
Listing all deployments...

Deployments:
+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+
|             id             |        blueprint_id        |        created_at        |        updated_at        | visibility |  tenant_name   | created_by | site_name |
+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+
| simple-hello-world-example | simple-hello-world-example | 2020-04-05 14:34:49.487  | 2020-04-05 14:34:49.487  |   tenant   | default_tenant |   admin    |           |
+----------------------------+----------------------------+--------------------------+--------------------------+------------+----------------+------------+-----------+

Showing 1 of 1 deployments

To access it, simply open your browser to:

Teardown

To remove the deployment and destroy the orchestrated service, run the uninstall command:

cfy uninstall simple-hello-world-example