From cca9364cc14db921c22d84b8a83149e041a257c9 Mon Sep 17 00:00:00 2001 From: beierlm Date: Mon, 3 May 2021 16:29:14 -0400 Subject: [PATCH] Removal of Light-UI With the only supported UI being the NG-UI, and approval from the TSC, the Light UI is being completely removed from the build process and installers. Change-Id: I9a0c099fedcac411a0e31dce4bf64895d1092a37 Signed-off-by: beierlm --- docker/light-ui/Dockerfile | 78 ----------- .../grafana/files/summary_dashboard.json | 90 ------------ installers/charm/ui-k8s/.yamllint.yaml | 24 ---- installers/charm/ui-k8s/README.md | 117 ---------------- installers/charm/ui-k8s/config.yaml | 38 ------ installers/charm/ui-k8s/icon.svg | 119 ---------------- installers/charm/ui-k8s/layer.yaml | 22 --- installers/charm/ui-k8s/metadata.yaml | 31 ----- .../charm/ui-k8s/reactive/spec_template.yaml | 43 ------ installers/charm/ui-k8s/reactive/ui.py | 129 ------------------ installers/charm/ui-k8s/tox.ini | 62 --------- installers/docker/docker-compose-lightui.yaml | 45 ------ installers/docker/osm_pods/light-ui.yaml | 58 -------- installers/full_install_osm.sh | 84 +++--------- installers/install_osm.sh | 1 - installers/k8s/summary-dashboard.yaml | 85 ------------ installers/osm_health.sh | 4 +- jenkins/ci-pipelines/ci_stage_3.groovy | 2 +- tools/osm-report | 9 +- 19 files changed, 23 insertions(+), 1018 deletions(-) delete mode 100644 docker/light-ui/Dockerfile delete mode 100644 installers/charm/ui-k8s/.yamllint.yaml delete mode 100755 installers/charm/ui-k8s/README.md delete mode 100755 installers/charm/ui-k8s/config.yaml delete mode 100644 installers/charm/ui-k8s/icon.svg delete mode 100644 installers/charm/ui-k8s/layer.yaml delete mode 100755 installers/charm/ui-k8s/metadata.yaml delete mode 100644 installers/charm/ui-k8s/reactive/spec_template.yaml delete mode 100644 installers/charm/ui-k8s/reactive/ui.py delete mode 100644 installers/charm/ui-k8s/tox.ini delete mode 100644 installers/docker/docker-compose-lightui.yaml delete mode 100644 installers/docker/osm_pods/light-ui.yaml diff --git a/docker/light-ui/Dockerfile b/docker/light-ui/Dockerfile deleted file mode 100644 index eee94167..00000000 --- a/docker/light-ui/Dockerfile +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 2019 ETSI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM ubuntu:18.04 - -#RUN apt-get update && apt-get install -y npm git python-pip nginx supervisor curl software-properties-common libssl-dev libmysqlclient-dev mysql-client -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y curl \ - software-properties-common \ - apt-transport-https \ - git \ - python-pip \ - nginx \ - supervisor \ - libmariadbclient-dev \ - mysql-client \ - libssl-dev \ - apt-utils \ - && curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \ - && echo "deb https://deb.nodesource.com/node_10.x bionic main" | tee -a /etc/apt/sources.list.d/nodesource.list \ - && echo "deb-src https://deb.nodesource.com/node_10.x bionic main" | tee -a /etc/apt/sources.list.d/nodesource.list \ - && apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y nodejs - -RUN node -v -RUN npm -v - -RUN echo "daemon off;" >> /etc/nginx/nginx.conf - -ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian -ARG RELEASE=ReleaseNINE-daily -ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg -ARG REPOSITORY=testing -ARG LWUI_VERSION - -RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - -RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} LW-UI" && apt-get update - -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y osm-lightui${LWUI_VERSION} \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -WORKDIR /usr/share/osm-lightui -RUN npm install -g npm@latest -RUN npm install -RUN mv node_modules ./static -RUN pip install -r requirements.txt -RUN pip install uwsgi -RUN cp /usr/share/osm-lightui/nginx-app.conf /etc/nginx/sites-available/default -RUN cp /usr/share/osm-lightui/supervisor-app.conf /etc/supervisor/conf.d/ - -# delete the copy of the database inside the container (if exists) -RUN rm -f db.sqlite3 - -ENV DJANGO_ENV=prod -ENV OSM_SERVER=nbi -# ENV OSMUI_SQL_DATABASE_URI=mysql://root:secret@mysql:3306/lwui -RUN python manage.py collectstatic --noinput -RUN chmod +x /usr/share/osm-lightui/entrypoint.sh - -EXPOSE 80 - -HEALTHCHECK --start-period=130s --interval=10s --timeout=5s --retries=12 \ - CMD curl --silent --fail localhost:80 || exit 1 - -CMD ["/usr/share/osm-lightui/entrypoint.sh"] diff --git a/installers/charm/grafana/files/summary_dashboard.json b/installers/charm/grafana/files/summary_dashboard.json index b9388105..bf709d63 100644 --- a/installers/charm/grafana/files/summary_dashboard.json +++ b/installers/charm/grafana/files/summary_dashboard.json @@ -1407,96 +1407,6 @@ ], "valueName": "current" }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "datasource": "prometheus - Juju generated source", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 1, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 4, - "y": 14 - }, - "id": 79, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "pluginVersion": "6.3.5", - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "kube_deployment_status_replicas_available{deployment=\"ng-ui\"}", - "instant": true, - "refId": "A" - } - ], - "thresholds": "0,1", - "timeFrom": null, - "timeShift": null, - "title": "light-ui", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "avg" - }, { "cacheTimeout": null, "colorBackground": false, diff --git a/installers/charm/ui-k8s/.yamllint.yaml b/installers/charm/ui-k8s/.yamllint.yaml deleted file mode 100644 index d24a69d9..00000000 --- a/installers/charm/ui-k8s/.yamllint.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. ---- -extends: default - -yaml-files: - - "*.yaml" - - "*.yml" - - ".yamllint" -ignore: | - reactive/ - .tox - release/ diff --git a/installers/charm/ui-k8s/README.md b/installers/charm/ui-k8s/README.md deleted file mode 100755 index 8cfa784a..00000000 --- a/installers/charm/ui-k8s/README.md +++ /dev/null @@ -1,117 +0,0 @@ - - -# Overview - -UI for Juju CAAS - -## Testing - -The tests of this charm are done using tox and Zaza. - - - -### Prepare environment - -The machine in which the tests are run needs access to a juju k8s controller. The easiest way to approach this is by executing the following commands: - -``` -sudo apt install tox -y -sudo snap install microk8s --classic -sudo snap install juju - -microk8s.status --wait-ready -microk8s.enable storage dashboard dns - -juju bootstrap microk8s k8s-cloud -``` - -If /usr/bin/python does not exist, you should probably need to do this: - -``` -sudo ln -s /usr/bin/python3 /usr/bin/python -``` - -### Build Charm - -**Download dependencies:** - -``` -mkdir -p ~/charm/layers ~/charm/build ~/charm/interfaces -git clone --single-branch --branch master https://git.launchpad.net/canonical-osm ~/canonical-osm - -cd ~/charm/layers -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-ui ui-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-grafana grafana-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-prometheus prometheus-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-mariadb mariadb-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-lcm lcm-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-mon mon-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-nbi nbi-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-pol pol-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-osm-ro ro-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-keystone keystone-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-kafka kafka-k8s ~/charm/interfaces -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-zookeeper zookeeper-k8s -git clone --single-branch --branch=master https://git.launchpad.net/charm-k8s-mongodb mongodb-k8s - -cd ~/charm/interfaces -mv ~/canonical-osm/charms/interfaces/* . -git clone https://git.launchpad.net/interface-mongodb mongodb -git clone https://git.launchpad.net/interface-osm-mon mon -git clone https://git.launchpad.net/interface-osm-nbi osm-nbi -git clone https://git.launchpad.net/interface-osm-ro osm-ro - -``` - -**Charm structure:** - -``` -├── config.yaml -├── icon.svg -├── layer.yaml -├── metadata.yaml -├── reactive -│ ├── spec_template.yaml -│ └── ui.py -├── README.md -└── tox.ini -``` - -**Setup environment variables:** - -``` -export CHARM_LAYERS_DIR=~/charm/layers -export CHARM_BUILD_DIR=~/charm/build -export CHARM_INTERFACES_DIR=~/charm/interfaces -``` - -**Build:** - -``` -mkdir ~/charm/layers/ui-k8s/tests/build -export https_proxy=\$PROXY -charm build ~/charm/layers/ui-k8s -charm build ~/charm/layers/grafana-k8s -charm build ~/charm/layers/prometheus-k8s -charm build ~/charm/layers/mariadb-k8s -charm build ~/charm/layers/lcm-k8s -charm build ~/charm/layers/mon-k8s -charm build ~/charm/layers/nbi-k8s -charm build ~/charm/layers/pol-k8s -charm build ~/charm/layers/ro-k8s -charm build ~/charm/layers/keystone-k8s -charm build ~/charm/layers/kafka-k8s -charm build ~/charm/layers/zookeeper-k8s -charm build ~/charm/layers/mongodb-k8s -mv ~/charm/build/* ~/charm/layers/ui-k8s/tests/build/ -``` diff --git a/installers/charm/ui-k8s/config.yaml b/installers/charm/ui-k8s/config.yaml deleted file mode 100755 index ae0a1407..00000000 --- a/installers/charm/ui-k8s/config.yaml +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -options: - advertised-hostname: - description: Advertised hostname - type: string - default: "ui" - advertised-port: - description: UI Port - type: int - default: 80 - mysql_database: - description: Mysql Database for UI - type: string - default: lwui - image: - type: string - description: OCI image - default: opensourcemano/light-ui:latest - image_username: - description: Docker repository username - type: string - default: "" - image_password: - description: Docker repository password - type: string - default: "" diff --git a/installers/charm/ui-k8s/icon.svg b/installers/charm/ui-k8s/icon.svg deleted file mode 100644 index 0177a695..00000000 --- a/installers/charm/ui-k8s/icon.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - image/svg+xml - - eclispe-che - - - - - - eclispe-che - Created with Sketch. - - - - - - - - - - - - - - - - - diff --git a/installers/charm/ui-k8s/layer.yaml b/installers/charm/ui-k8s/layer.yaml deleted file mode 100644 index 40a4a70a..00000000 --- a/installers/charm/ui-k8s/layer.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -includes: - - "layer:caas-base" - - "layer:status" - - "layer:leadership" - - "layer:osm-common" - - "interface:juju-relation-mysql" - - "interface:osm-nbi" - -repo: https://code.launchpad.net/osm-k8s-bundle diff --git a/installers/charm/ui-k8s/metadata.yaml b/installers/charm/ui-k8s/metadata.yaml deleted file mode 100755 index 5c3fe9ea..00000000 --- a/installers/charm/ui-k8s/metadata.yaml +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -name: "ui-k8s" -summary: "OSM User Interface (UI)" -maintainers: - - "SolutionsQA " -description: | - A CAAS charm to deploy OSM's Northbound Interface (NBI). -tags: - - "application" -series: - - "kubernetes" -requires: - mysql: - interface: mysql - nbi: - interface: osm-nbi -deployment: - type: stateless - service: cluster diff --git a/installers/charm/ui-k8s/reactive/spec_template.yaml b/installers/charm/ui-k8s/reactive/spec_template.yaml deleted file mode 100644 index 4b3eef3e..00000000 --- a/installers/charm/ui-k8s/reactive/spec_template.yaml +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -version: 2 -containers: - - name: %(name)s - imageDetails: - imagePath: %(image)s - username: %(image_username)s - password: %(image_password)s - ports: - - containerPort: %(advertised-port)s - protocol: TCP - config: - ALLOW_ANONYMOUS_LOGIN: 'yes' - OSM_SERVER: %(nbi_host)s - OSMUI_SQL_DATABASE_URI: mysql://root:%(mysql_root_password)s@%(mysql_host)s:%(mysql_port)s/%(mysql_database)s - kubernetes: - readinessProbe: - tcpSocket: - port: %(advertised-port)s - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 - livenessProbe: - tcpSocket: - port: %(advertised-port)s - initialDelaySeconds: 30 - periodSeconds: 10 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 3 \ No newline at end of file diff --git a/installers/charm/ui-k8s/reactive/ui.py b/installers/charm/ui-k8s/reactive/ui.py deleted file mode 100644 index eb53daf2..00000000 --- a/installers/charm/ui-k8s/reactive/ui.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from charms.layer.caas_base import pod_spec_set -from charms.reactive import endpoint_from_flag -from charms.reactive import when, when_not, hook -from charms.reactive.flags import set_flag, clear_flag -from charmhelpers.core.hookenv import ( - log, - metadata, - config, -) -from charms import layer - - -@hook("upgrade-charm") -@when("leadership.is_leader") -def upgrade(): - clear_flag("ui-k8s.configured") - - -@when("config.changed") -@when("leadership.is_leader") -def restart(): - clear_flag("ui-k8s.configured") - - -@when_not("mysql.available") -@when_not("ui-k8s.configured") -@when("leadership.is_leader") -def waiting_for_mysql(): - layer.status.waiting("Waiting for mysql to be available") - - -@when_not("nbi.ready") -@when_not("ui-k8s.configured") -@when("leadership.is_leader") -def waiting_for_nbi(): - layer.status.waiting("Waiting for nbi to be available") - - -@when("mysql.available", "nbi.ready") -@when_not("ui-k8s.configured") -@when("leadership.is_leader") -def configure(): - - layer.status.maintenance("Configuring ui container") - try: - mysql = endpoint_from_flag("mysql.available") - nbi = endpoint_from_flag("nbi.ready") - nbi_unit = nbi.nbis()[0] - nbi_host = "{}".format(nbi_unit["host"]) - spec = make_pod_spec( - mysql.host(), - mysql.port(), - mysql.user(), - mysql.password(), - mysql.root_password(), - nbi_host, - ) - log("set pod spec:\n{}".format(spec)) - pod_spec_set(spec) - set_flag("ui-k8s.configured") - except Exception as e: - layer.status.blocked("k8s spec failed to deploy: {}".format(e)) - - -@when("mysql.available", "nbi.ready") -@when_not("leadership.is_leader") -def non_leaders_active(): - layer.status.active("ready") - - -@when("ui-k8s.configured") -def set_ui_active(): - layer.status.active("ready") - - -def make_pod_spec( - mysql_host, mysql_port, mysql_user, mysql_password, mysql_root_password, nbi_host -): - """Make pod specification for Kubernetes - - Args: - mysql_name (str): UI DB name - mysql_host (str): UI DB host - mysql_port (int): UI DB port - mysql_user (str): UI DB user - mysql_password (str): UI DB password - nbi_uri (str): NBI URI - Returns: - pod_spec: Pod specification for Kubernetes - """ - - with open("reactive/spec_template.yaml") as spec_file: - pod_spec_template = spec_file.read() - - md = metadata() - cfg = config() - - data = { - "name": md.get("name"), - "mysql_host": mysql_host, - "mysql_port": mysql_port, - "mysql_user": mysql_user, - "mysql_password": mysql_password, - "mysql_root_password": mysql_root_password, - "nbi_host": nbi_host, - } - data.update(cfg) - - return pod_spec_template % data - - -def get_ui_port(): - """Returns UI port""" - cfg = config() - return cfg.get("advertised-port") diff --git a/installers/charm/ui-k8s/tox.ini b/installers/charm/ui-k8s/tox.ini deleted file mode 100644 index 50375f39..00000000 --- a/installers/charm/ui-k8s/tox.ini +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2020 Canonical Ltd. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -[tox] -envlist = pep8 -skipsdist = True - -[testenv] -setenv = VIRTUAL_ENV={envdir} - PYTHONHASHSEED=0 -whitelist_externals = juju - sleep -passenv = HOME TERM CS_API_* OS_* AMULET_* -install_command = - pip install {opts} {packages} - -[testenv:build] -basepython = python3 -passenv=HTTP_PROXY HTTPS_PROXY NO_PROXY -setenv = CHARM_LAYERS_DIR = ../layers - CHARM_INTERFACES_DIR = ../interfaces/ -whitelist_externals = git - charm - rm - mv -commands = - rm -rf release - rm -rf ../interfaces/juju-relation-mysql - rm -rf /tmp/canonical-osm - git clone https://git.launchpad.net/canonical-osm/ /tmp/canonical-osm - mv /tmp/canonical-osm/charms/interfaces/juju-relation-mysql ../interfaces/juju-relation-mysql - charm build . --build-dir /tmp - mv /tmp/ui-k8s/ release/ - -[testenv:lint] -basepython = python3 -deps = - black - yamllint - flake8 -commands = - black --check --diff . --exclude "release/|.tox/" - yamllint . - flake8 reactive/ --max-line-length=100 - -[testenv:pep8] -basepython = python3 -deps=charm-tools -commands = charm-proof - -[testenv:venv] -commands = {posargs} diff --git a/installers/docker/docker-compose-lightui.yaml b/installers/docker/docker-compose-lightui.yaml deleted file mode 100644 index 3795a4cd..00000000 --- a/installers/docker/docker-compose-lightui.yaml +++ /dev/null @@ -1,45 +0,0 @@ -## -# Copyright 2019 ETSI -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -## - -######################################################################## - -version: '3' -networks: - netOSM: - external: - name: ${OSM_NETWORK:-netosm} - #driver: overlay - #driver_opts: - # com.docker.network.driver.mtu: "1446" -services: - light-ui: - image: ${DOCKER_USER:-opensourcemano}/light-ui:${TAG:-9} - networks: - - netOSM - environment: - OSM_SERVER: nbi - #depends_on: - # - nbi - env_file: - - ./lwui.env - ports: - - "${OSM_UI_PORTS:-80:80}" - logging: - driver: "json-file" - options: - max-size: "100m" - max-file: "2" - diff --git a/installers/docker/osm_pods/light-ui.yaml b/installers/docker/osm_pods/light-ui.yaml deleted file mode 100644 index 720c395d..00000000 --- a/installers/docker/osm_pods/light-ui.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2019 TATA ELXSI -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# See the License for the specific language governing permissions and -# limitations under the License -# Author: Vijay Nag B S (vijaynag.bs@tataelxsi.co.in) - -apiVersion: v1 -kind: Service -metadata: - name: light-ui -spec: - ports: - - nodePort: 80 - port: 80 - protocol: TCP - targetPort: 80 - selector: - app: light-ui - type: NodePort ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: light-ui - labels: - app: light-ui -spec: - replicas: 1 - selector: - matchLabels: - app: light-ui - template: - metadata: - labels: - app: light-ui - spec: - containers: - - name: light-ui - image: opensourcemano/light-ui:9 - envFrom: - - secretRef: - name: lwui-secret - ports: - - containerPort: 80 - protocol: TCP - env: - - name: OSM_SERVER - value: nbi diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 42c2ed56..0eb184c7 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -29,7 +29,6 @@ function usage(){ echo -e " -b tags/v1.1.0 (a specific tag)" echo -e " ..." echo -e " -c deploy osm services using container . Valid values are or . If -c is not used then osm will be deployed using default orchestrator. When used with --uninstall, osm services deployed by the orchestrator will be uninstalled" - echo -e " -n install OSM with Next Gen UI. Valid values are or . If -n is not specified osm will be installed with light-ui. When used with uninstall, osm along with the UI specified will be uninstalled" echo -e " -s or user defined stack name when installed using swarm or namespace when installed using k8s, default is osm" echo -e " -H use specific juju host controller IP" echo -e " -S use VCA/juju secret key" @@ -39,7 +38,7 @@ function usage(){ echo -e " --vimemu: additionally deploy the VIM emulator as a docker container" echo -e " --elk_stack: additionally deploy an ELK docker stack for event logging" echo -e " --pla: install the PLA module for placement support" - echo -e " -m : install OSM but only rebuild or pull the specified docker images (LW-UI, NG-UI, NBI, LCM, RO, MON, POL, PLA, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE)" + 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)" echo -e " -o : ONLY (un)installs one of the addons (vimemu, elk_stack, k8s_monitor)" echo -e " -O : Install OSM to an OpenStack infrastructure. is required. If a is used, the clouds.yaml file should be under ~/.config/openstack/ or /etc/openstack/" echo -e " -N : Public network name required to setup OSM to OpenStack" @@ -229,11 +228,7 @@ for module in ro lcm keystone nbi mon pol pla osmclient; do done EONG - if [ -n "$NGUI" ]; then - sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}" - else - sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/light-ui:${OSM_DOCKER_TAG}" - fi + sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}" if [ -n "$KUBERNETES" ]; then OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}" @@ -536,6 +531,17 @@ function docker_login() { } function generate_docker_images() { + cat << EOF +======================================================================================== + + + + + +======================================================================================== +EOF + set -x + sleep 5 echo "Pulling and generating docker images" [ -n "${DOCKER_REGISTRY_URL}" ] && docker_login @@ -572,18 +578,8 @@ function generate_docker_images() { if [ -n "$PULL_IMAGES" ]; then echo "Pulling OSM docker images" - for module in MON POL NBI KEYSTONE RO LCM NG-UI LW-UI PLA osmclient; do + for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA osmclient; do module_lower=${module,,} - if [ $module == "LW-UI" ]; then - if [ -n "$NGUI" ]; then - continue - else - module_lower="light-ui" - fi - fi - if [ $module == "NG-UI" -a ! -n "$NGUI" ]; then - continue - fi if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then continue fi @@ -599,19 +595,9 @@ function generate_docker_images() { [ -z "$_build_from" ] && _build_from="latest" echo "OSM Docker images generated from $_build_from" - for module in MON POL NBI KEYSTONE RO LCM NG-UI LW-UI PLA; do + for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA; do if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q ${module} ; then module_lower=${module,,} - if [ $module == "LW-UI" ]; then - if [ -n "$NGUI" ]; then - continue - else - module_lower="light-ui" - fi - fi - if [ $module == "NG-UI" -a ! -n "$NGUI" ]; then - continue - fi if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then continue fi @@ -647,13 +633,7 @@ function cmp_overwrite() { 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 + $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-ngui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml 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 @@ -663,11 +643,7 @@ function generate_k8s_manifest_files() { #Kubernetes resources $WORKDIR_SUDO cp -bR ${OSM_DEVOPS}/installers/docker/osm_pods $OSM_DOCKER_WORK_DIR $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/mongo.yaml - 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 + $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/ng-ui.yaml } function generate_prometheus_grafana_files() { @@ -693,7 +669,6 @@ function generate_docker_env_files() { $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/keystone-db.env{,~} $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/keystone.env{,~} $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/lcm.env{,~} - $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/lwui.env{,~} $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/mon.env{,~} $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/nbi.env{,~} $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/pol.env{,~} @@ -825,11 +800,6 @@ function generate_docker_env_files() { echo "OSMPOL_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/pol" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/pol.env fi - # LW-UI - if [ ! -f $OSM_DOCKER_WORK_DIR/lwui.env ]; then - echo "OSMUI_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/lwui" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lwui.env - fi - echo "Finished generation of docker env files" } @@ -925,7 +895,6 @@ function kube_secrets(){ kubectl create secret generic ro-db-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro-db.env kubectl create secret generic ro-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro.env kubectl create secret generic keystone-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/keystone.env - kubectl create secret generic lwui-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/lwui.env kubectl create secret generic pol-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env } @@ -1015,22 +984,14 @@ function parse_yaml() { } function update_manifest_files() { - if [ -n "$NGUI" ]; then - osm_services="nbi lcm ro pol mon ng-ui keystone pla" - else - osm_services="nbi lcm ro pol mon light-ui keystone pla" - fi + osm_services="nbi lcm ro pol mon ng-ui keystone pla" list_of_services="" for module in $osm_services; do module_upper="${module^^}" - if [ "$module_upper" == "LIGHT-UI" ]; then - module_upper="LW-UI" - fi if ! echo $TO_REBUILD | grep -q $module_upper ; then list_of_services="$list_of_services $module" fi done - list_of_services_to_rebuild=$(echo ${TO_REBUILD,,} |sed "s/lw-ui/light-ui/g") if [ ! "$OSM_DOCKER_TAG" == "9" ]; then parse_yaml $OSM_DOCKER_TAG $list_of_services fi @@ -1573,7 +1534,6 @@ function dump_vars(){ echo "OSM_STACK_NAME=$OSM_STACK_NAME" echo "PULL_IMAGES=$PULL_IMAGES" echo "KUBERNETES=$KUBERNETES" - echo "NGUI=$NGUI" echo "DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL" echo "DOCKER_PROXY_URL=$DOCKER_PROXY_URL" echo "SHOWOPTS=$SHOWOPTS" @@ -1633,7 +1593,6 @@ INSTALL_NOLXD="" INSTALL_NODOCKER="" INSTALL_NOJUJU="" KUBERNETES="y" -NGUI="y" INSTALL_K8S_MONITOR="" INSTALL_NOHOSTCLIENT="" INSTALL_NOCACHELXDIMAGES="" @@ -1690,12 +1649,6 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o echo -e "Invalid argument for -i : ' $OPTARG'\n" >&2 usage && exit 1 ;; - n) - [ "${OPTARG}" == "lwui" ] && NGUI="" && REPO_ARGS+=(-n "${OPTARG}") && continue - [ "${OPTARG}" == "ngui" ] && continue - echo -e "Invalid argument for -n : ' $OPTARG'\n" >&2 - usage && exit 1 - ;; k) REPOSITORY_KEY="${OPTARG}" REPO_ARGS+=(-k "$REPOSITORY_KEY") @@ -1736,7 +1689,6 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o OPENSTACK_PUBLIC_NET_NAME="${OPTARG}" ;; m) - [ "${OPTARG}" == "LW-UI" ] && TO_REBUILD="$TO_REBUILD LW-UI" && continue [ "${OPTARG}" == "NG-UI" ] && TO_REBUILD="$TO_REBUILD NG-UI" && continue [ "${OPTARG}" == "NBI" ] && TO_REBUILD="$TO_REBUILD NBI" && continue [ "${OPTARG}" == "LCM" ] && TO_REBUILD="$TO_REBUILD LCM" && continue diff --git a/installers/install_osm.sh b/installers/install_osm.sh index 37e0467d..5501c58c 100755 --- a/installers/install_osm.sh +++ b/installers/install_osm.sh @@ -33,7 +33,6 @@ function usage(){ echo -e " -b tags/v1.1.0 (a specific tag)" echo -e " ..." echo -e " -c deploy osm services using container . Valid values are or . If -c is not used then osm will be deployed using default orchestrator. When used with --uninstall, osm services deployed by the orchestrator will be uninstalled" - echo -e " -n install OSM with Next Gen UI. Valid values are or . If -n is not specified osm will be installed with light-ui. When used with uninstall, osm along with the UI specified will be uninstalled" echo -e " -s or user defined stack name when installed using swarm or namespace when installed using k8s, default is osm" echo -e " -H use specific juju host controller IP" echo -e " -S use VCA/juju secret key" diff --git a/installers/k8s/summary-dashboard.yaml b/installers/k8s/summary-dashboard.yaml index 8f26b593..f7290830 100644 --- a/installers/k8s/summary-dashboard.yaml +++ b/installers/k8s/summary-dashboard.yaml @@ -1343,91 +1343,6 @@ data: ], "valueName": "current" }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "datasource": "Prometheus", - "format": "none", - "gauge": { - "maxValue": 1, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": false - }, - "gridPos": { - "h": 4, - "w": 3, - "x": 4, - "y": 14 - }, - "id": 79, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "options": {}, - "pluginVersion": "6.3.5", - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "kube_deployment_status_replicas_available{deployment=\"ng-ui\"}", - "instant": true, - "refId": "A" - } - ], - "thresholds": "0,1", - "timeFrom": null, - "timeShift": null, - "title": "light-ui", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "0", - "value": "null" - } - ], - "valueName": "avg" - }, { "cacheTimeout": null, "colorBackground": false, diff --git a/installers/osm_health.sh b/installers/osm_health.sh index e7c8065e..e26e762c 100755 --- a/installers/osm_health.sh +++ b/installers/osm_health.sh @@ -16,10 +16,10 @@ # limitations under the License. WAIT_TIME=340 # LCM healthcheck needs 2x(30+140) senconds -SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon light-ui pol kafka" +SERVICES_WITH_HEALTH="nbi ro zookeeper lcm mon pol kafka" NUM_SERVICES_WITH_HEALTH=$(echo $SERVICES_WITH_HEALTH | wc -w) WAIT_FINAL=30 -OSM_DEPLOYMENT="light-ui nbi lcm ro mon pol keystone" +OSM_DEPLOYMENT="nbi lcm ro mon pol keystone" OSM_STATEFULSET="zookeeper kafka mongo mysql prometheus" NUM_K8S_PODS=$(echo $OSM_DEPLOYMENT $OSM_STATEFULSET | wc -w) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index b080ebe0..ef6a908c 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -223,7 +223,7 @@ node("${params.NODE}") { } parallelSteps = [:] - def list = ["RO", "openvim", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "LW-UI", "NG-UI", "PLA", "tests"] + def list = ["RO", "openvim", "osmclient", "IM", "devops", "MON", "N2VC", "NBI", "common", "LCM", "POL", "NG-UI", "PLA", "tests"] if (upstreamComponent.length()>0) { println("Skipping upstream fetch of "+upstreamComponent) list.remove(upstreamComponent) diff --git a/tools/osm-report b/tools/osm-report index 471fdd48..e18c4b00 100755 --- a/tools/osm-report +++ b/tools/osm-report @@ -35,14 +35,14 @@ dpkg -l |grep osm-devops echo "osm-imdocs osm-im deb package:" dpkg -l |grep osm-im echo "python-osmclient deb package:" -dpkg -l |grep +dpkg -l |grep echo "whereis osm:" whereis osm echo "which osmclient:" which osm #dockers deb packages echo "dockers deb packages" -for i in kafka keystone lcm light-ui mon mongo nbi pol prometheus ro mysql zookeeper; do +for i in kafka keystone lcm mon mongo nbi pol prometheus ro mysql zookeeper; do echo "docker osm_$i" docker exec $(docker ps -q -f name=osm_$i -l) dpkg -l |grep osm done @@ -56,8 +56,6 @@ echo "LCM" docker exec -it $(docker ps -aqf "name=osm_lcm" -n 1) dpkg -l |egrep -i "osm|n2vc" echo "NBI" docker exec -it $(docker ps -aqf "name=osm_nbi" -n 1) dpkg -l |egrep -i "osm|n2vc" -echo "LW-UI" -docker exec -it $(docker ps -aqf "name=osm_light-ui" -n 1) dpkg -l |egrep -i "osm|n2vc" echo "RO" docker exec -it $(docker ps -aqf "name=osm_ro.1" -n 1) dpkg -l |egrep -i "osm|n2vc" echo "OSMCLIENT" @@ -76,9 +74,6 @@ docker exec $(docker ps -q -f name=osm_lcm -l) git -C /app describe --tags --lon echo "docker osm_nbi" docker exec $(docker ps -q -f name=osm_nbi -l) git -C /app/NBI rev-parse HEAD docker exec $(docker ps -q -f name=osm_nbi -l) git -C /app/NBI describe --tags --long --dirty -echo "docker osm_light-ui" -docker exec $(docker ps -q -f name=osm_light-ui -l) git -C /usr/share/osm-lightui rev-parse HEAD -docker exec $(docker ps -q -f name=osm_light-ui -l) git -C /usr/share/osm-lightui describe --tags --long --dirty echo "docker osm_mon" docker exec $(docker ps -q -f name=osm_mon -l) git -C /mon rev-parse HEAD docker exec $(docker ps -q -f name=osm_mon -l) git -C /mon describe --tags --long --dirty -- 2.25.1