Deploying Blueprints
Blueprints are descriptors or patterns which describe how Cloudsoft AMP should deploy applications. Blueprints are written in YAML and many of the entities available are defined in the default AMP catalog.
Launching from a Blueprint
We’ll start by deploying an application with a simple YAML blueprint containing an Apache Tomcat server.
Note that multiple languages are available for blueprinting. The buttons below allow you to switch between the blueprinting language used throughout the instructions.
Copy the blueprint below into a text file myapp.yaml
in your workspace.
(Note, to copy the file you can hover your mouse over the right side of the text box below to get a Javascript “copy” button.)
Copy the blueprint below into a text file myapp.yaml
in your workspace.
(Note, to copy the file you can hover your mouse over the right side of the text box below to get a Javascript “copy” button.)
Locations
Before you can create an application with this configuration, you need to specify which “location” to use. Locations in Cloudsoft AMP are target environments which AMP can use to deploy applications – these may be pre-existing servers, virtualization, cloud providers, container environments, or even cloud services.
In order to configure the location in which Cloudsoft AMP launches an application,
the location must be added to the catalog with the ID tosca.default.location
.
To do this, take any of the location files defined below and
embed it in a file myloc.yaml
below, replacing the location:
placeholder:
This will be added to the catalog below, just prior to deployment.
In order to configure the location in which Cloudsoft AMP launches an application,
replace the location:
element in the blueprint above with the definition for your chosen target environment below.
Here are some examples of the various location types:
The Vagrant configuration described in Running Cloudsoft AMP is the recommended way of setting up a Vagrant environment.
This configuration comes with four basic servers configured, called byon1
to byon4
.
These can be launched by entering the following command into the terminal in the vagrant configuration directory.
The location in myloc.yaml
can now be replaced with the following YAML to launch using these vagrant servers.
The location in myapp.yaml
can now be replaced with the following YAML to launch using these vagrant servers.
Cloudsoft AMP uses Apache jclouds to support a range of cloud locations/reference. More information on the range of providers and configurations is available here.
As an example, here is a configuration for Amazon Web Services (AWS). Swap the identity and credential with your AWS account details, then replace the location in your myloc.yaml
with this.
As an example, here is a configuration for Amazon Web Services (AWS). Swap the identity and credential with your AWS account details, then replace the location in your myapp.yaml
with this.
The Bring Your Own Nodes (BYON) configuration allows Cloudsoft AMP to make use of already available servers. These can be specified by a list of IP addresses with a user and password as shown below. More information including the full range of configuration options is available here.
Replace the hosts, user and password in the example below with your own server details, then replace the location in your myloc.yaml
with this.
Replace the hosts, user and password in the example below with your own server details, then replace the location in your myapp.yaml
with this.
Note: It is also possible to set up multiple locations and reference specific locations in TOSCA for different topologies (applications) and even different locations for different nodes within the same topology. See the TOSCA guide for more information.
Note: For instructions on setting up a variety of locations/reference, storing credentials and other configuration separately to the blueprint, see Locations in the Operations section of the User Guide.
Deploying the Application
First, log in to AMP with the command line interface (CLI) tool by typing:
To secure the Cloudsoft AMP instance, you can add a username and password to AMP’s properties file, as described in the User Guide here. If this is configured, the login command will require an additional parameter for the userid and will then prompt for a password.
The tosca.default.location
must be added to the catalog before you can deploy a TOSCA blueprint,
so that Cloudsoft AMP knows where to deploy to.
To add your configured catalog location file with the command line, run:
Now you can create the application with the command below:
Id: hTPAF19s Name: Tomcat Status: In progress
Depending on your choice of location it may take some time for the application to start, the next page describes how you can monitor the progress of the application deployment and verify if it was successful.
Next
Having deployed an application, the next step is monitoring and managing it.