X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=5c6e25314f663b23f938cf4563666e5975c6b575;hb=d824bdd5f19a87bfcad6c1ef349c00af5507f369;hp=cd82909a56e01a4151c649d445640d8f1e09345a;hpb=afa54c7dbc0904c09ec20b41b9b603fe4cb7263d;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index cd82909a..5c6e2531 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -646,7 +646,7 @@ function generate_docker_images() { BUILD_ARGS+=(--build-arg RELEASE="$RELEASE") BUILD_ARGS+=(--build-arg REPOSITORY_KEY="$REPOSITORY_KEY") BUILD_ARGS+=(--build-arg REPOSITORY_BASE="$REPOSITORY_BASE") - + if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q KAFKA ; then sg docker -c "docker pull wurstmeister/zookeeper" || FATAL "cannot get zookeeper docker image" sg docker -c "docker pull wurstmeister/kafka:${KAFKA_TAG}" || FATAL "cannot get kafka docker image" @@ -656,6 +656,10 @@ function generate_docker_images() { sg docker -c "docker pull mongo" || FATAL "cannot get mongo docker image" fi + if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q PROMETHEUS ; then + sg docker -c "docker pull prom/prometheus:${PROMETHEUS_TAG}" || FATAL "cannot get prometheus docker image" + fi + if [ -n "$PULL_IMAGES" ]; then sg docker -c "docker pull ${DOCKER_USER}/mon:${OSM_DOCKER_TAG}" || FATAL "cannot pull MON docker image" sg docker -c "docker pull ${DOCKER_USER}/pol:${OSM_DOCKER_TAG}" || FATAL "cannot pull POL docker image" @@ -722,6 +726,7 @@ function cmp_overwrite() { function generate_config_log_folders() { echo "Generating config and log folders" $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml + $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus.yml $OSM_DOCKER_WORK_DIR/prometheus.yml echo "Finished generation of config and log folders" } @@ -791,6 +796,10 @@ function deploy_lightweight() { OSM_KEYSTONE_PORT=5000 OSM_UI_PORT=80 OSM_MON_PORT=8662 + OSM_PROM_PORT=9090 + OSM_PROM_HOSTPORT=9091 + [ -n "$INSTALL_ELK" ] && OSM_ELK_PORT=5601 + [ -n "$INSTALL_PERFMON" ] && OSM_PM_PORT=3000 if [ -n "$NO_HOST_PORTS" ]; then OSM_PORTS+=(OSM_NBI_PORTS=$OSM_NBI_PORT) @@ -798,18 +807,25 @@ function deploy_lightweight() { OSM_PORTS+=(OSM_KEYSTONE_PORTS=$OSM_KEYSTONE_PORT) OSM_PORTS+=(OSM_UI_PORTS=$OSM_UI_PORT) OSM_PORTS+=(OSM_MON_PORTS=$OSM_MON_PORT) + OSM_PORTS+=(OSM_PROM_PORTS=$OSM_PROM_PORT) + [ -n "$INSTALL_PERFMON" ] && OSM_PORTS+=(OSM_PM_PORTS=$OSM_PM_PORT) + [ -n "$INSTALL_ELK" ] && OSM_PORTS+=(OSM_ELK_PORTS=$OSM_ELK_PORT) else OSM_PORTS+=(OSM_NBI_PORTS=$OSM_NBI_PORT:$OSM_NBI_PORT) OSM_PORTS+=(OSM_RO_PORTS=$OSM_RO_PORT:$OSM_RO_PORT) OSM_PORTS+=(OSM_KEYSTONE_PORTS=$OSM_KEYSTONE_PORT:$OSM_KEYSTONE_PORT) OSM_PORTS+=(OSM_UI_PORTS=$OSM_UI_PORT:$OSM_UI_PORT) OSM_PORTS+=(OSM_MON_PORTS=$OSM_MON_PORT:$OSM_MON_PORT) + OSM_PORTS+=(OSM_PROM_PORTS=$OSM_PROM_HOSTPORT:$OSM_PROM_PORT) + [ -n "$INSTALL_PERFMON" ] && OSM_PORTS+=(OSM_PM_PORTS=$OSM_PM_PORT:$OSM_PM_PORT) + [ -n "$INSTALL_ELK" ] && OSM_PORTS+=(OSM_ELK_PORTS=$OSM_ELK_PORT:$OSM_ELK_PORT) fi echo "export ${OSM_PORTS[@]}" | $WORKDIR_SUDO tee $OSM_DOCKER_WORK_DIR/osm_ports.sh echo "export OSM_NETWORK=net${OSM_STACK_NAME}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh echo "export TAG=${OSM_DOCKER_TAG}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh echo "export DOCKER_USER=${DOCKER_USER}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh echo "export KAFKA_TAG=${KAFKA_TAG}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh + echo "export PROMETHEUS_TAG=${PROMETHEUS_TAG}" | $WORKDIR_SUDO tee --append $OSM_DOCKER_WORK_DIR/osm_ports.sh @@ -904,7 +920,7 @@ function install_lightweight() { # if no host is passed in, we need to install lxd/juju, unless explicilty asked not to if [ -z "$OSMLCM_VCA_HOST" ] && [ -z "$INSTALL_NOLXD" ]; then - need_packages_lw="lxd" + need_packages_lw="lxd snapd" echo -e "Checking required packages: $need_packages_lw" dpkg -l $need_packages_lw &>/dev/null \ || ! echo -e "One or several required packages are not installed. Updating apt cache requires root privileges." \ @@ -1069,6 +1085,7 @@ OSM_WORK_DIR="/etc/osm" OSM_DOCKER_TAG=latest DOCKER_USER=osm KAFKA_TAG=2.11-1.0.2 +PROMETHEUS_TAG=v2.4.3 while getopts ":hy-:b:r:k:u:R:l:p:D:o:m:H:S:s:w:t:" o; do case "${o}" in