- Docker Image Preparation
- Source Modifications
- Database Preparation
- Install Oncall
- Manually Start Oncall
Start an ubuntu v18.04 docker container
docker run -itd -p 8080:8080 ubuntu:bionic
TTY into Container
docker exec -it <containerID> /bin/bash
Prepare system for Oncall
apt update && apt -y upgrade &&
apt install -y git
Clone Oncall v1.2.3
cd /home &&
git clone --branch v1.2.3 https://github.com/linkedin/oncall.git &&
cd /home/oncall && git checkout -b v1.2.3-modification
Install oncall dependencies
apt install -y libssl-dev libxml2-dev libxslt1-dev libsasl2-dev
python3-dev libldap2-dev python3-pip python3-setuptools mysql-client mysql-server
Upgrade pip
python3 -m pip install --upgrade pip
Install pip pkg dependencies to avoid errors whe upgrading packages in next step
apt install -y libcairo2-dev libgirepository1.0-dev
Upgrade all outdated pip packages
python3 -m pip list --outdated --format=freeze | grep -v '^-e' | cut -d = -f 1 | xargs -n1 python3 -m pip install -U
⚠️ Received and Ignored the following errors:
ERROR: Cannot uninstall 'pygobject'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
ERROR: Cannot uninstall 'pyxdg'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall
Install pip pkgs utilized by .github/workflows/create-release-and-publish.yml (may be unnecessary for making from source)
python3 -m pip install setuptools wheel twine
Install following to resolve PyYaml errors incurred when making onCall
apt install -y libyaml-dev libpython2.7-dev
Commit history is presently available only in the early-notification/Docker/images/oncall:dev.tar.gz
docker image. Until the original modifications are pushed to aoc-pathfinder
, commit history may be viewed vis the following:
load
the aforementioned imagerun
it as a containerexec
into that containergit log --reflog
Pull down image, load, exec and see following commits in branch v1.2.3-modification
Commit History (v1.2.3-modification
):
- d344b2c: Modified interpreters from python to python3
- 6277930: Converted all 'python' and 'pip install' calls to their python3 equivalents
Set mysql_native_password
as auth plugin so passwords may be utilized
Note: By default, mysql
on ubuntu:bionic
utilizes the 'auth_socket' auth plugin causing mysql+pymysql
to fail to auth w/ a password; additional details here. Note: You may verify the current plugin by doing mysql> SELECT plugin from mysql.user where User="root";
service mysql start &&
mysql mysql -e "UPDATE user SET plugin='mysql_native_password' WHERE User='root';FLUSH PRIVILEGES;" &&
service mysql restart
Set mysql root password
mysql_secure_installation && service mysql restart Responses: [No, 1234, 1234, Yes. Yes, Yes, Yes]
Disable ONLY_FULL_GROUP_BY mysql mode as described here Note: these commands need to be run @ each mysql restart
mysql -u root -p1234 -e " SET SESSION sql_mode = sys.list_drop(@@SESSION.sql_mode, 'ONLY_FULL_GROUP_BY'); SET GLOBAL sql_mode = sys.list_drop(@@GLOBAL.sql_mode, 'ONLY_FULL_GROUP_BY'); CREATE DATABASE oncall; "
Load Schema
mysql -u root -p1234 < /home/oncall/db/schema.v0.sql
Load Mock Data
mysql -u root -p1234 -o oncall < /home/oncall/db/dummy_data.sql
python3 setup.py develop &&
python3 -m pip install -e '.[dev]'
python -m pip install -e '.[dev]'
python3 setup.py develop &&
oncall-dev ./configs/config.yaml