Merge "Install latest stable version of Juju"
[osm/devops.git] / installers / full_install_osm.sh
index 48f2cae..7b45761 100755 (executable)
@@ -631,7 +631,7 @@ function install_docker_compose() {
 
 function install_juju() {
     echo "Installing juju"
-    sudo snap install juju --classic --channel=2.5/stable
+    sudo snap install juju --classic
     [ -z "$INSTALL_NOLXD" ] && sudo dpkg-reconfigure -p medium lxd
     echo "Finished installation of juju"
     return 0
@@ -646,6 +646,10 @@ function juju_createcontroller() {
 }
 
 function juju_createproxy() {
+    echo -e "\nChecking required packages: iptables-persistent"
+    dpkg -l iptables-persistent &>/dev/null || ! echo -e "    Not installed.\nInstalling iptables-persistent requires root privileges" || \
+    sudo DEBIAN_FRONTEND=noninteractive apt-get -yq install iptables-persistent
+
     if ! sudo iptables -t nat -C PREROUTING -p tcp -m tcp --dport 17070 -j DNAT --to-destination $OSM_VCA_HOST; then
         sudo iptables -t nat -A PREROUTING -p tcp -m tcp --dport 17070 -j DNAT --to-destination $OSM_VCA_HOST
         sudo netfilter-persistent save