Sign inSign up

totem/cluster-deployer

By totem

•Updated over 9 years ago

Image
1

5.2K

totem/cluster-deployer repository overview

⁠cluster-deployer Build Status Coverage Status Documentation Status

It provides the ability to deploy applications to a fleet cluster. It adds a layer of abstraction and provides a simple RESTFul API for the deployment.

⁠Development Status

This deployer component can be used in production.

⁠Documentation

Project uses Sphinx for code/api documentation

⁠Location

The latest code/api documentation can be found at: http://cluster-deployer.readthedocs.org/⁠

⁠Building documentation

To generate html documentation, use command:

cd docs && make html

The documentation will be generated in docs/build folder.

⁠Requirements

The project has following dependencies

  • python 2.7.x (Fabric library is not compatible with Python 3.x)
  • Virtualenv (Recommended)
  • Python pip
  • etcd 0.4.6 (Required if using docker based deployment)
  • docker 1.2 (Required if using docker based deployment)
  • Elasticsearch 1.3+ (Recommended)
⁠Dependencies

To install dependencies for the project, run command:

pip3 install -r requirements.txt

In addition if you are developing on the project, run command:

pip3 install -r dev-requirements.txt

⁠Testing

Tests are located in tests folder. Project uses nose for testing.

⁠Unit Tests

To run all unit tests , run command :

nosetests -w tests/unit

⁠Running Server

⁠Local (Without celery worker)

To run the server locally (w/o celery worker) , run command:

python local-server.py

Once server is up you can access the root api using:
http://localhost:9000⁠

⁠Using Docker

In order to run fully integrated server using docker using latest docker , run command:

sudo docker run -it --rm -h cluster-deployer-${USER} --name cluster-deployer -v /dev/log:/dev/log -P totem/cluster-deployer
⁠Run Configuration (Environment Variables)
Env VariableDescriptionDefault Value (Local)Default Value (Docker)
QUAY_ORGANIZATIONOrganization in quay to pull images from. This is only required to construct image url when not explictly specified as part of request.totemtotem
ETCD_HOSTEtcd server host.127.0.0.1172.17.42.1
ETCD_PORTEtcd server port.40014001
ETCD_TOTEM_BASEBase path for totem configurations/totem/totem
ETCD_YODA_BASEBase path for yoda proxy configurations/yoda/yoda
TASK_EXECUTORSNo. of processes to be created for celery task executionsNot Used2
API_EXECUTORSNo. of uwsgi processes to be created for serving APINot Used2
HIPCHAT_TOKENDefault hipchat token to be used for notifications
GITHUB_TOKENGithub token for fetching fleet templates and for commit notifications.
HIPCHAT_ENABLEDSet it to true to enable hipchat notificationsfalsefalse
HIPCHAT_ROOMRoom to be used for hipchat notificationsnot-setnot-set
GITHUB_NOTIFICATION_ENABLEDSet it to true to enable github commit notifications.falsefalse
BASE_URLBase Url for Cluster Deployer (used for forming notification URLs)http://localhost:9000⁠http://172.17.42.1:9000⁠
CLUSTER_NAMEName of the cluster where orchestrator is deployedlocallocal
TOTEM_ENVName of totem environment (e.g. production, local, development)locallocal
LOG_IDENTIFIERProgram name/tag used for syslogN/Ayoda-proxy
MONGODB_HOSTMongo db host127.0.0.1HOST_IP
MONGODB_PORTMongo db port2701727017
MONGODB_AUTH_DBMongo db authentication databaseadminadmin
MONGODB_USERNAMEMongo db username
MONGODB_PASSWORDMongo db password
MONGODB_DBMongo db databasetotem-{TOTEM_ENV}totem-{TOTEM_ENV}
LOG_ROOT_LEVELRoot log levelINFOINFO
DISCOVER_RABBIMQUse static discovery for rabbitmq (true / false)falsefalse
DISCOVER_MONGOUse static discovery for mongo (true / false)falsefalse

⁠Coding Standards and Guidelines

⁠flake8

In order to ensure that code follows PEP8 standards, run command:

flake8 .

Tag summary

Content type

Image

Digest

sha256:917986430…

Size

47 MB

Last updated

almost 10 years ago

docker pull totem/cluster-deployer