Merge v8.0 Into Master
This is a combination of all the commits.
=======================================================================
Enable Robot Tests
Enabling robot tests in CI/CD pipeline
Propagate the parameter DO_ROBOT to stage_3-merge
Setting OSM_HOSTNAME for robot test execution
Adding prometheus_hostname env variable for ci/cd tests
Archive containers logs in robot test execution
Signed-off-by: beierlm <mark.beierl@canonical.com>
Author: Felipe Vicens <felipe.vicens@atos.net>
8716 - K8s Proxy Charms
This commit contains the following changes:
- Changes to LCM Charm to configure vca k8s cloud
- K8s installation:
- Add storageclass to K8s
- Add k8s to VCA
- Configure lcm.env to pass k8s cloud name
- Pass k8s cloud name to LCM Charm in charmed
installation
- Pin juju version tu 2.8/stable
- Instal juju after Microk8s in charmed
installation
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
Add PLA charm
Signed-off-by: David Garcia <david.garcia@canonical.com>
Add NG-UI Charm
Signed-off-by: David Garcia <david.garcia@canonical.com>
Fix bugs in NG-UI charm
Signed-off-by: David Garcia <david.garcia@canonical.com>
Updated Dockerfiles to use ReleaseEIGHT-daily repo by default
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Fix bug 1124: K8s added to juju after k8s has been initialized
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Helm and k8s storage initialization for k8s-based installation
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Fix bug 1125: iptables must be installed and configured if not present
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Fix bug 1129: juju_addk8s requires the storage class
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Fix issue in UI charm
Scale policy is only available in stateful pods
Signed-off-by: David Garcia <david.garcia@canonical.com>
Adds image overlay to bundle
When installing using a bundle, the image overlay was not being
generated, resulting in the --tag option being ignored.
Bug 1130
Signed-off-by: beierlm <mark.beierl@canonical.com>
Fix uninstall process, will fix issues is daily-stage4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Fix PLA relations, add missing ENVs, and include it in the bundle
Signed-off-by: David Garcia <david.garcia@canonical.com>
Fix 1127 bug: Use config instead of resources for SSL certificates
Signed-off-by: David Garcia <david.garcia@canonical.com>
Remove unused config from PLA overlayx
Signed-off-by: David Garcia <david.garcia@canonical.com>
Installer: refactor file generation, improved ng-ui and light-ui separation, fixes in PLA
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Pin libjuju version to 2.8.2
This fixes bug 1144
Signed-off-by: David Garcia <david.garcia@canonical.com>
Pin libjuju version to 2.8.2
Fixes bug 1144
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
Remove api_proxy variable in charmed installer
- Fixes bug 1154
Signed-off-by: David Garcia <david.garcia@canonical.com>
Add waiting period to Storage Class creation
This commit adds a waiting period until the
storage class is available.
It also fixes a minor bug in the juju add-k8s
command.
This fixes Bug 1155
Signed-off-by: Dominik Fleischmann <dominik.fleischmann@canonical.com>
Remove api_proxy from osm bundles
Signed-off-by: David Garcia <david.garcia@canonical.com>
Make Charmed Installer Idempotent
By default, the charmed installer will create a controller called
'controller', unless an external VCA is specified using the --vca
option. Upon uninstall, it is not known or safe to remove this
Juju controller as there might be other applications using it.
This change shows that message on uninstall, giving the user the
opportunity to remove it with a command.
Also, as part of the installation, this change checks for the
controller and if it exists, presents the user with options for
how to resolve the situation.
Fixes bug 1126
Signed-off-by: beierlm <mark.beierl@canonical.com>
Remove unneeded mysql interface in PLA, fix osm-ha bundle, and add README.md to bundles
Signed-off-by: David Garcia <david.garcia@canonical.com>
Expose NBI and NG-UI
Adds ingress rules for K8s installation to expose the NBI, the
NG-UI and allow for unlimited content size.
Fixes bug 1171
Signed-off-by: beierlm <mark.beierl@canonical.com>
Installer Quits Too Soon
Increases the timeout and provides more feedback on progress.
Signed-off-by: beierlm <mark.beierl@canonical.com>
Change in returned storage status format from microk8s
Signed-off-by: calvinosanc1 <guillermo.calvino@canonical.com>
========================================================================================
Change-Id: I9223675bb9ad25a0da1f20215e79ef392e544eb5
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh
index e1c9175..9d1fca1 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -210,7 +210,6 @@
fi
remove_k8s_namespace $OSM_STACK_NAME
else
-
remove_stack $OSM_STACK_NAME
remove_stack osm_elk
fi
@@ -218,7 +217,6 @@
newgrp docker << EONG
docker image rm ${DOCKER_USER}/ro:${OSM_DOCKER_TAG}
docker image rm ${DOCKER_USER}/lcm:${OSM_DOCKER_TAG}
- docker image rm ${DOCKER_USER}/light-ui:${OSM_DOCKER_TAG}
docker image rm ${DOCKER_USER}/keystone:${OSM_DOCKER_TAG}
docker image rm ${DOCKER_USER}/nbi:${OSM_DOCKER_TAG}
docker image rm ${DOCKER_USER}/mon:${OSM_DOCKER_TAG}
@@ -228,14 +226,10 @@
EONG
if [ -n "$NGUI" ]; then
- newgrp docker << EONG
- docker image rm ${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}
-EONG
+ sg docker -c "docker image rm ${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}"
else
- newgrp docker << EONG
- docker image rm ${DOCKER_USER}/light-ui:${OSM_DOCKER_TAG}
-EONG
- fi
+ sg docker -c "docker image rm ${DOCKER_USER}/light-ui:${OSM_DOCKER_TAG}"
+ fi
if [ -n "$KUBERNETES" ]; then
OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}"
@@ -250,7 +244,7 @@
[ -z "$CONTROLLER_NAME" ] && sg lxd -c "juju destroy-controller --destroy-all-models --yes $OSM_STACK_NAME"
fi
remove_crontab_job
- uninstall_osmclient
+ [ -z "$INSTALL_NOHOSTCLIENT" ] && uninstall_osmclient
echo "Some docker images will be kept in case they are used by other docker stacks"
echo "To remove them, just run 'docker image prune' in a terminal"
return 0
@@ -259,7 +253,7 @@
#Safe unattended install of iptables-persistent
function check_install_iptables_persistent(){
echo -e "\nChecking required packages: iptables-persistent"
- if dpkg -l iptables-persistent &>/dev/null; then
+ if ! dpkg -l iptables-persistent &>/dev/null; then
echo -e " Not installed.\nInstalling iptables-persistent requires root privileges"
echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections
echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections
@@ -422,7 +416,7 @@
function install_juju() {
echo "Installing juju"
- sudo snap install juju --classic --channel=2.7/stable
+ sudo snap install juju --classic --channel=2.8/stable
[[ ":$PATH": != *":/snap/bin:"* ]] && PATH="/snap/bin:${PATH}"
update_juju_images
echo "Finished installation of juju"
@@ -436,6 +430,11 @@
sg lxd -c "juju bootstrap --bootstrap-series=xenial $OSM_VCA_CLOUDNAME $OSM_STACK_NAME"
fi
[ $(juju controllers | awk "/^${OSM_STACK_NAME}[\*| ]/{print $1}"|wc -l) -eq 1 ] || FATAL "Juju installation failed"
+ juju controller-config features=[k8s-operators]
+}
+
+function juju_addk8s() {
+ cat $HOME/.kube/config | juju add-k8s $OSM_VCA_K8S_CLOUDNAME --controller $OSM_STACK_NAME --storage openebs-hostpath
}
function juju_createproxy() {
@@ -581,6 +580,48 @@
fi
}
+function generate_docker_compose_files() {
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml
+ if [ -n "$NGUI" ]; then
+ # For NG-UI
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-ngui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml
+ else
+ # Docker-compose
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-lightui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml
+ fi
+ if [ -n "$INSTALL_PLA" ]; then
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/osm_pla/docker-compose.yaml $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml
+ fi
+}
+
+function generate_k8s_manifest_files() {
+ #Kubernetes resources
+ $WORKDIR_SUDO cp -bR ${OSM_DEVOPS}/installers/docker/osm_pods $OSM_DOCKER_WORK_DIR
+ if [ -n "$NGUI" ]; then
+ $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/light-ui.yaml
+ else
+ $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/ng-ui.yaml
+ fi
+}
+
+function generate_prometheus_grafana_files() {
+ [ -n "$KUBERNETES" ] && return
+ # Prometheus files
+ $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus/prometheus.yml $OSM_DOCKER_WORK_DIR/prometheus/prometheus.yml
+
+ # Grafana files
+ $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/grafana
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/dashboards-osm.yml $OSM_DOCKER_WORK_DIR/grafana/dashboards-osm.yml
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/datasource-prometheus.yml $OSM_DOCKER_WORK_DIR/grafana/datasource-prometheus.yml
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-sample-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-sample-dashboard.json
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-system-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-system-dashboard.json
+
+ # Prometheus Exporters files
+ $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus_exporters
+ $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus_exporters/node_exporter.service $OSM_DOCKER_WORK_DIR/prometheus_exporters/node_exporter.service
+}
+
function generate_docker_env_files() {
echo "Doing a backup of existing env files"
$WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/keystone-db.env{,~}
@@ -594,38 +635,6 @@
$WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/ro.env{,~}
echo "Generating docker env files"
- if [ -n "$KUBERNETES" ]; then
- #Kubernetes resources
- $WORKDIR_SUDO cp -bR ${OSM_DEVOPS}/installers/docker/osm_pods $OSM_DOCKER_WORK_DIR
- [ -n "$NGUI" ] && $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/osm_pods/ng-ui.yaml $OSM_K8S_WORK_DIR/ng-ui.yaml && $WORKDIR_SUDO rm $OSM_K8S_WORK_DIR/light-ui.yaml
- else
- if [ -n "$NGUI" ]; then
- # For NG-UI
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-ngui.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml
- else
- # Docker-compose
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml
- fi
- if [ -n "$INSTALL_PLA" ]; then
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/osm_pla/docker-compose.yaml $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml
- fi
-
- # Prometheus files
- $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus/prometheus.yml $OSM_DOCKER_WORK_DIR/prometheus/prometheus.yml
-
- # Grafana files
- $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/grafana
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/dashboards-osm.yml $OSM_DOCKER_WORK_DIR/grafana/dashboards-osm.yml
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/datasource-prometheus.yml $OSM_DOCKER_WORK_DIR/grafana/datasource-prometheus.yml
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-sample-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-sample-dashboard.json
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/grafana/osm-system-dashboard.json $OSM_DOCKER_WORK_DIR/grafana/osm-system-dashboard.json
-
- # Prometheus Exporters files
- $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/prometheus_exporters
- $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/prometheus_exporters/node_exporter.service $OSM_DOCKER_WORK_DIR/prometheus_exporters/node_exporter.service
- fi
-
# LCM
if [ ! -f $OSM_DOCKER_WORK_DIR/lcm.env ]; then
echo "OSMLCM_DATABASE_COMMONKEY=${OSM_DATABASE_COMMONKEY}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lcm.env
@@ -675,6 +684,12 @@
$WORKDIR_SUDO sed -i "s|OSMLCM_VCA_CLOUD.*|OSMLCM_VCA_CLOUD=${OSM_VCA_CLOUDNAME}|g" $OSM_DOCKER_WORK_DIR/lcm.env
fi
+ if ! grep -Fq "OSMLCM_VCA_K8S_CLOUD" $OSM_DOCKER_WORK_DIR/lcm.env; then
+ echo "OSMLCM_VCA_K8S_CLOUD=${OSM_VCA_K8S_CLOUDNAME}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lcm.env
+ else
+ $WORKDIR_SUDO sed -i "s|OSMLCM_VCA_K8S_CLOUD.*|OSMLCM_VCA_K8S_CLOUD=${OSM_VCA_K8S_CLOUDNAME}|g" $OSM_DOCKER_WORK_DIR/lcm.env
+ fi
+
# RO
MYSQL_ROOT_PASSWORD=$(generate_secret)
if [ ! -f $OSM_DOCKER_WORK_DIR/ro-db.env ]; then
@@ -776,6 +791,26 @@
sudo chown $(id -u):$(id -g) $HOME/.kube/config
}
+function install_k8s_storageclass() {
+ kubectl apply -f https://openebs.github.io/charts/openebs-operator-1.6.0.yaml
+ local storageclass_timeout=300
+ local counter=0
+ echo "Waiting for storageclass"
+ while (( counter < storageclass_timeout ))
+ do
+ kubectl get storageclass openebs-hostpath &> /dev/null
+
+ if [ $? -eq 0 ] ; then
+ echo "Storageclass available"
+ break
+ else
+ counter=$((counter + 15))
+ sleep 15
+ fi
+ done
+ kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
+}
+
#deploys flannel as daemonsets
function deploy_cni_provider() {
CNI_DIR="$(mktemp -d -q --tmpdir "flannel.XXXXXX")"
@@ -811,8 +846,6 @@
}
function deploy_osm_pla_service() {
- # corresponding to parse_yaml
- [ ! $OSM_DOCKER_TAG == "7" ] && $WORKDIR_SUDO sed -i "s/opensourcemano\/pla:.*/opensourcemano\/pla:$OSM_DOCKER_TAG/g" $OSM_DOCKER_WORK_DIR/osm_pla/pla.yaml
# corresponding to namespace_vol
$WORKDIR_SUDO sed -i "s#path: /var/lib/osm#path: $OSM_NAMESPACE_VOL#g" $OSM_DOCKER_WORK_DIR/osm_pla/pla.yaml
# corresponding to deploy_osm_services
@@ -824,6 +857,7 @@
helm > /dev/null 2>&1
if [ $? != 0 ] ; then
# Helm is not installed. Install helm
+ echo "Helm is not installed, installing ..."
curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz --output helm-v2.15.2.tar.gz
tar -zxvf helm-v2.15.2.tar.gz
sudo mv linux-amd64/helm /usr/local/bin/helm
@@ -841,14 +875,17 @@
helm init --service-account tiller
# Wait for Tiller to be up and running. If timeout expires, continue installing
- tiller_timeout=120; counter=0
+ tiller_timeout=120;
+ counter=0;
+ tiller_status=""
while (( counter < tiller_timeout ))
do
tiller_status=`kubectl -n kube-system get deployment.apps/tiller-deploy --no-headers | awk '{print $2'}`
- ( [ ! -z "$tiller_status" ] && [ $tiller_status == "1/1" ] ) && break
- num=$((counter + 2))
- sleep 2
+ ( [ ! -z "$tiller_status" ] && [ $tiller_status == "1/1" ] ) && echo "Tiller ready" && break
+ counter=$((counter + 5))
+ sleep 5
done
+ [ "$tiller_status" != "1/1" ] && echo "Tiller is NOT READY YET. Installation will continue"
fi
}
@@ -858,6 +895,7 @@
for osm in $osm_services; do
$WORKDIR_SUDO sed -i "s/opensourcemano\/$osm:.*/$DOCKER_USER\/$osm:$TAG/g" $OSM_K8S_WORK_DIR/$osm.yaml
done
+ $WORKDIR_SUDO sed -i "s/opensourcemano\/pla:.*/$DOCKER_USER\/\/pla:$OSM_DOCKER_TAG/g" $OSM_DOCKER_WORK_DIR/osm_pla/pla.yaml
}
function namespace_vol() {
@@ -933,9 +971,10 @@
pushd $OSM_DOCKER_WORK_DIR
if [ -n "$INSTALL_PLA" ]; then
- sg docker -c ". ./osm_ports.sh; docker stack deploy -c $OSM_DOCKER_WORK_DIR/docker-compose.yaml -c $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml $OSM_STACK_NAME"
+ track deploy_osm_pla
+ sg docker -c ". ./osm_ports.sh; docker stack deploy -c $OSM_DOCKER_WORK_DIR/docker-compose.yaml -c $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml -c $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml $OSM_STACK_NAME"
else
- sg docker -c ". ./osm_ports.sh; docker stack deploy -c $OSM_DOCKER_WORK_DIR/docker-compose.yaml $OSM_STACK_NAME"
+ sg docker -c ". ./osm_ports.sh; docker stack deploy -c $OSM_DOCKER_WORK_DIR/docker-compose.yaml -c $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml $OSM_STACK_NAME"
fi
popd
@@ -1010,12 +1049,6 @@
}
function install_lightweight() {
- [ "${OSM_STACK_NAME}" == "osm" ] || OSM_DOCKER_WORK_DIR="$OSM_WORK_DIR/stack/$OSM_STACK_NAME"
- [ -n "$KUBERNETES" ] && OSM_K8S_WORK_DIR="$OSM_DOCKER_WORK_DIR/osm_pods" && OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}"
- [ ! -d "$OSM_DOCKER_WORK_DIR" ] && $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR
- [ ! -d "$OSM_DOCKER_WORK_DIR/osm_pla" -a -n "$INSTALL_PLA" ] && $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/osm_pla
- [ -n "$KUBERNETES" ] && $WORKDIR_SUDO cp -b $OSM_DEVOPS/installers/docker/cluster-config.yaml $OSM_DOCKER_WORK_DIR/cluster-config.yaml
-
track checkingroot
[ "$USER" == "root" ] && FATAL "You are running the installer as root. The installer is prepared to be executed as a normal user with sudo privileges."
track noroot
@@ -1147,6 +1180,11 @@
[ -n "$INSTALL_NODOCKER" ] || install_docker_ce
track docker_ce
+ echo "Creating folders for installation"
+ [ ! -d "$OSM_DOCKER_WORK_DIR" ] && $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR
+ [ ! -d "$OSM_DOCKER_WORK_DIR/osm_pla" -a -n "$INSTALL_PLA" ] && $WORKDIR_SUDO mkdir -p $OSM_DOCKER_WORK_DIR/osm_pla
+ [ -n "$KUBERNETES" ] && $WORKDIR_SUDO cp -b $OSM_DEVOPS/installers/docker/cluster-config.yaml $OSM_DOCKER_WORK_DIR/cluster-config.yaml
+
#Installs Kubernetes and deploys osm services
if [ -n "$KUBERNETES" ]; then
install_kube
@@ -1163,7 +1201,15 @@
[ -z "$DOCKER_NOBUILD" ] && generate_docker_images
track docker_build
+ if [ -n "$KUBERNETES" ]; then
+ generate_k8s_manifest_files
+ else
+ generate_docker_compose_files
+ fi
+ track manifest_files
+ generate_prometheus_grafana_files
generate_docker_env_files
+ track env_files
if [ -n "$KUBERNETES" ]; then
if [ -n "$INSTALL_K8S_MONITOR" ]; then
@@ -1175,13 +1221,14 @@
remove_k8s_namespace $OSM_STACK_NAME
deploy_cni_provider
kube_secrets
- [ ! $OSM_DOCKER_TAG == "7" ] && parse_yaml $OSM_DOCKER_TAG
+ [ ! $OSM_DOCKER_TAG == "8" ] && parse_yaml $OSM_DOCKER_TAG
namespace_vol
taint_master_node
deploy_osm_services
if [ -n "$INSTALL_PLA"]; then
# optional PLA install
deploy_osm_pla_service
+ track deploy_osm_pla
fi
track deploy_osm_services_k8s
install_k8s_storageclass
@@ -1210,7 +1257,7 @@
[ -z "$INSTALL_NOHOSTCLIENT" ] && install_osmclient
track osmclient
-
+
echo -e "Checking OSM health state..."
if [ -n "$KUBERNETES" ]; then
$OSM_DEVOPS/installers/osm_health.sh -s ${OSM_STACK_NAME} -k || \
@@ -1228,7 +1275,6 @@
[ -n "$KUBERNETES" ] && add_local_k8scluster
track add_local_k8scluster
-
wget -q -O- https://osm-download.etsi.org/ftp/osm-8.0-eight/README2.txt &> /dev/null
track end
return 0
@@ -1404,6 +1450,7 @@
OSM_VCA_SECRET=
OSM_VCA_PUBKEY=
OSM_VCA_CLOUDNAME="localhost"
+OSM_VCA_K8S_CLOUDNAME="k8scloud"
OSM_STACK_NAME=osm
NO_HOST_PORTS=""
DOCKER_NOBUILD=""
@@ -1605,22 +1652,6 @@
${OSM_DEVOPS}/installers/charmed_uninstall.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t $DOCKER_TAG "$@"
else
${OSM_DEVOPS}/installers/charmed_install.sh -R $RELEASE -r $REPOSITORY -u $REPOSITORY_BASE -D /usr/share/osm-devops -t $DOCKER_TAG "$@"
-
- echo "Your installation is now complete, follow these steps for configuring the osmclient:"
- echo
- echo "1. Get the NBI IP with the following command:"
- echo
- echo NBI_IP='`juju status --format json | jq -rc '"'"'.applications."nbi-k8s".address'"'"'`'
- echo
- echo "2. Create the OSM_HOSTNAME environment variable with the NBI IP"
- echo
- echo "export OSM_HOSTNAME=\$NBI_IP"
- echo
- echo "3. Add the previous command to your .bashrc for other Shell sessions"
- echo
- echo "echo \"export OSM_HOSTNAME=\$NBI_IP\" >> ~/.bashrc"
- echo
- echo "DONE"
fi
exit 0
@@ -1670,6 +1701,8 @@
. $OSM_DEVOPS/common/all_funcs
+[ "${OSM_STACK_NAME}" == "osm" ] || OSM_DOCKER_WORK_DIR="$OSM_WORK_DIR/stack/$OSM_STACK_NAME"
+[ -n "$KUBERNETES" ] && OSM_K8S_WORK_DIR="$OSM_DOCKER_WORK_DIR/osm_pods" && OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}"
[ -n "$INSTALL_LIGHTWEIGHT" ] && [ -n "$UNINSTALL" ] && uninstall_lightweight && echo -e "\nDONE" && exit 0
[ -n "$INSTALL_ONLY" ] && [ -n "$INSTALL_ELK" ] && deploy_elk
#[ -n "$INSTALL_ONLY" ] && [ -n "$INSTALL_PERFMON" ] && deploy_perfmon