-
- Supercontest
- Ansible
- Falls back on paramiko (python) if openssh fails.
- Setup
- sudo apt install ansible (this gives ansible-playbook and others)
- added southbaysupercontest.com to /etc/ansible/hosts
- ssh-agent bash
- ssh-add ~/.ssh/digitalocean
- ansible all -a “/bin/echo hello”
- A lot of ansible’s power used to be the composition of various microservices, which docker-compose is a much simpler alternative for. It still has relevance in fleet management, however, and that’s what I’ll use it for.
- Refamiliarized myself with their documentation.
- I could just write a shell script to ssh, git pull, run the make target for docker-compose, then rsync dump files back and forth, but I’m gonna use ansible just for fun. It will enable scaling, load balancing, and more later (if need be).
- Added playbooks to deploy the whole app remotely from local, as well as backup and restore the db. You simple enter through a oneliner make call, which farms out to ansible (which goes back and calls other make recipes).
- Closed ticket #10.
- Did a few test deploy/backup/restore operations between my laptop and the production server.
- Upgraded docker-compose to 1.24 on southbaysupercontest.com. The py apt version was installed.
- Unittests
- Chromedriver
- Tested the linefetching capability in the docker container. There were holes.
- libnss3 was necessary for chromedriver.
- You also need the chrome binary. Added.
- Couldn’t verify end-to-end without some spoofing, because westgate has no lines during the offseason.
- Here is another awesome script: https://gist.github.com/ziadoz/3e8ab7e944d02fe872c3454d17af31a5. If I have any problems at the start of the 2019 season, I can just add that to app/Dockerfile.
- You can’t band-aid a poor engineering decision with software: https://www.youtube.com/watch?v=H2tuKiiznsY.
- To rebalance panes in tmux so they’re equally spaced, used ctrl-b then alt-1 (vertical) or alt-2 (horizontal).
- Python 3 natively keeps command history across interpreter sessions (like ipython does). Very convenient.