We are glad you decided to join our community!
This will guide you through the steps needed to setup and maintain a cloudify development environment.
We will go through:
- Requirements.
- Basic breakdown of cloudify's main repositories.
- Issues Management.
- Continuous Integration.
- Version control.
- Tests.
- Code Style.
- Documentation.
- Setting up your environment: Step by Step Walk-through.
- Linux. Either Ubuntu 14.04 or Arch Linux should be OK.
- Python 2.6 or 2.7
- Git
- At least 4GB of RAM
Cloudify is a complex system that consists of many parts and as such, several repositories are involved:
- Cloudify CLI: Command Line Interface for running local cloudify commands, as well as interacting with the Cloudify Manager.
- Cloudify Manager: This repo contains all components that eventually constitute the Cloudify Manager machine.
- Cloudify Rest Client: Python API for communicating with the Cloudify Manager's REST server.
- Cloudify Plugins Common: This repo is a set of API's and utilities to be used by Cloudify plugins.
- Cloudify DSL Parser: This module parses and validates Cloudify DSL YAML files.
- Cloudify Script Plugin: Enables the execution of any script as an implementation to an interface operation.
All of these repositories are not independent from one another, this diagram describes the inter-dependencies:
Note: These are just the main repositories, there are many more located at the Cloudify Cosmo organization.
All of the mentioned from here on out applies to all cloudify repositories
We use Attlasian JIRA for our issue tracking system. Look for the Cloudify 3.X (CFY) project. Every feature/bug should be associated with an issue
We use Travis as the CI system, it serves two purposes:
- Run tests and code style checks for each repository.
- Upload python packages to PyPi, the central python packages repository.
The PyPi release process is described Here, its good if you familiarize yourself with it, especially for creating new cloudify repositories.
Like many open-source projects, we use Git as the Version Control system, and the code is hosted on Github.
All repositories have a master branch, which will always contain the latest code and should be stable.
Every single code change should be contained inside a dedicated branch. This branch will be reviewed and merged into the master once its travis build passes.
The workflow should be as follows:
Lets say we are working on the cloudify-rest-client repo.
Sync with the latest code:
(master) ~/dev/src/cloudify-cosmo/cloudify-rest-client$ git pull origin master
Create your branch:
notice your branch name should be prefixed with the JIRA id related to the feature/bug you are working on.
(master) ~/dev/src/cloudify-cosmo/cloudify-rest-client$ git checkout -b "CFY-1764-add-feature"
Push your new branch:
(CFY-1764-add-feature) ~/dev/src/cloudify-cosmo/cloudify-rest-client$ git push origin CFY-1764-add-feature
Each time you push changes to your branch, travis will be triggered to run tests. You can follow its progress here (look for your branch name). After you make all the necessary changes, turn to Github and create the pull request. Make sure your travis build passes before doing so.
Tests are a very important part of our development process. We try hard to cover our code with as many tests as possible, be it unit tests, integration tests or system tests. We use the nose framework to write and run our tests.
Each repository has its own unit tests, for example: CLI Unit tests. These tests will be executed as part of the travis build.
We currently have all integration tests in a dedicated project within the Cloudify Manager repo.
See Integration Tests
These tests will be executed as part of the travis build for the cloudify-manager repository.
All system tests are located in a dedicated repository called cloudify-system-tests. These tests run a full blown cloudify installation on various environments. They are triggered by an internal mechanism at the end of the day.
Every project that includes python code, goes through a process of Code style enforcements using flake8
Each repository should contain README files that document it from a developer's perspective.
Product documentation is located at http://getcloudify.org. See here how you can contribute documentation.
Note that documentation is an integral part of many features/bugs.