4
# Purge and reinstall juju and related tools on the master and all jenkins slaves
5
apps="osci osci-task osci-lab osci-slave"
7
# Optionally inject this to clean up and force reinstall
8
#sudo apt-get remove juju juju-core juju-1.25 juju-2.0 juju-local juju-mongodb mojo \
9
# juju-deployer python-jujuclient python-juju-deployer python3-juju-deployer \
10
# amulet python-amulet python3-amulet charm charm-tools \
11
# python-theblues python-libcharmstore python-jujubundlelib -y ||:&&\
13
# NOTE: it is necessary to munge symlinks for now, as the 1.25 ppa packaging is
14
# actually intended for Trusty (update-alternatives), and otherwise conflicts
15
# badly on Xenial. https://bugs.launchpad.net/bugs/1646909
17
cmds="export JUJU_HOME=$HOME/.juju &&\
18
sudo apt-get autoremove -y ||:&&\
19
sudo add-apt-repository ppa:juju/1.25 -y &&\
20
sudo add-apt-repository ppa:juju/1.25-proposed -y &&\
21
sudo add-apt-repository ppa:juju/stable -y &&\
22
sudo add-apt-repository ppa:juju/proposed -y &&\
23
sudo add-apt-repository ppa:mojo-maintainers/ppa -y &&\
24
sudo apt-get update -y &&\
25
sudo apt-get install juju juju-core mojo charm lxd zfsutils-linux -y &&\
26
sudo apt-get install python-juju-deployer python3-juju-deployer &&\ # https://bugs.launchpad.net/bugs/1644922
27
sudo usermod -aG mojo jenkins &&\
28
sudo ln -fs /usr/lib/juju-1.25.9/bin/juju /usr/bin/juju &&\
29
sudo ln -fs /usr/lib/juju-1.25.9/bin/juju /usr/bin/juju-1.25 &&\
36
echo "========== ${app} =========="
37
juju run --service $app "$cmds"