Automating Distributed System Deployment to Baremetal Resources
Go to file
Ming He e7fda435ed add missing ui metadata
Change-Id: I14a141fe6f8961287edb4ac5d0b25313fb95d330
2015-12-29 19:02:26 -08:00
bin bugfix install compass onto centos7 2015-12-19 15:13:07 +08:00
compass support redeploy 2015-12-28 09:05:19 +08:00
conf add missing ui metadata 2015-12-29 19:02:26 -08:00
imgs Save zuul/jenkins/gearman config on repo 2015-07-31 16:15:22 -07:00
install modify the iso and ppa source 2015-12-29 16:42:39 +00:00
mibs Migrate repo of 'compass' to repo of 'compass-core', leave 'compass' to host project homepage 2014-01-08 19:18:04 -08:00
misc Support install.sh for installing compass onto centos7 2015-12-18 16:37:19 -08:00
monitor add monitoring script 2014-04-03 23:53:27 -07:00
plugins Add README.md to the plugins directory 2015-11-12 22:21:04 -08:00
project-config move stackforge to openstack 2015-10-18 09:57:23 -07:00
regtest bugfix install compass onto centos7 2015-12-19 15:13:07 +08:00
service add fusionsphere support 2015-06-15 16:14:31 -07:00
vagrant move stackforge to openstack 2015-10-18 09:57:23 -07:00
.coveragerc Change ignore-errors to ignore_errors 2015-09-21 14:58:11 +00:00
.gitignore make compass install robust 2014-11-10 16:22:42 -08:00
.gitreview move stackforge to openstack 2015-10-18 09:57:23 -07:00
.testr.conf Seperate chef installer as a plugin (move chef tests to plugin directory) 2015-11-10 22:34:10 -08:00
ez_setup.py Changed ansible directory structure 2015-05-22 17:06:47 -07:00
LICENSE Migrate repo of 'compass' to repo of 'compass-core', leave 'compass' to host project homepage 2014-01-08 19:18:04 -08:00
README.md Add README.md to the plugins directory 2015-11-12 22:21:04 -08:00
requirements.txt move adapter from db to memory 2015-08-04 10:45:24 -07:00
setup.cfg Migrate repo of 'compass' to repo of 'compass-core', leave 'compass' to host project homepage 2014-01-08 19:18:04 -08:00
setup.py move stackforge to openstack 2015-10-18 09:57:23 -07:00
test-requirements.txt move adapter from db to memory 2015-08-04 10:45:24 -07:00
tox.ini Deprecated tox -downloadcache option removed 2015-12-11 22:56:58 +01:00

Compass

Overview

As a platform-independent deployment automation system, Compass simplifies the complex and error-prone deployment process of various distributed systems such as Openstack, Ceph and so on. It dramatically reduces the time of datacenter server management. Compass, designed with an extensible architecture, can be easily integrated with most of the popular automation tools (Cobbler, Chef, Ansible) and allows third-parties (vendors) plugins for hardware discovery.

Visit Our Official Project Webiste

Visit Our Wiki Page for OpenStack Users

##Quick Guide to Developers

###Get started with coding and contributing

** Before everything, setup your environment:**

i. Make sure MySQL is installed on your development box:

e.g., ```brew install mysql``` (for your Mac OSX box)

ii. Dedicatedly create a virtual environment for your development. You can use virtualenvwrapper to help you manage your virtual environment.

$mkvirtualenv compass-core (skip this if you already created compass-core-env)

$workon compass-core (get into compass-core-env)

Note: the above assumes you use virtualenvwrapper to manage your virtualenv

1. Checkout source

(compass-core-env)$git checkout https://github.com/openstack/compass-core.git

2. Run the tests making sure you are working on a clean and working code base (i.e., did someone else break the code)

(compass-core-env)$tox -r

