Cosmo is the code name for the new release of Cloudify (version 3.0). Cloudify is an open soruce tool for deploying, managing and scaling applications on the cloud. This repo contains the source code for the Cloudify Cosmo management server. To install Cloudify 3.0 refer the README file of the Cloudify CLI project.
Fuller documentation for the new Cosmo architecture will be available soon at The CloudifySource web site.
-
Open a new bug or feature request in JIRA under the "CFY" project
-
clone this repo
cloudify-manager$ git clone https://github.com/cloudify-cosmo/cloudify-manager.git
- make changes on a seperate branch named
feature/CFY-XXXX
where XXXX is the JIRA ID.
Development environment was tested with: Ubuntu & Arch Linux.
Make sure you have the following dependencies installed:
- git.
- Python 2.7 + pip.
- OpenJDK-7.
- Bundler.
- RabbitMQ.
- Make sure you have a default configured RabbitMQ server running after installing it.
- Riemann (http://riemann.io).
- Make sure Riemann's binary is available in
path
environment variable after installing it.
- Make sure Riemann's binary is available in
- Elasticsearch (http://www.elasticsearch.org/)
- Make sure Elasticsearch's binary is availale in
path
environment variable after installing it, as well as having write permission to its/data
folder (more information below) Installation instructions for Ubuntu can be found below, if you're using Arch Linux you should know your way :-)
- Make sure Elasticsearch's binary is availale in
Ubuntu installation:
sudo apt-get install git -y
Ubuntu installation:
sudo apt-get install python-pip -y
Arch Linux installation:
pacman -S python2-pip
sudo apt-get install openjdk-7-jdk
We encourage you to use virtualenv
for the Python environment, this means virtualenv2
should be installed:
# install virtualenv
sudo pip install virtualenv
# create a virtual environment
sudo virtualenv <env_folder>
# activate the virtual environment
source <env_folder>/bin/activate
Installation instructions for Ubuntu can be found here.
If there are any missing dependencies, this might help:
apt-get install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev
deb file can be downloaded from: http://riemann.io/.
And then:
sudo dpkg -i <riemann_deb_file>
deb file can be downloaded from: http://www.elasticsearch.org/download
e.g.:
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.0.1.deb
sudo dpkg -i elasticsearch-1.0.1.deb
Path variable must include elasticsearch's bin directory, e.g.:
export PATH=$PATH:/usr/share/elasticsearch/bin
You might need to set write permissions for elasticsearch's data folder:
sudo mkdir -p /usr/share/elasticsearch/data
sudo chmod 777 /usr/share/elasticsearch/data
So, after we have all the requirements installed, its time to checkout Cloudify's manager source code and install each of its components.
We'll go through the following steps:
- Source code checkout.
- Install
workflow-service
project dependencies. - Install
rest-service
project dependencies. - Install
tests
project dependencies. - Run a sample test.
Clone this repository:
mkdir -p ~/dev/cloudify
cd ~/dev/cloudify
git clone https://github.com/cloudify-cosmo/cloudify-manager
cd cloudify-manager
git checkout develop
First install dependencies for compiling with Python
# sudo apt-get install python-dev -y
This project contains Cloudify's manager REST service. In order to install its dependencies run:
# in cloudify-manager folder
cd rest-service
python setup.py install
This project is used for running integration tests which use mock Cloudify plugins and mainly used for testing Cloudify's manager functionality and workflows behavior.
In order to install its dependencies run:
# in cloudify-manager folder
cd tests
python setup.py install
# install nose tests
pip install nose
A few words about the testing framework. When launching a test, A Cloudify environment will be created which consists of:
- RabbitMQ Server (should be manually started).
- Riemann Server (Riemann binary path should be available in
path
environment variable). - Manager's REST Service.
- Workflow Engine Service.
- Celery Worker (In tests, all plugins will run on manager's Celery Worker).
The environment will be created once per Python package (different tests in the same Python package will share the same environment - we make sure to clean whatever's needed after each test).
Now that we're set, lets run some basic integration tests (goodluck):
# in cloudify-manager folder
cd tests
nosetests workflow_tests/test_workflow.py
Hopefully, the tests should pass :-)