diff --git a/.gitignore b/.gitignore index e35d8850c9688b1ce82711694692cc574a799396..6a35bdace76e6166634820391e0681d8816a694a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -_build +_build*/ +local/ diff --git a/01-quickstart.md b/01-quickstart.md index c542aa79751478af4e27be536f789c67ca5becb7..76a5c547a2e94edcd2bcaadc47d19d58795034a0 100644 --- a/01-quickstart.md +++ b/01-quickstart.md @@ -102,7 +102,7 @@ To check the logs of any container: ```bash kubectl logs -n osm deployments/lcm # for LCM -kubectl logs -n osm deployments/light-ui # for LW-UI +kubectl logs -n osm deployments/ng-ui # for NG-UI kubectl logs -n osm deployments/mon # for MON kubectl logs -n osm deployments/nbi # for NBI kubectl logs -n osm deployments/pol # for POL diff --git a/03-installing-osm.md b/03-installing-osm.md index 1665c8e7e9fe430ca23176dac102625b0c3a8360..91d47aba00030c2b1efa39ddc4e9d24ca9cb9531 100644 --- a/03-installing-osm.md +++ b/03-installing-osm.md @@ -120,7 +120,7 @@ With no options, it will install OSM from binaries. -s or user defined stack name when installed using swarm or namespace when installed using k8s, default is osm --vimemu: additionally deploy the VIM emulator as a docker container --elk_stack: additionally deploy an ELK docker stack for event logging - -m : install OSM but only rebuild the specified docker images (LW-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) + -m : install OSM but only rebuild the specified docker images (NG-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) -o : do not install OSM, but ONLY one of the addons (vimemu, elk_stack) (assumes OSM is already installed) --showopts: print chosen options and exit (only for debugging) -y: do not prompt for confirmation, assumes yes @@ -523,7 +523,7 @@ sudo sed -i "s/opensourcemano\/lcm:.*/opensourcemano\/lcm:releaseten-daily/g" /e sudo sed -i "s/opensourcemano\/mon:.*/opensourcemano\/mon:releaseten-daily/g" /etc/osm/docker/osm_pods/mon.yaml sudo sed -i "s/opensourcemano\/pol:.*/opensourcemano\/pol:releaseten-daily/g" /etc/osm/docker/osm_pods/pol.yaml sudo sed -i "s/opensourcemano\/nbi:.*/opensourcemano\/nbi:releaseten-daily/g" /etc/osm/docker/osm_pods/nbi.yaml -sudo sed -i "s/opensourcemano\/light-ui:.*/opensourcemano\/light-ui:releaseten-daily/g" /etc/osm/docker/osm_pods/light-ui.yaml +sudo sed -i "s/opensourcemano\/ng-ui:.*/opensourcemano\/ng-ui:releaseten-daily/g" /etc/osm/docker/osm_pods/ng-ui.yaml sudo sed -i "s/opensourcemano\/keystone:.*/opensourcemano\/keystone:releaseten-daily/g" /etc/osm/docker/osm_pods/keystone.yaml kubectl -n osm apply -f /etc/osm/docker/osm_pods ``` @@ -630,20 +630,20 @@ kubectl -n osm scale deployment nbi --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/nbi.yaml ``` -##### Upgrading Light UI in K8s +##### Upgrading Next Generation UI in K8s ```bash -git clone https://osm.etsi.org/gerrit/osm/LW-UI +git clone https://osm.etsi.org/gerrit/osm/NG-UI #you can then work in the cloned repo, apply patches with git pull, etc. -docker build LW-UI -f LW-UI/docker/Dockerfile -t opensourcemano/light-ui:develop --no-cache -kubectl -n osm patch deployment light-ui --patch '{"spec": {"template": {"spec": {"containers": [{"name": "light-ui", "image": "opensourcemano/light-ui:develop"}]}}}}' -kubectl -n osm scale deployment light-ui --replicas=0 -kubectl -n osm scale deployment light-ui --replicas=1 +docker build NG-UI -f NG-UI/docker/Dockerfile -t opensourcemano/ng-ui:develop --no-cache +kubectl -n osm patch deployment ng-ui --patch '{"spec": {"template": {"spec": {"containers": [{"name": "ng-ui", "image": "opensourcemano/ng-ui:develop"}]}}}}' +kubectl -n osm scale deployment ng-ui --replicas=0 +kubectl -n osm scale deployment ng-ui --replicas=1 # In order to make this change persistent after reboots, -# you will have to update the file /etc/osm/docker/osm_pods/light-ui.yaml to reflect the change +# you will have to update the file /etc/osm/docker/osm_pods/ng-ui.yaml to reflect the change # in the docker image, for instance: -# sudo sed -i "s/opensourcemano\/light-ui:.*/opensourcemano\/light-ui:develop/g" /etc/osm/docker/osm_pods/light-ui.yaml -# kubectl -n osm apply -f /etc/osm/docker/osm_pods/light-ui.yaml +# sudo sed -i "s/opensourcemano\/ng-ui:.*/opensourcemano\/ng-ui:develop/g" /etc/osm/docker/osm_pods/ng-ui.yaml +# kubectl -n osm apply -f /etc/osm/docker/osm_pods/ng-ui.yaml ``` #### Upgrading only a specific component from source code in K8s (advanced users) @@ -667,7 +667,7 @@ Install OSM from binaries or source code (by default, from binaries) -b v2.0 (v2.0 branch) -b tags/v1.1.0 (a specific tag) ... - -m : install OSM but only rebuild the specified docker images (LW-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) + -m : install OSM but only rebuild the specified docker images (NG-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) ``` Or to use master branch in LCM: @@ -726,7 +726,7 @@ sudo sed -i "s/lcm\:\${TAG\:-8}/lcm\:\${TAG\:-releaseten-daily}/" /etc/osm/docke sudo sed -i "s/mon\:\${TAG\:-8}/mon\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml sudo sed -i "s/pol\:\${TAG\:-8}/pol\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml sudo sed -i "s/nbi\:\${TAG\:-8}/nbi\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/light-ui\:\${TAG\:-8}/light-ui\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/ng-ui\:\${TAG\:-8}/ng-ui\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml sudo sed -i "s/ng-ui\:\${TAG\:-8}/ng-ui\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml sudo sed -i "s/keystone\:\${TAG\:-8}/keystone\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml docker stack rm osm @@ -835,14 +835,14 @@ docker service update osm_nbi --force --image opensourcemano/nbi:develop ##### Upgrading light UI ```bash -git clone https://osm.etsi.org/gerrit/osm/LW-UI +git clone https://osm.etsi.org/gerrit/osm/NG-UI #you can then work in the cloned repo, apply patches with git pull, etc. -docker build LW-UI -f LW-UI/docker/Dockerfile -t opensourcemano/light-ui:develop --no-cache -docker service update osm_light-ui --force --image opensourcemano/light-ui:develop +docker build NG-UI -f NG-UI/docker/Dockerfile -t opensourcemano/ng-ui:develop --no-cache +docker service update osm_ng-ui --force --image opensourcemano/ng-ui:develop # In order to make this change persistent after reboots or restart of the docker stack # you will have to update the file /etc/osm/docker/docker-compose.yaml to reflect the change # in the docker image, for instance: -# sudo sed -i "s/light-ui\:\${TAG\:-8}/light-ui\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml +# sudo sed -i "s/ng-ui\:\${TAG\:-8}/ng-ui\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml # docker stack rm osm # docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm ``` @@ -868,7 +868,7 @@ Install OSM from binaries or source code (by default, from binaries) -b v2.0 (v2.0 branch) -b tags/v1.1.0 (a specific tag) ... - -m : install OSM but only rebuild the specified docker images (LW-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) + -m : install OSM but only rebuild the specified docker images (NG-UI, NBI, LCM, RO, MON, POL, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE) ``` Or to use master branch in LCM: diff --git a/09-troubleshooting.md b/09-troubleshooting.md index 71a85a5eba63c949dfa550fb2a3afc6aae0ade19..65fe5ab4dc374e592023dfaf340323baaa67f371 100644 --- a/09-troubleshooting.md +++ b/09-troubleshooting.md @@ -63,7 +63,7 @@ paxqvnwwubcf osm_grafana replicated 1/1 xkn3jr7ipibf osm_kafka replicated 1/1 wurstmeister/kafka:latest *:30002->9092/tcp px2xfetg68z1 osm_keystone replicated 1/1 opensourcemano/keystone:8 *:5000->5000/tcp 62yljr0s97vv osm_lcm replicated 1/1 opensourcemano/lcm:8 -lwtfoh29sb95 osm_light-ui replicated 1/1 opensourcemano/light-ui:8 *:80->80/tcp +lwtfoh29sb95 osm_ng-ui replicated 1/1 opensourcemano/ng-ui:8 *:80->80/tcp xjl2vx9t6ogz osm_mon replicated 1/1 opensourcemano/mon:8 *:8662->8662/tcp t6r9wjjxqy1v osm_mongo replicated 1/1 mongo:latest rmuhwvl5gkgo osm_mysql replicated 1/1 mysql:5 @@ -219,7 +219,7 @@ Although controlled by the installer, you can check that the following images ex $ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE -osm/light-ui latest 1988aa262a97 18 hours ago 710MB +osm/ng-ui latest 1988aa262a97 18 hours ago 710MB osm/lcm latest c9ad59bf96aa 46 hours ago 667MB osm/ro latest 812c987fcb16 46 hours ago 791MB osm/nbi latest 584b4e0084a7 46 hours ago 497MB @@ -598,7 +598,7 @@ kubectl -n osm logs -f deployment/mon --all-containers=true 2>&1 | tee mon-log.t kubectl -n osm logs -f deployment/pol --all-containers=true 2>&1 | tee pol-log.txt kubectl -n osm logs -f deployment/lcm --all-containers=true 2>&1 | tee lcm-log.txt kubectl -n osm logs -f deployment/nbi --all-containers=true 2>&1 | tee nbi-log.txt -kubectl -n osm logs -f deployment/ng-ui --all-containers=true 2>&1 | light-log.txt +kubectl -n osm logs -f deployment/ng-ui --all-containers=true 2>&1 | tee ng-log.txt kubectl -n osm logs -f deployment/ro --all-containers=true 2>&1 | tee ro-log.txt kubectl -n osm logs -f deployment/grafana --all-containers=true 2>&1 | tee grafana-log.txt kubectl -n osm logs -f deployment/keystone --all-containers=true 2>&1 | tee keystone-log.txt @@ -636,7 +636,7 @@ docker logs -f $(docker ps -aqf "name=osm_mon.1" -n 1) 2>&1 | tee mon-log.txt docker logs -f $(docker ps -aqf "name=osm_pol" -n 1) 2>&1 | tee pol-log.txt docker logs -f $(docker ps -aqf "name=osm_lcm" -n 1) 2>&1 | tee lcm-log.txt docker logs -f $(docker ps -aqf "name=osm_nbi" -n 1) 2>&1 | tee nbi-log.txt -docker logs -f $(docker ps -aqf "name=osm_ng-ui" -n 1) 2>&1 | tee light-log.txt +docker logs -f $(docker ps -aqf "name=osm_ng-ui" -n 1) 2>&1 | tee ng-log.txt docker logs -f $(docker ps -aqf "name=osm_ro.1" -n 1) 2>&1 | tee ro-log.txt docker logs -f $(docker ps -aqf "name=osm_ro-db" -n 1) 2>&1 | tee rodb-log.txt docker logs -f $(docker ps -aqf "name=osm_mongo" -n 1) 2>&1 | tee mongo-log.txt diff --git a/README.md b/README.md index ebbf539e731b5d65f8d804ea8324853a1d314fa6..22b043cc96f6216692488a57dca25078bb7b0919 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This document collects Open Source MANO User Guide. +It is published at [https://osm.etsi.org/docs/user-guide/](https://osm.etsi.org/docs/user-guide/) + ## Guidelines for contributors - OSM [Workflow for documentation production](https://osm.etsi.org/gitlab/osm-doc/documentation-how-to/blob/master/Workflow%20for%20documentation%20production%20in%20OSM.md#guide-for-contributors) must be used. @@ -24,14 +26,9 @@ Before proceeding, **make sure that there are no uncommitted changes in your wor Then run: ```bash -# Clean previous html make clean -# Fix references to sections in other docs -for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done -# Build html documentation make html -# Restore the markdown files to their previous state -git reset --hard +./fix_cross_references.sh ``` The generated HTML output is stored in `_build/html`. You can go to that folder and publish the content locally with a Simple HTTP Server in Python. diff --git a/env b/env new file mode 100644 index 0000000000000000000000000000000000000000..df7a01d00d31c1c4bbad06ce4c03b4baa59472c0 --- /dev/null +++ b/env @@ -0,0 +1,9 @@ +#!/bin/bash +SERVER="ftp://osm-download.etsi.org" +FOLDER="user-guide" +FTP_OPTS="" + +# Define your FTP credentials in a separate (private file) +# local/.credentials +# USERNAME= +# PASSWORD= diff --git a/fix_cross_references.sh b/fix_cross_references.sh new file mode 100755 index 0000000000000000000000000000000000000000..ab23e752b1f7042cf627e1ea2bf8b739900a779e --- /dev/null +++ b/fix_cross_references.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# This is needed to fix a bug in sphinx +# Otherwise, cross-references in html will point to a .md file +# +for file in $(find _build -name "*.html") +do + sed -r -E -i "s/href=\"(.*)\.md\#/href=\"\1.html#/g" ${file} +done + diff --git a/updater.sh b/updater.sh new file mode 100755 index 0000000000000000000000000000000000000000..c0c2df79807e7ba3727fe96e0a3328f3b7721670 --- /dev/null +++ b/updater.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# URL References +for file in *.md; +do + echo ${file} + sed -i "s/\/ReleaseNINE/\/ReleaseTEN/g" ${file}; + sed -i "s/\/osm-9.0-nine\//\/osm-10.0-ten\//g" ${file}; + sed -i "s/releasenine/releaseten/g" ${file}; +done + +# Special +sed -i "s/NINE/TEN/g" 01-quickstart.md diff --git a/upload-doc.sh b/upload-doc.sh index 3a19fef5f6b735caa2292d32c23b1c67a3afcded..e7dc23e472654adfbea625e5f5a1aa3488fd2f83 100755 --- a/upload-doc.sh +++ b/upload-doc.sh @@ -1,18 +1,42 @@ #!/bin/bash +# +# Script to upload documentation to ETSI site +# + +source ./env + +# +# Generate Statit Site +# make clean -for i in [0-1]*.md; do sed -i "s/\.md\#/\.html\#/g" $i; done make html -read -p "Please enter your username for FTP server (ETSI On Line account): " USER_INPUT -read -sp "Please enter your password for FTP server: " PASSWORD_INPUT -echo -lftp -u $USER_INPUT,$PASSWORD_INPUT ftp://osm-download.etsi.org << ! + +# +# Fix cross-references +# +./fix_cross_references.sh + +# +# Get credentias (file or interactive) +# +if [ local/.credentials ]; then + source local/.credentials + echo SERVER=${SERVER} + echo USERNAME=${USERNAME} +else + echo "Enter credentials for ${SERVER} (ETSI On Line account)" + read -p "Username: " USERNAME + read -sp "Password: " PASSWORD +fi + +lftp ${FTP_OPTS} -u ${USERNAME},${PASSWORD} ${SERVER} << ! set ftp:ssl-allow no lcd _build cd Documentation - mirror -R html user-guide-new - rm -r user-guide - mv user-guide-new user-guide + + mirror -R html ${FOLDER}-new + rm -r ${FOLDER}-old + mv ${FOLDER} ${FOLDER}-old + mv ${FOLDER}-new ${FOLDER} bye ! -git reset --hard -