montagu-bb8
January 22, 2019 ยท View on GitHub
Performs local backup between our servers. This wraps bb8 with Montagu specific bits. Essentially this is just the bb8 repo with a config file at the top level.
Setup
Steps taken to set up the annex
- Clone this repo anywhere
git clone https://github.com/vimc/montagu-bb8 --recursive
- Run
./bb8/setup_starportas root, passing in the directory location of the starport and the user to runbb8as
sudo ./bb8/setup_starport /mnt/data/starport montagu
That's it. Note that this will create a symlink ~montagu/starport to the actual starport at /mnt/data/starport
Support
Steps taken to set up Support:
- As the
montaguuser, clone this repository into themontaguuser home directory
git clone https://github.com/vimc/montagu-bb8 --recursive
- Set up the global
bb8link with
sudo ./montagu-bb8/bb8/bb8_link_write
(this is the only step that requires root privileges)
- To use, from the
montagu-bb8directory run
./bb8/setup config.json teamcity vault registry
See https://github.com/vimc/bb8#setup-leaf-machine for more explanation. If prompted, please configure scheduling as directed.
- To upgrade, pull the latest changes and repeat the
setupstep.
Production
bb8 is configured by the deploy task. On initial setup, you will need to run, as the montagu user:
sudo ~/montagu/montagu-bb8/bb8/bb8_link_write
to install the link to the bb8 script globally (you will be prompted if it is not configured correctly).
Annex
On the annex, after successfully setting up bb8 and barman, run
./montagu-bb8/scripts/schedule-barman-montagu-nightly
which will configure a nightly job that will create a restorable copy of the montagu database and put it via bb8 into the starport.
To upgrade bb8, as the montagu user:
-
Navigate to
~/montagu-bb8and pull the latest changes. -
From the
montagu-bb8directory, configurebb8by running:
./bb8/setup config.json barman_to_starport