-
Notifications
You must be signed in to change notification settings - Fork 32
Development Setup
Dan Chaffelson edited this page Mar 13, 2019
·
8 revisions
You may find it convenient to do a thin checkout the current working branch:
git clone --depth 1 https://github.com/Chaffelson/whoville.git
When working in a Python commandline, it is strongly recommended to add the root directory of the project to your Python Path:
export PYTHONPATH="${PYTHONPATH}:/path/to/whoville"
Note that if you are working in an IDE like PyCharm or Eclipse, it will probably do this for you.
Whoville relies on a short Profile file defined in YAML to bootstrap itself.
An example is provided in the project root (profile.RENAME.yml), you should rename this to 'profile.yml' and edit it with your information.
Details on each parameter are commented in-line in the example file.
We suggest you use a Python virtual environment or similar: https://docs.python-guide.org/dev/virtualenvs/
You will need Python 3.6 as Altus Director Client has a bug with Python 3.7+
You will need to install the Project Requirements:
pip install -r requirements.txt
If you wish to interactively use the deployment manager (Whoville's Mayor) then you will likely find it easiest to import the Mayor's namespace:
python3 from whoville.mayor import *
The current state of Whoville is kept in an object called 'horton', which is updated by each step of the process laid out in mayor.py. All information about Whoville should be found either in Horton's memory or your Profile
You may run the automated service manually to test your Service Definitions:
python3 from whoville.mayor import * interfering_kangaroo()
There is a convenient Dockerfile for local development in docker/v2/localdev/Dockerfile
It is suggested that you run the docker build command from the root of the project using the -f flag to reduce complexity when passing in the code base and other definitions
docker build -f="./docker/v2/localdev/Dockerfile" -t whoville:hdp3cbd . && docker run -v /whoville:/whoville --env PROFILE=/whoville/profile.yml