X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=84249a5db114640a609fe2f24b02eb5f1777bea8;hb=3a1db657765884d4fd6dec4f0eba2e6996f445ad;hp=96d8b8b72a60c10b46b2c69250476eecc3dd57a5;hpb=961550439e2328d4c03d50cf83a04645abbc5175;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 96d8b8b7..84249a5d 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -34,7 +34,6 @@ function usage(){ echo -e " -H use specific juju host controller IP" echo -e " -S use VCA/juju secret key" echo -e " -P use VCA/juju public key file" - echo -e " -C use VCA/juju CA certificate file" echo -e " -A use VCA/juju API proxy" echo -e " --pla: install the PLA module for placement support" echo -e " -m : install OSM but only rebuild or pull the specified docker images (NG-UI, NBI, LCM, RO, MON, POL, PLA, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE)" @@ -154,33 +153,6 @@ function check_packages() { echo -e "Required packages are present: ${NEEDED_PACKAGES}" } -function install_lxd() { - [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function - # Apply sysctl production values for optimal performance - sudo cp ${OSM_DEVOPS}/installers/60-lxd-production.conf /etc/sysctl.d/60-lxd-production.conf - sudo sysctl --system - - # Install LXD snap - sudo apt-get remove --purge -y liblxc1 lxc-common lxcfs lxd lxd-client - sudo snap install lxd --channel $LXD_VERSION/stable - - # Configure LXD - sudo usermod -a -G lxd `whoami` - cat ${OSM_DEVOPS}/installers/lxd-preseed.conf | sed 's/^config: {}/config:\n core.https_address: '$DEFAULT_IP':8443/' | sg lxd -c "lxd init --preseed" - sg lxd -c "lxd waitready" - DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}') - [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}') - [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0" - DEFAULT_MTU=$(ip addr show ${DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}') - sg lxd -c "lxc profile device set default eth0 mtu $DEFAULT_MTU" - sg lxd -c "lxc network set lxdbr0 bridge.mtu $DEFAULT_MTU" - #sudo systemctl stop lxd-bridge - #sudo systemctl --system daemon-reload - #sudo systemctl enable lxd-bridge - #sudo systemctl start lxd-bridge - [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function -} - function ask_user(){ # ask to the user and parse a response among 'y', 'yes', 'n' or 'no'. Case insensitive # Params: $1 text to ask; $2 Action by default, can be 'y' for yes, 'n' for no, other or empty for not allowed @@ -215,7 +187,7 @@ function install_osmclient(){ python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt fi if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then - sudo apt-get install -y libcurl4-openssl-dev libssl-dev + sudo apt-get install -y libcurl4-openssl-dev libssl-dev libmagic1 python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt fi [ -z "$INSTALL_LIGHTWEIGHT" ] && export OSM_HOSTNAME=`lxc list | awk '($2=="SO-ub"){print $6}'` @@ -338,6 +310,7 @@ function generate_k8s_manifest_files() { [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function #Kubernetes resources sudo cp -bR ${OSM_DEVOPS}/installers/docker/osm_pods $OSM_DOCKER_WORK_DIR + sudo rm -f ${OSM_DOCKER_WORK_DIR}/osm_pods/ng-prometheus.yaml [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } @@ -656,7 +629,8 @@ function install_osm() { # if no host is passed in, we need to install lxd/juju, unless explicilty asked not to if [ -z "$OSM_VCA_HOST" ] && [ -z "$INSTALL_NOLXD" ] && [ -z "$LXD_CLOUD_FILE" ]; then - install_lxd + LXD_INSTALL_OPTS="-D ${OSM_DEVOPS} -i ${DEFAULT_IP} ${DEBUG_INSTALL}" + $OSM_DEVOPS/installers/install_lxd.sh ${LXD_INSTALL_OPTS} || FATAL_TRACK lxd "install_lxd.sh failed" fi track prereq prereqok_ok @@ -871,9 +845,6 @@ function ctrl_c() { [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } -LXD_VERSION=4.0 -JUJU_VERSION=2.9 -JUJU_AGENT_VERSION=2.9.29 UNINSTALL="" DEVELOP="" UPDATE=""