diff --git a/01-quickstart.md b/01-quickstart.md index 76a5c547a2e94edcd2bcaadc47d19d58795034a0..60f70b1487028afab22d3f653146462f94455050 100644 --- a/01-quickstart.md +++ b/01-quickstart.md @@ -4,7 +4,7 @@ Open Source MANO (OSM) is an ETSI-hosted open source community delivering a production-quality MANO stack for NFV, capable of consuming openly published information models, available to everyone, suitable for all VNFs, operationally significant and VIM-independent. OSM is aligned to NFV ISG information models while providing first-hand feedback based on its implementation experience. -Release TEN brings a number of improvements over previous releases. For the full list of new features, please refer to the [Release Notes](https://osm.etsi.org/wikipub/images/0/01/OSM_Release_TEN_-_Release_Notes.pdf). For a comprehensive overview of OSM functionalities, you can also refer to the [OSM White Papers and Release Notes of previous releases](https://osm.etsi.org/wikipub/index.php/Release_notes_and_whitepapers). +Release ELEVEN brings a number of improvements over previous releases. For the full list of new features, please refer to the [Release Notes](https://osm.etsi.org/wikipub/images/0/01/OSM_Release_ELEVEN_-_Release_Notes.pdf). For a comprehensive overview of OSM functionalities, you can also refer to the [OSM White Papers and Release Notes of previous releases](https://osm.etsi.org/wikipub/index.php/Release_notes_and_whitepapers). **OSM in Practice**: @@ -33,12 +33,12 @@ All you need to run OSM is a single server or VM with the following requirements - MINIMUM: 2 CPUs, 6 GB RAM, 40GB disk and a single interface with Internet access - RECOMMENDED: 2 CPUs, 8 GB RAM, 40GB disk and a single interface with Internet access -- Base image: [Ubuntu18.04 (64-bit variant required)](http://releases.ubuntu.com/18.04/) +- Base image: [Ubuntu20.04 (64-bit variant required)](http://releases.ubuntu.com/20.04/) Once you have prepared the host with the previous requirements, all you need to do is: ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh ``` @@ -48,7 +48,7 @@ This will install a standalone Kubernetes on a single host, and OSM on top of it **TIP:** In order to facilitate potential trobleshooting later, it is recommended to save the full log of your installation process: ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh 2>&1 | tee osm_install_log.txt ``` @@ -61,8 +61,6 @@ You can include optional components in your installation by adding the following - **Kubernetes Monitor:**: `--k8s_monitor` (install an add-on to monitor the Kubernetes cluster and OSM running on top of it, through prometheus and grafana) - **PLA:** `--pla` (install the PLA module for placement support) -- **VIM Emulator:** `--vimemu` (more information [here](04-vim-setup.md#vim-emulator)) -- **Fault Management features with ELK:** `--elk_stack` (only available with docker stack, more information [here](05-osm-usage.md#fault-management)) Example: @@ -70,14 +68,6 @@ Example: ./install_osm.sh --k8s_monitor ``` -#### Installation on a docker swarm environment - -Although the default option is to use Kubernetes, you can optionally tell the installer to use docker swarm as the container framework. The installer will install the required packages to run a single-node docker swarm and will deploy the different objects on it. - -```bash -./install_osm.sh -c swarm -``` - #### Other installation options - An additional installation option is the [Charmed Installation](03-installing-osm.md#charmed-installation) which will install OSM on Kubernetes with charms. @@ -108,8 +98,9 @@ kubectl logs -n osm deployments/nbi # for NBI kubectl logs -n osm deployments/pol # for POL kubectl logs -n osm deployments/ro # for RO kubectl logs -n osm deployments/keystone # for Keystone +kubectl logs -n osm deployments/grafana # for Grafana kubectl logs -n osm statefulset/kafka # for Kafka -kubectl logs -n osm statefulset/mongo # for Mongo +kubectl logs -n osm statefulset/mongodb-k8s # for MongoDB kubectl logs -n osm statefulset/mysql # for Mysql kubectl logs -n osm statefulset/prometheus # for Prometheus kubectl logs -n osm statefulset/zookeeper # for Zookeeper @@ -127,61 +118,22 @@ OSM client, a python-based CLI for OSM, will be available as well in the host ma osm --help ``` -#### Checking your installation when installing on docker swarm - -As a result of the installation, fourteen docker containers are created in the host (without considering optional stacks). You can check they are running by issuing the following commands: - -```bash -docker stack ps osm |grep -i running -docker service ls -``` - -If the previous docker commands do not work, you might need to either reload the shell (logout and login) or run the following command to add your user to the 'docker' group in the running shell: - -```bash -newgrp docker -``` - -![OSM Docker containers](assets/600px-Osm_containers_rel5.png) - -At any time, you can quickly relaunch your deployment by using the pre-built docker images, like this: - -```bash -docker stack rm osm -docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -To check the logs of any container: - -```bash -docker service logs osm_lcm # shows the logs of all containers (included dead containers) associated with LCM component. -docker logs $(docker ps -aqf "name=osm_lcm" -n 1) # shows the logs of the last existant LCM container -``` - ## Adding VIM accounts Before proceeding, make sure that you have a site with a VIM configured to run with OSM. Different kinds of VIMs are currently supported by OSM: -- **OpenVIM.** Check the following link to know how to install and use openvim for OSM: [OpenVIM installation](13-openvim-installation.md). OpenVIM must run in 'normal' mode (not test or fake) to have real virtual machines reachable from OSM. - **OpenStack.** Check the following link to learn how to configure OpenStack to be used by OSM: [Openstack configuration](04-vim-setup.md#openstack) -- **VMware vCloud Director.** Check the following link to learn how to configure VMware VCD to be used by OSM: [Configuring VMware vCloud Director](04-vim-setup.md#vmwares-vcloud-director) -- **Amazon Web Services (AWS).** Check the following link to learn how to configure AWS (EC2 and Virtual Private Cloud) to be used by OSM: [Configuring AWS for OSM](04-vim-setup.md#amazon-web-services-aws) - **Microsoft Azure** Check the following link to learn how to configure Microsoft Azure to be used by OSM: [Configuring Microsoft Azure for OSM](04-vim-setup.md#microsoft-azure) +- **Google Cloud Platform (GCP)** Check the following link to learn how to configure Google Cloud Platform to be used by OSM: [Configuring Google Cloud Platform for OSM](04-vim-setup.md#google-cloud-platform) +- **Amazon Web Services (AWS).** Check the following link to learn how to configure AWS (EC2 and Virtual Private Cloud) to be used by OSM: [Configuring AWS for OSM](04-vim-setup.md#amazon-web-services-aws) +- **VMware vCloud Director.** Check the following link to learn how to configure VMware VCD to be used by OSM: [Configuring VMware vCloud Director](04-vim-setup.md#vmwares-vcloud-director) +- **OpenVIM.** Check the following link to know how to install and use openvim for OSM: [OpenVIM installation](13-openvim-installation.md). OpenVIM must run in 'normal' mode (not test or fake) to have real virtual machines reachable from OSM. - **Eclipse fog05** Check the following link to learn how to configure Eclipse fog05 to be used by OSM: [Configuring Eclipse fog05 for OSM](04-vim-setup.md#fog05) OSM can manage external SDN controllers to perform the dataplane underlay network connectivity on behalf of the VIM. See [EPA and SDN assist](04-vim-setup.md#advanced-setups-for-high-io-performance-epa-and-sdn-assist) ### Adding VIMs through OSM client -#### OpenVIM site - -Execute the following command, using the appropriate parameters (e.g. site name: "openvim-site", IP address: 10.10.10.10, VIM tenant: "osm") - -```bash -osm vim-create --name openvim-site --auth_url http://10.10.10.10:9080/openvim --account_type openvim \ - --description "Openvim site" --tenant osm --user dummy --password dummy -``` - #### Openstack site Execute the following command, using the appropriate parameters (e.g. site name: "openstack-site", IP address: 10.10.10.11, VIM tenant: "admin", user: "admin", password: "userpwd") @@ -193,20 +145,6 @@ osm vim-create --name openstack-site --user admin --password userpwd \ For advanced options, please refer to the [OpenStack Setup Guide](04-vim-setup.md#openstack). -#### VMware vCloud Director site - -- Execute the following command, using the appropriate parameters (e.g. site name: "vmware-site", IP address: 10.10.10.12, VIM tenant: "vmware-tenant", user: "osm", password: "osm4u", admin user: "admin", admin password: "adminpwd", organization: "orgVDC") - -```bash -osm vim-create --name vmware-site --user osm --password osm4u --auth_url https://10.10.10.12 \ - --tenant vmware-tenant --account_type vmware \ - --config '{admin_username: user, admin_password: passwd, orgname: organization, nsx_manager: "http://10.10.10.12", - nsx_user: user, nsx_password: userpwd,"vcenter_port": port, "vcenter_user":user, "vcenter_password":password, - "vcenter_ip": 10.10.10.14}' -``` - -For advanced options, please refer to the [Configuring VMware vCloud Director](04-vim-setup.md#vmwares-vcloud-director). - #### VMware Integrated Openstack (VIO) site Execute the following command, using the appropriate parameters (e.g. site name: "openstack-site-vio4", IP address: 10.10.10.12, VIM tenant: `admin`, user: `admin`, password: `passwd`) @@ -252,6 +190,15 @@ osm vim-create --name azure --account_type azure --auth_url http://www.azure.com For advanced options, please refer to the [Microsoft Azure setup guide](04-vim-setup.md#microsoft-azure). +#### OpenVIM site + +Execute the following command, using the appropriate parameters (e.g. site name: "openvim-site", IP address: 10.10.10.10, VIM tenant: "osm") + +```bash +osm vim-create --name openvim-site --auth_url http://10.10.10.10:9080/openvim --account_type openvim \ + --description "Openvim site" --tenant osm --user dummy --password dummy +``` + #### Eclipse fog05 site - Execute the following command, using the appropriate parameters (e.g. runtime supported: "hypervisor", cpu architecture: "arch", user: "XXX", password: "YYY") @@ -262,6 +209,19 @@ osm vim-create --name fos --auth_url :8080 --account_type fos --t For advanced options, please refer to the [Configuring Eclipse fog05 for OSM](04-vim-setup.md#fog05). +#### VMware vCloud Director site + +- Execute the following command, using the appropriate parameters (e.g. site name: "vmware-site", IP address: 10.10.10.12, VIM tenant: "vmware-tenant", user: "osm", password: "osm4u", admin user: "admin", admin password: "adminpwd", organization: "orgVDC") + +```bash +osm vim-create --name vmware-site --user osm --password osm4u --auth_url https://10.10.10.12 \ + --tenant vmware-tenant --account_type vmware \ + --config '{admin_username: user, admin_password: passwd, orgname: organization, nsx_manager: "http://10.10.10.12", + nsx_user: user, nsx_password: userpwd,"vcenter_port": port, "vcenter_user":user, "vcenter_password":password, + "vcenter_ip": 10.10.10.14}' +``` + +For advanced options, please refer to the [Configuring VMware vCloud Director](04-vim-setup.md#vmwares-vcloud-director). ### Adding VIMs through GUI @@ -273,28 +233,22 @@ Just access the *VIM Accounts* tab, click the *New VIM* button and fill the para Before going on, download the required VNF and NS packages from this URL: +You can also clone VNF and NS packages from [Gitlab](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages) and build them with `osmclient`. + ### Onboarding a VNF The onboarding of a VNF in OSM involves preparing and adding the corresponding VNF package to the system. This process also assumes, as a pre-condition, that the corresponding VM images are available in the VIM(s) where it will be instantiated. #### Uploading VM image(s) to the VIM(s) -In this example, only a vanilla Ubuntu16.04 image is needed. It can be obtained from the following link: +In this example, only a vanilla Ubuntu20.04 image is needed. It can be obtained from the following link: It will be required to upload the image into the VIM. Instructions differ from one VIM to another (please check the reference of your type of VIM). For instance, this is the OpenStack command for uploading images: ```bash -openstack image create --file="./xenial-server-cloudimg-amd64-disk1.img" --container-format=bare --disk-format=qcow2 ubuntu16.04 -``` - -And this one is the appropriate command in OpenVIM: - -```bash -#copy your image to the NFS shared folder (e.g. /mnt/openvim-nfs) -cp ./xenial-server-cloudimg-amd64-disk1.img /mnt/openvim-nfs/ -openvim image-create --name cirros034 --path /mnt/openvim-nfs/xenial-server-cloudimg-amd64-disk1.img +openstack image create --file="./focal-server-cloudimg-amd64.img" --container-format=bare --disk-format=qcow2 ubuntu20.04 ``` #### Onboarding a VNF Package diff --git a/03-installing-osm.md b/03-installing-osm.md index 990b87232264aa3e8046a64b5973270c45f63fd5..90d256e6cec566eda3ca762f3a734b20446da71f 100644 --- a/03-installing-osm.md +++ b/03-installing-osm.md @@ -6,7 +6,9 @@ In order to install OSM, you will need, at least, a single server or VM with the - MINIMUM: 2 CPUs, 6 GB RAM, 40GB disk and a single interface with Internet access - RECOMMENDED: 2 CPUs, 8 GB RAM, 40GB disk and a single interface with Internet access -- Base image: Ubuntu18.04 (64-bit variant required) () +- Base image: + - Ubuntu20.04 cloud image (64-bit variant required) () + - Ubuntu20.04 server image (64-bit variant required) () In addition, you will need a Virtual Infrastructure Manager available so that OSM can orchestrate workloads on it. The following figure illustrates OSM interaction with VIMs and the VNFs to be deployed there: @@ -21,14 +23,12 @@ Hence, it is assumed that: - Each VIM has a so-called management network, which provides IP addresses to VNFs. - That management network is reachable from OSM. -## Installation options - -### Installation based on kubernetes (default) +## Installation procedure Once you have one host available with the characteristics above, you just need to trigger the OSM installation by: ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh ``` @@ -38,7 +38,7 @@ This will install a standalone Kubernetes on a single host, and OSM on top of it **TIP:** In order to facilitate potential troubleshooting later, it is recommended to save the full log of your installation process: ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh 2>&1 | tee osm_install_log.txt ``` @@ -51,53 +51,17 @@ Optionally, you can use the option `--k8s_monitor` to install an add-on to monit ./install_osm.sh --k8s_monitor ``` -### Installation based on docker swarm - -Although the default option is to use Kubernetes, you can optionally tell the installer to use docker swarm as the container framework. The installer will install the required packages to run a single-node docker swarm and will deploy the different objects on it. - -```bash -./install_osm.sh -c swarm -``` - -### Remote installation to an OpenStack infrastructure - -OSM could be installed to a remote OpenStack infrastructure from the OSM standard installer. It is based on Ansible and it takes care of configuring the OpenStack infrastructure before deploying a VM with OSM. The Ansible playbook performs the following steps: - -1. Creation of a new VM flavour (4 CPUs, 8 GB RAM, 40 GB disk) -2. Download of Ubuntu 18.04 image and upload it to OpenStack Glance -3. Generation of a new SSH private and public key pair -4. Setup of a new security group to allow external SSH and HTTP access -5. Deployment of a clean Ubuntu 18.04 VM and installation of OSM to it - -**Important note:** The OpenStack user needs Admin rights or similar to perform those operations. - -The installation can be performed with the following command: - -```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh -chmod +x install_osm.sh -./install_osm.sh -O -N [--volume] [OSM installer options] -``` - -The options `-O` and `-N` are mandatory. The `-O` accepts both a path to an OpenStack openrc file or a cloud name. If a cloud name is used, the clouds.yaml file should be under `~/.config/openstack/` or `/etc/openstack/`. More information about the `clouds.yaml` file can be found [here](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html) - -The `-N` requires an external network name or ID. This is going to be the OpenStack network where the OSM VM is going to be attached. - -The `--volume` option is used to instruct OpenStack to create an external volume attached to the VM instead of using a local one. This may be suitable for production environments. It requires OpenStack Cinder configured on the OpenStack infrastructure. - -Some OSM installer options are supported, in particular the following: `-r -k -u -R -t`. Other options will be supported in the future. - ### Other installer options You can include optional components in your installation by adding the following flags: -- **VIM Emulator:** `--vimemu` (more information [here](04-vim-setup.md#vim-emulator) -- **Fault Management features with ELK:** `--elk_stack` (more information [here](05-osm-usage.md#fault-management) +- **Kubernetes Monitor:**: `--k8s_monitor` (install an add-on to monitor the Kubernetes cluster and OSM running on top of it, through prometheus and grafana) +- **PLA:** `--pla` (install the PLA module for placement support) Example: ```bash -./install_osm.sh --elk_stack --pm_stack +./install_osm.sh --k8s_monitor --pla ``` OSM installer includes a larger number of install options. The general usage is the following: @@ -111,28 +75,55 @@ With no options, it will install OSM from binaries. **Options:** ```text - --uninstall: uninstall OSM: remove the containers and delete NAT rules + -y: do not prompt for confirmation, assumes yes -r : use specified repository name for osm packages -R : use specified release for osm binaries (deb packages, lxd images, ...) -u : use specified repository url for osm packages -k : use specified repository public key url - -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 - -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 + --k8s_monitor: install the OSM kubernetes monitoring with prometheus and grafana -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 + --uninstall: uninstall OSM: remove the containers and delete NAT rules -D use local devops installation path -h / --help: prints help ``` +## Other installation methods + +### Remote installation to an OpenStack infrastructure + +OSM could be installed to a remote OpenStack infrastructure from the OSM standard installer. It is based on Ansible and it takes care of configuring the OpenStack infrastructure before deploying a VM with OSM. The Ansible playbook performs the following steps: + +1. Creation of a new VM flavour (4 CPUs, 8 GB RAM, 40 GB disk) +2. Download of Ubuntu 20.04 image and upload it to OpenStack Glance +3. Generation of a new SSH private and public key pair +4. Setup of a new security group to allow external SSH and HTTP access +5. Deployment of a clean Ubuntu 20.04 VM and installation of OSM to it + +**Important note:** The OpenStack user needs Admin rights or similar to perform those operations. + +The installation can be performed with the following command: + +```bash +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh +chmod +x install_osm.sh +./install_osm.sh -O -N [--volume] [OSM installer options] +``` + +The options `-O` and `-N` are mandatory. The `-O` accepts both a path to an OpenStack openrc file or a cloud name. If a cloud name is used, the clouds.yaml file should be under `~/.config/openstack/` or `/etc/openstack/`. More information about the `clouds.yaml` file can be found [here](https://docs.openstack.org/python-openstackclient/latest/configuration/index.html) + +The `-N` requires an external network name or ID. This is going to be the OpenStack network where the OSM VM is going to be attached. + +The `--volume` option is used to instruct OpenStack to create an external volume attached to the VM instead of using a local one. This may be suitable for production environments. It requires OpenStack Cinder configured on the OpenStack infrastructure. + +Some OSM installer options are supported, in particular the following: `-r -k -u -R -t`. Other options will be supported in the future. + ### Vagrant installation Pre-built OSM Vagrant images are available here: -The pre-built image requires 4GB of memory and 2 vCPUs. +The pre-built image requires 6GB of memory and 2 vCPUs. #### 1) Install Vagrant and VirtualBox @@ -223,50 +214,10 @@ vagrant box add osm/releaseeight /path/to/vagrant.box vagrant init osm/releaseeight ``` -If at any point you need to add the optional components (`elk_stack`, `vimemu`, ...) you can do so by downloading the installer from inside your VM and executing it with the `-o` option, for example: - -```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh -chmod +x install_osm.sh -./install_osm.sh -o elk_stack -``` - -Please note that you may need to add more forwarded ports, for example, to access Kibana after adding the `elk_stack`, you would need to add a line like this one to your `Vagrantfile`, then run `vagrant reload`: +Please note that you may need to add more forwarded ports, for example, to access Grafana, you would need to add a line like this one to your `Vagrantfile`, then run `vagrant reload`: ```ruby -config.vm.network "forwarded_port", guest: 5601, host: 5601 -``` - -#### Including VIM Emulator in a Vagrant installation of OSM - -```bash -vagrant init osm/releaseeight -vagrant up -vagrant ssh -# startup VIM-EMU -# new version of installer will have the vim-emu start by default -sudo docker run --name vim-emu -t -d --restart always --privileged --pid='host' --network=netOSM -v /var/run/docker.sock:/var/run/docker.sock vim-emu-img python examples/osm_default_daemon_topology_2_pop.py -export OSM_HOSTNAME=127.0.0.1 -export OSM_SOL005=True -export VIMEMU_HOSTNAME=$(sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' vim-emu) -osm vim-create --name emu-vim1 --user username --password password --auth_url http://$VIMEMU_HOSTNAME:6001/v2.0 --tenant tenantName --account_type openstack -git clone https://osm.etsi.org/gerrit/osm/vim-emu.git -osm vnfd-create vim-emu/examples/vnfs/ping.tar.gz -osm vnfd-create vim-emu/examples/vnfs/pong.tar.gz -osm nsd-create vim-emu/examples/services/pingpong_nsd.tar.gz -osm ns-create --nsd_name pingpong --ns_name test --vim_account emu-vim1 -vagrant@vagrant:~$ osm ns-list -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ -| ns instance name | id | operational status | config status | detailed status | -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ -| test | 05a363b0-4ac1-49a1-a4b1-9680e39b1ade | init | init | Waiting ns ready at RO. RO_id=2c569b2a-b21f-495b-9837-6a469f565044; VMs: 0/2, networks: 0/1 | -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ -vagrant@vagrant:~$ osm ns-list -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ -| ns instance name | id | operational status | config status | detailed status | -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ -| test | 05a363b0-4ac1-49a1-a4b1-9680e39b1ade | init | init | Waiting ns ready at RO. RO_id=2c569b2a-b21f-495b-9837-6a469f565044; VMs: 0/2, networks: 0/1 | -+------------------+--------------------------------------+--------------------+---------------+---------------------------------------------------------------------------------------------+ +config.vm.network "forwarded_port", guest: 3000, host: 3000 ``` ### Charmed Installation @@ -283,7 +234,7 @@ Some cases where the Charmed installer might be more suitable: ![OSM Docker containers](assets/800px-OSM_charmed_standalone.png) ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh --charmed ``` @@ -295,7 +246,7 @@ This will install OSM on [microk8s](https://microk8s.io/) using Charms. For the installation using external components the following parameters can be added: ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh +wget https://osm-download.etsi.org/ftp/osm-11.0-eleven/install_osm.sh chmod +x install_osm.sh ./install_osm.sh --charmed --k8s ~/.kube/config --vca --lxd --lxd-cred ``` @@ -406,153 +357,17 @@ juju config keystone mysql_port="" juju config keystone mysql_root_password="" ``` -### Installation from source - -TODO: Under elaboration. - -## PM and FM dashboards (optional) - -TODO: Under elaboration. - -## Checking your installation - -After some time of downloading and processing, you will get a fresh OSM installation with its latest pre-built docker images. You can access to the UI in the following URL (user:`admin`, password: `admin`): [http://1.2.3.4](http://1.2.3.4/), replacing 1.2.3.4 by the IP address of your host. - -![OSM home](assets/600px-Osm_lwb_ui_login.png) - -![OSM installation result](assets/600px-Osm_lwb_ui.png) - -As a result of the installation, 13 docker containers are created in the host (without considering optional stacks). You can check they are running by issuing the following commands: - -```bash -docker stack ps osm |grep -i running -docker service ls -``` - -![OSM Docker containers](assets/600px-Osm_containers_rel5.png) - -At any time, you can quickly relaunch your deployment by using the pre-built docker images, like this: - -```bash -docker stack rm osm && sleep 60 # The sleep is for making sure the stack removal finishes before redeploying -docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -To check the logs of any container: - -```bash -docker service logs osm_lcm # shows the logs of all containers (included dead containers) associated with LCM component. -docker logs $(docker ps -aqf "name=osm_lcm" -n 1) # shows the logs of the last existing LCM container -``` - -## Installing standalone OSM Client - -The **OSM Client** is a client library and a command-line tool (based on Python) to operate OSM, which accesses OSM's Northbound Interface (NBI) and lets you manage descriptors, VIMs, Network Services, Slices, etc. along with their whole lifecycle. In other words, the OSM Client is a sort of Swiss knife that provides a convenient access to all the functionality that OSM's NBI offers. - -Although the OSM Client is always available in the host machine after installation, it is sometimes convenient installing an OSM Client in another location, different from the OSM host, so that the access to the OSM services does not require OS-level/SSH credentials. Thus, in those cases where you have an OSM already installed in a remote server, you can still operate it from your local computer using the OSM Client. - -In order to install the OSM Client in your local Linux machine, you should follow this procedure: - -```bash -# Clean the previous repos that might exist -sudo sed -i "/osm-download.etsi.org/d" /etc/apt/sources.list -wget -qO - https://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - -sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseTEN stable devops IM osmclient" -sudo apt-get update -sudo apt-get install -y python3-pip -sudo -H python3 -m pip install -U pip -sudo -H python3 -m pip install python-magic pyangbind verboselogs -sudo apt-get install python3-osmclient -``` - -Once installed, you can type `osm` to see a list of commands. - -Since we are installing the OSM Client in a host different from OSM's at a minimum you will need to specify the OSM host, either via an environment variable or via the osm command line. For instance, you can set your client to access an OSM host running at `10.80.80.5` by using: - -```bash -export OSM_HOSTNAME="10.80.80.5" -``` - -For additional options, see `osm --help` for more info, and check our OSM client reference guide [here](10-osm-client-commands-reference.md) - -## How to upgrade OSM - -### How to upgrade OSM when using K8s as container framework (default) - -#### Upgrading the complete OSM platform in K8s - -Upgrading to the latest minor version is as simple as running again the installer: - -```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh -chmod +x install_osm.sh -./install_osm.sh -c k8s -``` - -You will be asked if you want to proceed with the installation and configuration of LXD, juju, docker CE, kubelet, kubectl and the initialization of a local single-node K8s cluster, as pre-requirements. Please answer `y`. - -That's all. You will have the newest OSM version installed. - -#### Upgrading the OSM platform from docker images in K8s (advanced users) - -**Upgrading to the latest daily docker image might lead to potential issues.** Moreover, every new re-deployment of the stack will involve a download of a new docker daily image if it exists. Unless you are really sure about what you are doing, please use this procedure with caution. - -The commonest reason for this procedure is using the latest daily testing docker image or a specific tag. - -You can use option `-t` in the installer to specify a specific docker tag to be used by the installer. - -To install the latest daily images: - -```bash -./install_osm.sh -c k8s -t releaseten-daily -``` - -To install a previous version e.g. v6.0.3: - -```bash -./install_osm.sh -c k8s -t v6.0.3 -``` - -The previous commands will do the installation and deployment of the whole platform in the namespace `osm`. - -Another option is to change directly the K8s Manifest YAML files located in `/etc/osm/docker/osm_pods`. Below an example to update them to use `releaseten-daily` tag: - -```bash -sudo sed -i "s/opensourcemano\/ro:.*/opensourcemano\/ro:releaseten-daily/g" /etc/osm/docker/osm_pods/ro.yaml -sudo sed -i "s/opensourcemano\/lcm:.*/opensourcemano\/lcm:releaseten-daily/g" /etc/osm/docker/osm_pods/lcm.yaml -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\/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 -``` - -The OSM Client will have to be updated independently. In order to use the latest "testing" OSM Client, you will have to update the debian repo to use the testing repo, remove the previous debian package and install the one from the new repo as follows: - -```bash -sudo apt-get remove python-osmclient -sudo apt-get remove pytho3-osmclient -# Clean the previous repos that might exist -sudo sed -i "/osm-download.etsi.org/d" /etc/apt/sources.list -sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseEIGHT-daily testing osmclient" -sudo apt-get update -sudo apt-get install python3-osmclient -dpkg -l |grep python3-osmclient #to check the installed version -``` - -#### Upgrading only a specific component in K8s (advanced users) +### How to upgrade components from daily images **Upgrading a specific OSM component without upgrading the others accordingly may lead to potential inconsistencies.** Unless you are really sure about what you are doing, please use this procedure with caution. One of the commonest reasons for this type of upgrade is using your own cloned repo of a module for development purposes. -##### Upgrading RO in K8s +#### Upgrading RO in K8s -This involves upgrading (`ro` and `ro-db`): +This involves upgrading (`ro`): ```bash -docker pull mysql:5 git clone https://osm.etsi.org/gerrit/osm/RO #you can then work in the cloned repo, apply patches with git pull, etc. docker build RO -f RO/Dockerfile.local -t opensourcemano/ro:develop --no-cache @@ -566,7 +381,7 @@ kubectl -n osm scale deployment ro --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/ro.yaml ``` -##### Upgrading LCM in K8s +#### Upgrading LCM in K8s ```bash git clone https://osm.etsi.org/gerrit/osm/LCM @@ -582,7 +397,7 @@ kubectl -n osm scale deployment lcm --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/lcm.yaml ``` -##### Upgrading MON in K8s +#### Upgrading MON in K8s ```bash git clone https://osm.etsi.org/gerrit/osm/MON @@ -598,7 +413,7 @@ kubectl -n osm scale deployment mon --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/mon.yaml ``` -##### Upgrading POL in K8s +#### Upgrading POL in K8s ```bash git clone https://osm.etsi.org/gerrit/osm/POL @@ -614,7 +429,7 @@ kubectl -n osm scale deployment pol --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/pol.yaml ``` -##### Upgrading NBI in K8s +#### Upgrading NBI in K8s ```bash git clone https://osm.etsi.org/gerrit/osm/NBI @@ -630,7 +445,7 @@ kubectl -n osm scale deployment nbi --replicas=1 # kubectl -n osm apply -f /etc/osm/docker/osm_pods/nbi.yaml ``` -##### Upgrading Next Generation UI in K8s +#### Upgrading Next Generation UI in K8s ```bash git clone https://osm.etsi.org/gerrit/osm/NG-UI @@ -646,299 +461,76 @@ kubectl -n osm scale deployment ng-ui --replicas=1 # 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) +## Checking your installation -**FIXME:** The procedure described here needs revision, as it may work differently in the latest OSM release. +After some time, you will get a fresh OSM installation with its latest, pre-built docker images which are built daily. You can access to the UI in the following URL (user:`admin`, password: `admin`): [http://1.2.3.4](http://1.2.3.4/), replacing 1.2.3.4 by the IP address of your host. -**Upgrading a specific OSM component without upgrading the others accordingly may lead to potential inconsistencies.** Unless you are really sure about what you are doing, please use this procedure with caution. +![OSM home](assets/600px-Osm_ng_ui_login.png) -This procedure is useful to use the master branch or an old version for development purposes. +![OSM installation result](assets/600px-Osm_ng_ui.png) -For this purpose, you can use options `-b` and `-m` in the installer: +As a result of the installation, different K8s objects (deployments, statefulsets, etc.) created in the host. You can check the status by running the following commands: ```bash -./install_osm.sh --help -usage: ./install_osm.sh [OPTIONS] -Install OSM from binaries or source code (by default, from binaries) - OPTIONS -... - -b : install OSM from source code using a specific branch (master, v2.0, ...) or tag - -b master (main dev branch) - -b v2.0 (v2.0 branch) - -b tags/v1.1.0 (a specific tag) - ... - -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) +kubectl get all -n osm ``` -Or to use master branch in LCM: +To check the logs of any container: ```bash -./install_osm.sh -c k8s -m LCM -b master +kubectl logs -n osm deployments/lcm # for LCM +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 +kubectl logs -n osm deployments/ro # for RO +kubectl logs -n osm deployments/keystone # for Keystone +kubectl logs -n osm deployments/grafana # for Grafana +kubectl logs -n osm statefulset/kafka # for Kafka +kubectl logs -n osm statefulset/mongodb-k8s # for MongoDB +kubectl logs -n osm statefulset/mysql # for Mysql +kubectl logs -n osm statefulset/prometheus # for Prometheus +kubectl logs -n osm statefulset/zookeeper # for Zookeeper ``` -Or to use an old version of MON: +Finally, if you used the option `--k8s_monitor` to install an add-on to monitor the K8s cluster and OSM, you can check the status in this way. ```bash -./install_osm.sh -c k8s -m MON -b tags/v6.0.3 +kubectl get all -n monitoring ``` -### How to upgrade OSM when using docker swarm as container framework - -#### Upgrading the complete OSM platform - -Due to the new architecture and dockerized components introduced in OSM since Release FOUR, OSM platform upgrade is quite easy. Upgrading to the latest minor version is as simple as running again the installer: +OSM client, a python-based CLI for OSM, will be available as well in the host machine. Via the OSM client, you can manage descriptors, NS and VIM complete lifecycle. ```bash -wget https://osm-download.etsi.org/ftp/osm-10.0-ten/install_osm.sh -chmod +x install_osm.sh -./install_osm.sh +osm --help ``` -You will be asked if you want to proceed with the installation and configuration of LXD, juju, docker CE and the initialization of a local docker swarm, as pre-requirements. Please answer `y`. - -That's all. You will have the newest OSM version installed. - -#### Upgrading the OSM platform from docker images (advanced users) - -**Upgrading to the latest daily docker image might lead to potential issues.** Moreover, every new re-deployment of the stack will involve a download of a new docker daily image if it exists. Unless you are really sure about what you are doing, please use this procedure with caution. - -The commonest reason for this procedure is using the latest daily testing docker image or a specific tag. - -You can use option `-t` in the installer to specify a specific docker tag to be used by the installer. - -To install the latest daily images: - -```bash -./install_osm.sh -t releaseten-daily -``` - -To install a previous version e.g. 8.0.4: - -```bash -./install_osm.sh -t 8.0.4 -``` +## Installing standalone OSM Client -The previous commands will do the installation and deployment of the stack, but will not make it persistent after re-deployments of the stack (or reboots). In order to make it persistent, you will have to update the file `docker-compose.yaml`. Below an example to update it to use `releaseten-daily` tag: +The **OSM Client** is a client library and a command-line tool (based on Python) to operate OSM, which accesses OSM's Northbound Interface (NBI) and lets you manage descriptors, VIMs, Network Services, Slices, etc. along with their whole lifecycle. In other words, the OSM Client is a sort of Swiss knife that provides a convenient access to all the functionality that OSM's NBI offers. -```bash -sudo sed -i "s/ro\:\${TAG\:-8}/ro\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/lcm\:\${TAG\:-8}/lcm\:\${TAG\:-releaseten-daily}/" /etc/osm/docker/docker-compose.yaml -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/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 -docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` +Although the OSM Client is always available in the host machine after installation, it is sometimes convenient installing an OSM Client in another location, different from the OSM host, so that the access to the OSM services does not require OS-level/SSH credentials. Thus, in those cases where you have an OSM already installed in a remote server, you can still operate it from your local computer using the OSM Client. -The OSM Client will have to be updated independently. In order to use the latest "testing" OSM Client, you will have to update the debian repo to use the testing repo, remove the previous debian package and install the one from the new repo as follows: +In order to install the OSM Client in your local Linux machine, you should follow this procedure: ```bash -sudo apt-get remove python-osmclient -sudo apt-get remove pytho3-osmclient # Clean the previous repos that might exist sudo sed -i "/osm-download.etsi.org/d" /etc/apt/sources.list -sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseEIGHT-daily testing osmclient" +wget -qO - https://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - +sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN stable devops IM osmclient" sudo apt-get update +sudo apt-get install -y python3-pip +sudo -H python3 -m pip install -U pip +sudo -H python3 -m pip install python-magic pyangbind verboselogs sudo apt-get install python3-osmclient -dpkg -l |grep python3-osmclient #to check the installed version -``` - -#### Upgrading only a specific component (advanced users) - -**Upgrading a specific OSM component without upgrading the others accordingly may lead to potential inconsistencies.** Unless you are really sure about what you are doing, please use this procedure with caution. - -One of the commonest reasons for this type of upgrade is using your own cloned repo of a module for development purposes. - -The procedure below involves building manually some docker images. The developer environment might require updating manually the MTU of the docker default "bridge" network following the procedure in this link: - -##### Upgrading RO - -This involves upgrading (`ro` and `ro-db`): - -```bash -docker pull mysql:5 -git clone https://osm.etsi.org/gerrit/osm/RO -#you can then work in the cloned repo, apply patches with git pull, etc. -docker build RO -f RO/Dockerfile.local -t opensourcemano/ro:develop --no-cache -docker service update osm_ro --force --image opensourcemano/ro: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/ro\:\${TAG\:-8}/ro\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml -# docker stack rm osm -# docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm ``` -##### Upgrading LCM - -```bash -git clone https://osm.etsi.org/gerrit/osm/LCM -#you can then work in the cloned repo, apply patches with git pull, etc. -docker build LCM -f LCM/Dockerfile.local -t opensourcemano/lcm:develop --no-cache -docker service update osm_lcm --force --image opensourcemano/lcm: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/lcm\:\${TAG\:-8}/lcm\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml -# docker stack rm osm -# docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -##### Upgrading MON - -```bash -git clone https://osm.etsi.org/gerrit/osm/MON -#you can then work in the cloned repo, apply patches with git pull, etc. -docker build MON -f MON/docker/Dockerfile -t opensourcemano/mon:develop --no-cache -docker service update osm_mon --force --image opensourcemano/mon: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/mon\:\${TAG\:-8}/mon\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml -# docker stack rm osm -# docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -##### Upgrading POL - -```bash -git clone https://osm.etsi.org/gerrit/osm/POL -#you can then work in the cloned repo, apply patches with git pull, etc. -docker build POL -f POL/docker/Dockerfile -t opensourcemano/pol:develop --no-cache -docker service update osm_pol --force --image opensourcemano/pol: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/pol\:\${TAG\:-8}/pol\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml -# docker stack rm osm -# docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -##### Upgrading NBI - -```bash -git clone https://osm.etsi.org/gerrit/osm/NBI -#you can then work in the cloned repo, apply patches with git pull, etc. -docker build NBI -f NBI/Dockerfile.local -t opensourcemano/nbi:develop --no-cache -docker service update osm_nbi --force --image opensourcemano/nbi: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/nbi\:\${TAG\:-8}/nbi\:\${TAG\:-develop}/" /etc/osm/docker/docker-compose.yaml -# docker stack rm osm -# docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm -``` - -##### Upgrading light UI - -```bash -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 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/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 -``` - -#### Upgrading only a specific component from source code (advanced users) - -**FIXME:** The procedure described here needs revision, as it may work differently in the latest OSM release. - -**Upgrading a specific OSM component without upgrading the others accordingly may lead to potential inconsistencies.** Unless you are really sure about what you are doing, please use this procedure with caution. - -This procedure is useful to use the master branch or an old version for development purposes. - -For this purpose, you can use options `-b` and `-m` in the installer: - -```bash -./install_osm.sh --help -usage: ./install_osm.sh [OPTIONS] -Install OSM from binaries or source code (by default, from binaries) - OPTIONS -... - -b : install OSM from source code using a specific branch (master, v2.0, ...) or tag - -b master (main dev branch) - -b v2.0 (v2.0 branch) - -b tags/v1.1.0 (a specific tag) - ... - -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: - -```bash -./install_osm.sh -m LCM -b master -``` - -Or to use an old version of MON: - -```bash -./install_osm.sh -m MON -b tags/v6.0.3 -``` - -### How to upgrade OSM when using the Charmed installation - -#### Upgrading only a specific component - -There are two main components which can be upgraded: The OSM charms and the OSM images. - -In general for a complete upgrade of an OSM component the following steps are recommended in this order: - -1. Upgrade the OSM Charm to the latest version. -2. Upgrade the OSM version by passing the latest OSM image. - -##### Upgrading OSM Charms - -By upgrading the OSM Charms new features for operations can be enabled or a new OSM version can be supported in case the previous charm revision wasn’t able to support it. New Charm revisions will be compatible with different OSM versions, therefore the charm can be updated without updating the docker image version. - -To update a charm to its latest stable version the following command will be executed: - -```bash -juju upgrade-charm ui-k8s --channel stable -``` - -There is also the possibility to upgrade to a specific revision with the following command: - -```bash -juju upgrade-charm ui-k8s --revision 43 # 43 being the revision number of the new charm version. -``` - -##### Upgrading OSM version - -OSM is distributed with docker images, therefore, when a new version is released, a new tag is created for it. To update to this new tag the following command needs to be executed: - -```bash -juju config lcm-k8s image=opensourcemano/lcm:8.0.1 # 8.0.1 Being the version tag -``` - -This will restart the pod with the new image version. - -##### Upgrading from source version - -First, the microk8s registry will have to be enabled, for more information please consult the official [documentation](https://microk8s.io/docs/registry-built-in). - -```bash -microk8s enable registry -``` - -Afterwards the docker image of the module that needs to be upgraded has to be built and pushed, it is important that the tag starts with localhost:32000. - -``` -docker build LCM -f LCM/Dockerfile.local -t localhost:32000/osm-lcm:registry --no-cache -docker push localhost:32000/osm-lcm:registry -``` +Once installed, you can type `osm` to see a list of commands. -Finally the image config variable will be updated in the charm with the new tag. +Since we are installing the OSM Client in a host different from OSM's at a minimum you will need to specify the OSM host, either via an environment variable or via the osm command line. For instance, you can set your client to access an OSM host running at `10.80.80.5` by using: ```bash -juju config lcm-k8s image=localhost:32000/osm-lcm:registry +export OSM_HOSTNAME="10.80.80.5" ``` -If the upgrades are executed several times, different tag names will have to be used, due to their not being an automatic pull of the images. +For additional options, see `osm --help` for more info, and check our OSM client reference guide [here](10-osm-client-commands-reference.md) diff --git a/04-vim-setup.md b/04-vim-setup.md index dd8b2c1cbdbd45a14e4de8fd04aa869f9ef04996..e12d27c37e99ee2d1c4aa07bacbce9864c0049dc 100644 --- a/04-vim-setup.md +++ b/04-vim-setup.md @@ -378,7 +378,7 @@ Additional optional configuration: **NOTE for VNF Onboarding:** You need to make sure that your VNF packages include a reference to an appropriate alternative image in Microsoft Azure's image repository. In case you are creating a VNF Package from scratch, please note you should use the full Azure image name: `publisher:offer:sku:version` (e.g. `Canonical:UbuntuServer:18.04-LTS:18.04.201809110`). -## Google Cloud Platform (GCP) +## Google Cloud Platform ### Preparation for using GCP in OSM @@ -430,7 +430,6 @@ Eclipse fog05 (can be read as _fog-O-five_ or _fog-O-S_) is a different kind of It stores information in a distributed key-value store that then is able to provide location transparency to the user, and all the state information are stored in it. - #### Upload Images Image registration can be done by using the python rest API. First generate the descriptor of your image: @@ -788,7 +787,6 @@ The previous configuration has taken as a reference the documents in the links b - - - ## Distributed VCA You can configure the VIM to use a Distributed VCA instead of using the default one. **[This section](06-osm-platform-configuration.html#distributed-vca)** explains the details on how to set everything up. diff --git a/07-what-to-read-next.md b/07-what-to-read-next.md index 47e6c4f9f8e157516a85860beb01111152826fb8..3c36a6a69daabecc1f3f07582a25b768e8cdd24b 100644 --- a/07-what-to-read-next.md +++ b/07-what-to-read-next.md @@ -1,6 +1,6 @@ # What to read next -[latest-hackfest]: https://osm.etsi.org/wikipub/index.php/8th_OSM_Hackfest#Hackfest_Material +[latest-hackfest]: https://osm.etsi.org/wikipub/index.php/Latest_OSM_Hackfest_Material#Hackfest_Material [developer-guide]: https://osm.etsi.org/docs/developer-guide/ If you want to learn more, these additional contents are highly recommended: diff --git a/09-troubleshooting.md b/09-troubleshooting.md index 65fe5ab4dc374e592023dfaf340323baaa67f371..81d33799d88c99057e09c40f34eda73dc966f9a5 100644 --- a/09-troubleshooting.md +++ b/09-troubleshooting.md @@ -47,34 +47,6 @@ kubectl -n osm get all All the deployments and statefulsets should have 1 replica: 1/1 -#### Checking whether all processes/services are running in docker swarm - -```bash -docker stack ps osm |grep -i running -``` - -All the services should have at least 1 replica: 1/1 - -```bash -$ docker service ls - -ID NAME MODE REPLICAS IMAGE PORTS -paxqvnwwubcf osm_grafana replicated 1/1 grafana/grafana:latest *:3000->3000/tcp -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_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 -vjyee8af3a8r osm_nbi replicated 1/1 opensourcemano/nbi:8 *:9999->9999/tcp -ihdjxn68aa4p osm_pol replicated 1/1 opensourcemano/pol:8 -tnk91kubxfvk osm_prometheus replicated 1/1 prom/prometheus:latest *:9091->9090/tcp -4e5c49m9x0by osm_prometheus-cadvisor replicated 1/1 google/cadvisor:latest *:8080->8080/tcp -m1cxap6wkxmf osm_ro replicated 1/1 opensourcemano/ro:8 *:9090->9090/tcp -97r6t2zrs4ho osm_zookeeper replicated 1/1 wurstmeister/zookeeper:latest -``` - ### Issues on standard installation #### Juju @@ -609,56 +581,6 @@ kubectl -n osm logs -f statefulset/zookeeper --all-containers=true 2>&1 | tee zo kubectl -n osm logs -f statefulset/prometheus --all-containers=true 2>&1 | tee prometheus-log.txt ``` -### Checking the logs in Docker Swarm - -You can check the logs of any container with the following commands: - -```bash -docker logs $(docker ps -aqf "name=osm_mon.1" -n 1) -docker logs $(docker ps -aqf "name=osm_pol" -n 1) -docker logs $(docker ps -aqf "name=osm_lcm" -n 1) -docker logs $(docker ps -aqf "name=osm_nbi" -n 1) -docker logs $(docker ps -aqf "name=osm_ng-ui" -n 1) -docker logs $(docker ps -aqf "name=osm_ro.1" -n 1) -docker logs $(docker ps -aqf "name=osm_ro-db" -n 1) -docker logs $(docker ps -aqf "name=osm_mongo" -n 1) -docker logs $(docker ps -aqf "name=osm_kafka" -n 1) -docker logs $(docker ps -aqf "name=osm_zookeeper" -n 1) -docker logs $(docker ps -aqf "name=osm_keystone.1" -n 1) -docker logs $(docker ps -aqf "name=osm_keystone-db" -n 1) -docker logs $(docker ps -aqf "name=osm_prometheus" -n 1) -``` - -For live debugging, the following commands can be useful to save the log output to a file and show it in the screen: - -```bash -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 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 -docker logs -f $(docker ps -aqf "name=osm_kafka" -n 1) 2>&1 | tee kafka-log.txt -docker logs -f $(docker ps -aqf "name=osm_zookeeper" -n 1) 2>&1 | tee zookeeper-log.txt -docker logs -f $(docker ps -aqf "name=osm_keystone.1" -n 1) 2>&1 | tee keystone-log.txt -docker logs -f $(docker ps -aqf "name=osm_keystone-db" -n 1) 2>&1 | tee keystonedb-log.txt -docker logs -f $(docker ps -aqf "name=osm_prometheus" -n 1) 2>&1 | tee prometheus-log.txt -``` - -For each container, logs can be found under: - -```bash -/var/lib/docker/containers/DOCKER_ID/DOCKER_ID-json.log -``` - -And the DOCKER_ID can be obtained this way, e.g. for MON - -```bash -docker ps -aqf "name=osm_mon.1" -n 1 --no-trunc -``` - ### Changing the log level You can change the log level of any container, by updating the container with the right `LOG_LEVEL` env var. diff --git a/10-osm-client-commands-reference.md b/10-osm-client-commands-reference.md index 78a24268ce09f90e8371dffb4b87587cdd98f06c..3b13945e6ddeb2b94117f221d43fbef00712eb93 100644 --- a/10-osm-client-commands-reference.md +++ b/10-osm-client-commands-reference.md @@ -153,8 +153,8 @@ In order to install the OSM Client in your local Linux machine, you should follo ```bash # Clean the previous repos that might exist sudo sed -i "/osm-download.etsi.org/d" /etc/apt/sources.list -wget -qO - https://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - -sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseTEN stable devops IM osmclient" +wget -qO - https://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/OSM%20ETSI%20Release%20Key.gpg | sudo apt-key add - +sudo add-apt-repository -y "deb [arch=amd64] https://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN stable devops IM osmclient" sudo apt-get update sudo apt-get install -y python3-pip sudo -H python3 -m pip install -U pip diff --git a/11-osm-im.md b/11-osm-im.md index 1884e8ff99b9a8708178e3572720ea4b0c6f1860..52e25d5b49763305ef3b0e785b93fcb55ef0ba97 100644 --- a/11-osm-im.md +++ b/11-osm-im.md @@ -14,21 +14,21 @@ Below you can find tree representations of the VNFD (VNF Descriptor), NSD (Netwo ### VNFD tree -* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.html) +* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.html) -* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.tree.txt) +* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.tree.txt) ### NSD tree -* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/etsi-nfv-nsd.html) +* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/etsi-nfv-nsd.html) -* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/etsi-nfv-nsd.tree.txt) +* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/etsi-nfv-nsd.tree.txt) ### NST tree -* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/nst.html) +* [Navigable Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/nst.html) -* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseTEN/docs/osm-im/osm_im_trees/nst.tree.txt) +* [Plain Text Version](http://osm-download.etsi.org/repository/osm/debian/ReleaseELEVEN/docs/osm-im/osm_im_trees/nst.tree.txt) ## OSM URN Namespace