Search our Knowledge Base

Cloudify 2.3

Getting Started

Product Overview

Release Notes

Installation & Setup

Bootstrapping

Developing Recipes

Common Patterns

Deploying Services & Applications

Monitoring Your Applications

Developing Cloud Drivers

Plugins and Probes

Integration

REST API

Reference

Contributing

FAQ

The Bootstrapping Process

Cloudify uses a boostrapping process to provision machines for Cloudify management, and machines for services required to deploy applications.

Overview

The bootstrapping process is responsible for allocating machines (virtual or physical) and installing the software required to provision the relevant Cloudify components. The initial bootstrapping process is started by running the relevant install command at the Cloudify shell prompt. In general, the bootrapping process performs the following tasks:

  1. Allocates a machine from the pool of available machines defined in the relevant template. For more information about templates, see Cloudify driver file.
  2. Connects to the allocated machine via SSH (*nix) or WinRM (Windows)
  3. Installs and starts the relevant components

Once the bootstrapping pocess connects to an allocated machine, it uploads the files required to bootstrap the machine. These usually includes a startup script and any required files such as an SSH key file located in the upload folder (<cloudifyRoot>/tools/cli/plugins/esc/<cloudProviderName>/upload). Once the files are uploaded, the relevant bootstrap script is run.

The following table describes the startup scripts for bootstrapping *nix and Windows, management and application service machines.

Script OS Type Description
bootstrap-management.sh *nix Shell This script is used for bootstrapping both management and application service machines, and performs the following tasks as required:
  • Downloads the Cloudify distribution file

  • Installs Java (required to run the Cloudify agent)

  • Installs Cloudify

  • Runs the Cloudify agent
bootstrap-management.ps1 Windows PowerShell This script is used for bootstrapping both management and application machines, and performs the following tasks:
  • Downloads the Cloudify distrubtion file

  • Installs Java (required to run the Cloudify agent)

  • Installs Cloudify
bootstrap-client.ps1 Windows PowerShell This script is used for launching commands on remote machine running Windows

Bootstrapping a management machine will start the Cloudify controller processes, whereas bootstrapping an application’s service instance machine will only launch the Cloudify agent. The Cloudify agent enables the Cloudify controller to use the service instance machine to install and scale services.

The bootstrapping script is aimed at handling the most common installation scenario, but some clouds, especially private clouds, require more tweaking to work correctly. By editing the bootstrap-management.sh (*nix) or bootstrap-management.ps1 (Windows) script, you can modify the bootstrapping process to match their requirements.

The following sections describe the bootstrapping process for the supported machine types.

Provisioning Machines for Cloudify Management

When the relevant cloud driver receives a request to bootstrap a cloud, it performs the following tasks:

  1. Allocates a machine from the pool of available machines (using the Cloud’s API) defined in the management machine template
  2. Connects to the allocated machine via SSH (*nix) or WinRM (Windows)
  3. Installs and starts the Cloudify management components (Cloudify controller and the relevant cloud driver)

Provisioning Machines for Application Services

When the Cloudify controller receives a request to install an application, it requests the relevant cloud driver to provision machines for the services required to run the application. To provision the machines, the cloud driver performs the following tasks:

  1. Allocates a machine from the pool of available machines (using the Cloud’s API) defined in the template associated with the service being provisioned
  2. Connects to the allocated machine via SSH (*nix) or WinRM (Windows)
  3. Installs and starts the Cloudify agent
  4. Initiates the installation of the service using the relevant service installation script

When allocating a machine using the BYON cloud driver, if there aren’t any machines available in the pool, the following error message is displayed: Failed to create a new cloud node for template <your template name>, all available nodes are currently used
If this happens, the application installation does not revert, and the Cloudify controller continually retries until a machine becomes available.
To stop this process, at the Cloudify shell prompt, kill the install command (Ctrl-C), and then run the corresponding uninstall command.

Prerequisites

Cloudify aims to minimize the prerequisites required from a server (either virtual or physical) so that a standard operating system can run Cloudify immediately, without any specific preinstalled software. Cloudify achieves this by uploading all the files it requires during the bootstrapping process.

The following table is a list of the prerequisites for bootstrapping your Cloudify provisioned machines.

Prerequisite Windows *nix
JDK JDK 1.6 or higher — download the latest update available (e.g. JDK 6 Update 23) JDK 1.6 or higher — download the latest update available (e.g. JDK 6 Update 23)
Available Disk Space 500 MB 500 MB
Network Ports
  • All ports open between machines in same service
  • All ports open between management machines and all other machines
  • On the management machine, ports 8099 and 8100 must be open for communication from the Internet via the machine’s public IP address. This allows the Cloudify shell to interact with the REST server and allows users to access the management web application.
  • All ports open between machines in same service
  • All ports open between management machines and all other machines
  • On the management machines, ports 8099 and 8100 must be open for communication from the Internet via the machine’s public IP address. This allows the Cloudify shell to interact with the REST server and allows users to access the management web application.
Credentials username and password; Active Directory is not supported in this version. username and password, or username and .pem file; Kerberos not supported in this version.
Operating System Specific Requirements
  • Windows file sharing enabled on port 445 (CIFS)
  • WinRM enabled on port 5985

    To enable WinRM on your machine before bootstrapping a cloud, at the PowerShell prompt with administrative credentials, type the following commands:
    • set-item WSMan:\localhost\Client\TrustedHosts -Value * -Force
    • set-item WSMan:\localhost\Shell\MaxMemoryPerShellMB -Value 0 -Force
    • Enable-PSRemoting
    • Set-ExecutionPolicy unrestricted

    Setting TrustedHosts to ‘*’ has security implications. Please consult with your IT department before running this command.

  • Windows PowerShell installed and included in the system path on the client machine (the machine where Cloudify shell is installed and runs the bootstrap-cloud command) and management machines. (Exists by default on Windows 7 and Windiws Server 2008)

Cloudify uses PowerShell to run commands on remote machines. Therefore, you must use a client machine running Windows to bootstrap a machine running Windows; however, a client machine running Windows can bootstrap a machine runnnig *nix.

Additionally, different cloud environments have their own specific configuration prerequisites. The following is a list of prerequisites you may need to configure for your cloud environment:

  • Cloud driver files — Describes templates and aliases that can be referenced by and associated with different recipes. Each template defines the pool of available machines.
  • Bootstrap management script
  • Network shares
  • The Cloudify distrubtion file location when its saved locally
  • The cloud environment via its management console (credentials, certificates, …)

For information about how to configure specific cloud environments, see Next Steps.

Bootstrapping

The following procedure describes the steps for bootstrapping a cloud and an application:

  1. Start the Cloudify shell — For information about running the Cloudify shell, see Installing the Cloudify Shell.
  2. Start the bootstrapping process for provisioning machines for Cloudify management — At the Cloudify shell prompt, type the relevant command to bootstrap your cloud. For example, to provision a local cloud, type: bootstrap-localcloud. The commands for specific cloud environments are provided in their relevant topics.

    Once the command completes, the URL of the Cloudify web management console and the Cloudify contoller’s REST endpoint are display in the shell. Also, the shell automatically connects to the controller as part of the bootstrap process, so you don’t have to explicitly type the connect command.

  3. Start the bootstrapping process for provisioning machines for application services — At the Cloudify shell prompt, type the relevant command for installing your application. For example, to install the PetClinic application, type: install-application -timeout 10 <cloudify root>/examples/petclinic-simple.

What’s Next?

For information about how to configure specific cloud environments, see the relevant topic from the following list:

For information about how to bootstrap specific cloud environments, see the relevant topic from the following list: