This repository contains several blueprints for installing the
nodecellar
application.
Nodecellar example consists of:
- A Mongo Database
- A NodeJS Server
- A Javascript Application
Before you begin its recommended you familiarize yourself with Cloudify Terminology.
The first thing you'll need to do is
install the Cloudify CLI.
This will let you run the various blueprints.
Note:
Documentation about the blueprints content is located inside the blueprint files themselves.
Presented here are only instructions on how to RUN the blueprints using the Cloudify CLI.
From now on, all commands will assume that the working directory is the root of this repository.
This blueprint allows you to install the nodecellar application on your local machine.
Let see how this is done:
cfy local init -p local-blueprint.yaml
This command (as the name suggests) initializes your working directory to work with the given blueprint.
Now, you can run any type of workflows on this blueprint.
Lets run the install
workflow:
cfy local execute -w install
This command will install all the application components on you local machine.
(don't worry, its all installed under the tmp
directory)
Once its done, you should be able to browse to http://localhost:8080 and see the application.
To uninstall the application we run the uninstall
workflow:
cfy local execute -w uninstall
- EC2 Blueprint
- Openstack Blueprint
- Openstack Nova Net Blueprint
- Openstack HAProxy Blueprint
- Singlehost Blueprint
- Softlayer Blueprint
- CloudStack Blueprint
- CloudStack VPC Blueprint
- Host Pool Blueprint - To install this blueprint, you must have a running Host Pool Service available. More information can be found Here
All of these blueprints allow you to install the nodecellar application on different cloud environments.
Doing this requires first to bootstrap a Cloudify Manager.
Please refer to Bootstrapping Cloudify to setup your own Cloudify Manager.
Great, now that you have your very own Cloudify Manager, we can work with these blueprints.
cfy blueprints upload -b <choose_blueprint_id> -p <blueprint_filename>
Every one of these blueprints have inputs, which can be populated for a deployment using input files.
Example input files are located inside the inputs directory.
Note that these files only contain the mandatory inputs, i.e, one's that the blueprint does not define a default value for.
After you filled the input file corresponding to your blueprint, run:
cfy deployments create -b <blueprint_id> -d <choose_deployment_id> -i inputs/<inputs_filename>
Once the deployment is created, we can start running workflows:
cfy executions start -w install -d <deployment_id>
This process will create all the cloud resources needed for the application:
- VM's
- Floating IP's
- Security Groups
and everything else that is needed and declared in the blueprint.
Once the workflow execution is complete, we can view the application endpoint by running:
cfy deployments outputs -d <deployment_id>
Hit that URL to see the application running.
Now lets run the uninstall
workflow. This will uninstall the application,
as well as delete all related resources.
cfy executions start -w uninstall -d <deployment_id>
Its best to delete deployments we are no longer using, since they take up memory on the management machine. We do this by running:
cfy deployments delete -d <deployment_id>
If you have no further use for your Cloudify Manager, you can tear it (and all resources created by the bootstrap process) by running:
cfy teardown -f
Visit us on the Cloudify community website at getcloudify.org for more guides and tutorials.