/github-monolith

Sample code for OSCON 2019 tutorial: https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/76039

Primary LanguagePythonMIT LicenseMIT

GitHub Multi-Repo Management Monolith

This is sample code for a OSCON 2019 tutorial: https://conferences.oreilly.com/oscon/oscon-or/public/schedule/detail/76039

Please find the corresponding slides here

Pre-requisites

If installing using a thumb drive

Install the binaries in the appropriate folder osx, windows, linux

Docker images are also included in the docker-images folder so you don't need to download them. Move them to your local machine and then install them like so.

cd DIRECTORY_WHERE_YOU_COPIED_THE_DOCKER_IMAGES
docker load -i python.tar
docker load -i nginx.tar

If installing from the Internet

Installation

git clone https://github.com/thinkingserious/github-monolith.git
cd github-monolith
  • Update .env_example.
  • Update examples/config.example.
mv ./.env_example ./.env
mv ./examples/config.example ./examples/config.py
source .env
docker-machine create -d virtualbox github-manager-monolith
eval "$(docker-machine env github-manager-monolith)"
export GITHUB_MANAGER_IP="$(docker-machine ip github-manager-monolith)"
docker-compose -f docker-compose.yml up -d --build
curl http://$GITHUB_MANAGER_IP

Quickstart

Go to http://<$GITHUB_MANAGER_IP> in your browser. If you see "Hello World", you're good to go.

Run the examples

python3 -m venv venv
source ./venv/bin/activate
source .env
export GITHUB_MANAGER_IP="$(docker-machine ip github-manager-monolith)"
pip install -r web/requirements.txt
python examples/get_all_issues.py
python examples/get_all_prs.py
python examples/send_email.py
python examples/send_sms.py

References