aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordyh <dengyuanhong@chinamobile.com>2021-01-28 17:10:39 +0800
committerdyh <dengyuanhong@chinamobile.com>2021-01-28 17:11:07 +0800
commita2fdb99ec0ce2998f566a3a399c2616bdcdc5473 (patch)
tree5da2f6643d9c39f4d4f19c3df1ea13285cee39a5
parent95de994e362fd3a432b24760faafbbb6ba25f6f3 (diff)
Update installation document
Change-Id: I818ea66bc35853c5d87bfb8e1b30cb579325b719 Issue-ID: MODELING-478 Signed-off-by: dyh <dengyuanhong@chinamobile.com>
-rw-r--r--docs/installation.rst105
1 files changed, 68 insertions, 37 deletions
diff --git a/docs/installation.rst b/docs/installation.rst
index 6006353..ef73780 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -4,66 +4,97 @@
Installation
============
-This document describes local build and installation for development purpose.
+.. contents::
+ :depth: 3
+..
-Pre-requisites
---------------
+This document describes Modeling/etsicatalog installation by OOM.
-* Python3 & pip
-* MariaDB
-
-Build & Run
+OOM Charts
-----------
-**Clone repository**:
+The Modeling/etsicatalog K8S charts are located in the OOM repository:
+https://gerrit.onap.org/r/admin/repos/oom
+
+For OOM deployment you can refer to the below links:
+
+* https://docs.onap.org/projects/onap-oom/en/latest/oom_user_guide.html#oom-user-guide
+
+* https://docs.onap.org/projects/onap-oom/en/latest/oom_quickstart_guide.html#oom-quickstart-guide
+
+Installing or Upgrading
+------------------------
+
+The assumption is you have cloned the charts from the OOM repository into a local directory.
+
+Step 1 Go into local copy of OOM charts
+
+From your local copy, edit the values.yaml file to make desired changes.
+
+Step 2 Build the chart
::
- $ git clone https://gerrit.onap.org/r/modeling/etsicatalog
- $ cd etsicatalog
+ $ cd oom/kubernetes
+ $ make modeling
+ $ helm search local|grep modeling
-**Create database**::
+Step 3 Un-install if installed before
+::
- $ cd /resources/dbscripts/mysql
+ $ helm delete dev-modeling --purge
+ $ kubectl -n onap get pod |grep modeling-mariadb
-Run modeling-etsicatalog-createdb.sql to create database.
+Step 4 Delete persistent volume claim and NFS persisted data for etsicatalog
+::
-Run commands followed to init database::
+ $ kubectl -n onap get pvc |grep dev-modeling|awk '{print $1}'|xargs kubectl -n onap delete pvc
+ $ rm -rf /dockerdata-nfs/dev-modeling/
- $ python manage.py makemigrations
- $ python manage.py makemigrations database
- $ python manage.py migrate
- $ python manage.py migrate database
+Step 5 Reinstall
+::
-Review and edit \catalog\pub\config\config.py
+ $ helm install local/modeling --namespace onap --name dev-modeling
+ $ kubectl -n onap get pod |grep modeling
-MySQL default configuration is as follows::
- DB_IP = "127.0.0.1"
- DB_PORT = 3306
- DB_NAME = "etsicatalog"
- DB_USER = "etsicatalog"
- DB_PASSWD = "etsicatalog"
+Etsicatalog Pods
+-----------------
-**Start server**::
+To get the etsicatalog Pod, run the following command:
+::
+
+ $ kubectl -n onap get pods | grep modeling
+
+ dev-modeling-etsicatalog-754f4d6f94-lmjzz 2/2 Running 2 92d
- $ python manage.py runserver 8806
+To access the etsicatalog docker container, run the command:
+::
+ $ kubectl -n onap exec -it dev-modeling-etsicatalog-754f4d6f94-lmjzz -c modeling-etsicatalog -- /bin/bash
+To restart the pod, run the command:
+::
-Test
-----
+ $ kubectl delete pod dev-modeling-etsicatalog-754f4d6f94-lmjzz -n onap
-**Run Healthcheck**::
+From Guilin Release, etsicatalog uses the public database:
+::
+
+ $ kubectl -n onap get pods | grep mariadb-galera
+
+ dev-mariadb-galera-0 2/2 Running 0 14d
+ dev-mariadb-galera-1 2/2 Running 0 14d
+ dev-mariadb-galera-2 2/2 Running 0 14d
+
+Exposing ports
+---------------
+
+For security reasons, the port for the etsicatalog container is configured as ClusterIP and thus not exposed. If you need the port in a development environment, then the following command will expose it.
+::
- GET /api/catalog/v1/health_check
+ $ kubectl -n onap expose service modeling-etsicatalog --target-port=8806 --type=NodePort
-You should get::
- {
- "status": "active"
- }
-**View API document**:
-http://127.0.0.1:8806/api/catalog/v1/swagger