3. Write your change, and make sure test your code thoroughly (otherwise, reviewers won't approve it)

(compass-core-env)$git branch -b [TOPIC]

working, working, working on the [TOPIC] branch ...

(compass-core-env)$tox -r (make sure your new code still works)

4. Submit for review

(compass-core-env)$git review

Directories (How codebase is organized)

* bin/ - contains Compass utility scripts

* compass/ - contains all Compass business logic including database & backend

    *  api/ - contains Compass RESTful APIs implementation

    * actions/ - interface to essential functionalities executed by Celery tasks, including deploy, find servers and so on

    * apiclient/ - contains Compass RESTful API client

    * db/ - contains database model and supported database operations

    * deployment/ - contains the module for deploying a distributed system from OS installation to package installation based on user configuration via RESTful or Web UI.

    * hdsdiscovery/ - contains the module for learning server hardware spec

    * log_analyzor/ - library to calculate installation progress by processing logs from the servers being deployed

    * tasks/ - definition of Celery tasks triggering Compass actions

    * utils/ - contains utility functions for other modules

    * tests/ - unittests level testing code

    * tests_serverside/ - tests that Compass's functionality to communicate with a known chef server

* install/ - contains scripts for Compass installation on virtual machine or bare metal server

* service/ - contains Compass messaging service and cluster installation progress service

* vagrant/ - contains scripts of downloading compass-adapters and installing the target systems onto the virtual machine(s), this directory is for testing purpose

* regtest/ - contains the scripts that will be used by the continuous integrations.

* monitor/ - contains a script monitor Compass server's resource utilization during an installation

* misc/ - configuration files for Compass server setup

* conf/ - legacy configuration files related to supported target systems are stored here.

* plugins/ - new configuration files and/or package installers will be added here (see plugins/README.md)

Code Structure in Runtime: alt text

Quick Guide to Users

Install Compass from source?

  1. Run git clone -b dev/exeperimental git://git.openstack.org/openstack/compass-core.git
  2. Run cd compass to the Compass project directory.
  3. Run ./install/install.sh to setup compass environment. Please note that before you execute install.sh, you may setup your environment variables in install/install.conf, explanations and examples of those variables can be found in install.conf.
  4. Run ./bin/refresh.sh to initialize database.
  5. Run service compass-celeryd start to start compass celery daemon service.
  6. Run service compass-progress-updated start to start compass progress update daemon service.

How to play Compass?

  1. Make sure your host is one of: mac/ubuntu trusty/ubuntu precise.
  2. Make sure your OS and CPU architecture are both 64-bit.
  3. Make sure you have virtualbox installed.
  4. Make sure you have virtualbox extension pack installed to support pxe.
  5. Run git clone -b dev/experimental git://git.openstack.org/openstack/compass-core.git
  6. Go to directory compass-core/vagrant
  7. Run ./launch.sh Note: all the vboxnet interfaces and compass related vms should be removed prior to another launch.

FAQ

  • Why doesn't celery start? What should I do if I get celery died but pid file exists message after running service compassd status?
  1. Simply remove celery pid file (/var/run/celery.pid).
  2. Try running export C_FORCE_ROOT=1
  3. Restart Compass celery daemon.
  • How to check if the compass services run properly?
  1. Run service compass-celeryd status and compass-progress-updated status to check compass services status.
  2. Run service httpd status to check web service status.
  • How to troubleshoot if compassd can not start the services?

    1. Try to remove /var/run/celeryd.pid to release the celeryd lock
    2. Try to remove /var/run/progress_update.pid to release the progress_update lock.
  • How to use compass to install distributed systems?

Access http://<server_ip>. http://www.syscompass.org/install.html has some UI instructions.

  • How to run unittest?

    1. . ~/.virtualenvs/compass-core/bin/activate to activate compass python venv
    2. go to compass-core directory
    3. make sure you have dependency packages installed, if you used compass install scripts to install compass, they are already installed
    4. run tox -epy26 or tox -pey27 depending on your python version.
  • Where to find the log file?

    1. /var/log/compass/compass.log is the compass web log.
    2. /var/log/compass/celery.log is the celery log, celery logs contain most important debugging information.
    3. The redirected celeryd stdout/stderr is at /tmp/celeryd.log.
    4. The redirected progress_update.py stdout/stderr is at /tmp/progress_update.log
    5. The web server (httpd) log files are under /var/log/httpd/.
  • Where to find the compass config file?

    1. the compass setting file is at /etc/compass/setting.
    2. the default global config file for installing distributed system is at /etc/compass/setting
    3. the default celery config file is at /etc/compass/celeryconfig
    4. adapters, templates and flavor configs are at /etc/compass/ as well.
  • Where are the utility scripts for compass? They are at /opt/compass/bin/