Prerequisites

The Blueprint function requires Dell Cloud Manager Release 11.0.0 or above.

You can create, update and delete blueprints, and launch, display, and terminate stacks using the Dell Cloud Manager python based Blueprint command line tools or from the Dell Cloud Manager console.

If you choose to use the Dell Cloud Manage Blueprint command line tools then you need to install them using the instructions on this page.

If you choose to only use the Dell Cloud Manager console to perform these functions then it is not necessary to install the Blueprint command line tools and therefore you can skip the instructions on this page.

Blueprint command line tools

The Blueprint command line tools use the Dell Cloud Manager API to communicate to the Dell Cloud Manager server. You can install the Blueprint command line tools on your local workstation. We recommend installing the Blueprint command line tools in a virtual environment.

Attention

The Dell Cloud Manager Blueprint command line tools are currently not working and supported from a Windows operating system. They must be installed and run on a Linux or OS X machine.


Steps to install the tools

Bring up a Linux or OSX command prompt and sudo to root.

gforghetti@acme:~$ sudo su -
root@acme:~#

Then execute the command pip -V to verify that pip is installed.

root@acme:~# pip -V

You should see a message similar to this:

pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7)

If you see “command not found” you will need to install pip. Refer to Install pip .

Install virtualenv

CentOS, RHEL Linux

yum install python-virtualenv -y
yum install python-setuptools -y
easy_install virtualenv

Ubuntu Linux

apt-get install python-virtualenv -y
apt-get install python-setuptools -y
easy_install virtualenv

Mac OS X

pip install virtualenv

Exit out of root

You no longer require root access to complete the rest of the prerequisites. Using the command line tools also does not require root access.

exit

Create tools directory

Create a directory where you will install the tools in and change into that directory.

mkdir build
cd build

Setup the virtual environment

virtualenv --no-site-packages venv
New python executable in venv/bin/python
Installing setuptools, pip...done.

Activate the virtual environment

source venv/bin/activate

Note

Running the Blueprint command line tools also requires the virtual environment to be activated.

Download the DCM Blueprint Tools

The latest Blueprint command line tools can be downloaded from this link -> http://blueprint-tools.enstratius.com/index.html.

Install the DCM Blueprint Tools

The following command can be used to install or update the Blueprint command line tools.

Attention

You will need to verify/change the command to ensure it is installing the version of the Blueprint command line tools that you downloaded.

pip install BlueprintTools-11.18.0.tar.gz -U
Processing ./BlueprintTools-11.18.0.tar.gz
Requirement already up-to-date: mixcoatl==0.10.36 in ./venv/lib/python2.7/site-packages (from BlueprintTools==11.18.0)
Requirement already up-to-date: pyyaml==3.10 in ./venv/lib/python2.7/site-packages (from BlueprintTools==11.18.0)
Requirement already up-to-date: requests==1.0.4 in ./venv/lib/python2.7/site-packages (from mixcoatl==0.10.36->BlueprintTools==11.18.0)
Requirement already up-to-date: prettytable==0.7.2 in ./venv/lib/python2.7/site-packages (from mixcoatl==0.10.36->BlueprintTools==11.18.0)
Requirement already up-to-date: dicttoxml==1.5.8 in ./venv/lib/python2.7/site-packages (from mixcoatl==0.10.36->BlueprintTools==11.18.0)
Requirement already up-to-date: termcolor==1.1.0 in ./venv/lib/python2.7/site-packages (from mixcoatl==0.10.36->BlueprintTools==11.18.0)
Requirement already up-to-date: BeautifulSoup==3.2.1 in ./venv/lib/python2.7/site-packages (from mixcoatl==0.10.36->BlueprintTools==11.18.0)
Installing collected packages: BlueprintTools
Running setup.py install for BlueprintTools
Successfully installed BlueprintTools-11.18.0

Create a User DCM API key

From the Dell Cloud Manager console create a User DCM API key. Click on Administration ‣ API Key Management

Then click on the Add Key button.

_images/add_user_api_key1.png

Fill in the information on the Add New API Key dialog. Be sure and select User Key for the Key Type, and select a Cloud Account.

_images/add_user_api_key2.png

Click on the Download Key button to download and save the User API Key.

_images/add_user_api_key3.png

Close the dialog by clicking on the I have copied my secret key button.

_images/add_user_api_key4.png

Set the DCM API environment variables

Using the Dell Cloud Manager API requires you to setup some environment variables. Recommendation is to add them to your .bashrc file.

Set the 2 DCM API required environment variables below using the values from your DCM User API key.

export ES_ACCESS_KEY="put your DCM User API Key access key here inside these double quotes"
export ES_SECRET_KEY="put your DCM User API Key secret key here inside these double quotes"

Determine the DCM API version by running the curl command below. Substitute the hostname acme.dcm.com with the hostname of your Dell Cloud Manager server.

curl -L -k --silent https://acme.dcm.com/api/enstratus 2>&1 | grep -o "[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}" | head -1

Example output: 2015-11-30

Set these 2 additional required environment variables below. Substitute the hostname acme.dcm.com with the hostname of your Dell Cloud Manager server. Substitute the API version with the version retrieved from the curl command.

export  ES_ENDPOINT="https://acme.dcm.com/api/enstratus/2015-11-30"
export  ES_API_VERSION="2015-11-30"

If your Dell Cloud Manager server is running with self signed certificates then set this DCM API environment variable.

export ES_SSL_VERIFY="0"

If you added the export statements to your .bashrc file then you need to source it and activate the virtual environment again.

source ~/.bashrc

source venv/bin/activate

Test the DCM API

Verify your environment variables are set correctly and the Dell Cloud Manager API is working by running the command below:

testenv

Example output:

Blueprint Tools version: |release|
  Testing environment variables
Loading API environment
  API access validated
  API access key type is User, userId: 10

Install the sample templates

Install the sample templates by running the blueprint-tools command and specifying the --installexamples parameter and specifying the directory where you want the samples to be installed in. The sample templates contain a file named base_types.yaml which you will need to use when creating blueprints.

Note

The command below will fail if the examples subdirectory already exists. You will need to remove it first when updating the examples.

Install the samples.

blueprint-tools --installexamples examples
Copying examples to examples

A list of the contents of the examples subdirectory.

ls -la examples
total 216
drwxr-xr-x   7 gforghetti  staff    238 Jun 29 12:30 .
drwxr-xr-x  50 gforghetti  staff   1700 Jun 29 12:31 ..
-rw-r--r--   1 gforghetti  staff  14845 Jun 29 12:30 apache_web_server_no_cm.yaml
-rw-r--r--   1 gforghetti  staff   6323 Jun 29 12:30 base_types.yaml
-rw-r--r--   1 gforghetti  staff  10180 Jun 29 12:30 cascade.png
-rw-r--r--   1 gforghetti  staff    121 Jun 29 12:30 examples_load.json
-rw-r--r--   1 gforghetti  staff  67681 Jun 29 12:30 userguide.html

Copy the base_types.yaml file

For ease of use I copy the base_types.yaml file from the examples directory to my working directory.

cp examples/base_types.yaml ./