docker-compose build- build everything needed for local development.docker-compose up web- start Django development container. It should automatically reload when code change.bin/manage.sh- run any and all of your Django command in production, beta, staging or local environment. Seebin/manage.sh -hfor detail usage.
bin/test.sh- run all tests in Django development container.bin/coverage.sh- run all tests and print code coverage in Django development container.
Environment Variables
SKIP_COVERALLS: set totrueto skip sending coverage report to Coveralls. Only do this if Coveralls is down.$SKIP_REBUILD_INDEX: set totrueto skip rebuild index. This will significantly reduce deployment time. Please make sure that no changes in database was made.$SKIP_REBUILD_SEARCH_INDEX: set totrueto skip rebuild search index. This will significantly reduce deployment time. Please make sure that no changes in database was made.
Deployment should be almost automatic depending on which branch you pushed.
masterbranch push will trigger production deploybetabranch push will trigger beta deploystagingbranch push will trigger staging deploy
Staging deployment is completely automated but production deployment require your approval (to proceed) between django_migrate step and rebuild_index step so that you have the chance to run a command that alter data such as cache_data.
If you want to see each step, look at .circleci/config.yml.
- Read Kubernetes guides
git secret revealbin/initialize_kubernetes_cluster.sh- again only run this when cluster is newly created.bin/initialize_kubernetes_namespace.sh.
- Run
bin/run_cronjob.shto run individual cronjobs e.g.bin/run_cronjob.sh --staging update_documents 0 5 * * * latest. Checkbin/run_cronjob.sh -hfor usage. - Kubernetes uses UTC so we have to +5 to match with Chicago time zone.
- Do not use @daily as it will makes the cronjobs run at 19:00 CDT.
- Use
bin/run_job.she.g.bin/run_job.sh --staging latest cache_data. Checkbin/run_job.sh -hfor usage.
- Install hercule
- Run
bin/build_apiary.shto update apiary file.