diff --git a/03-installing-osm.md b/03-installing-osm.md index ca33dcd4ec60255956d96b084eaaa7537a2d56ac..bf5700b88282054122f0c858596c51122ef73fe1 100644 --- a/03-installing-osm.md +++ b/03-installing-osm.md @@ -357,13 +357,13 @@ To install a previous version e.g. v6.0.3: 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 `releaseseven-daily` tag: ```bash -sudo sed -i "s/ro\:\${TAG\:-latest}/ro\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/lcm\:\${TAG\:-latest}/lcm\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/mon\:\${TAG\:-latest}/mon\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/pol\:\${TAG\:-latest}/pol\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/nbi\:\${TAG\:-latest}/nbi\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/light-ui\:\${TAG\:-latest}/light-ui\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml -sudo sed -i "s/keystone\:\${TAG\:-latest}/keystone\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/ro\:\${TAG\:-7}/ro\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/lcm\:\${TAG\:-7}/lcm\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/mon\:\${TAG\:-7}/mon\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/pol\:\${TAG\:-7}/pol\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/nbi\:\${TAG\:-7}/nbi\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/light-ui\:\${TAG\:-7}/light-ui\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml +sudo sed -i "s/keystone\:\${TAG\:-7}/keystone\:\${TAG\:-releaseseven-daily}/" /etc/osm/docker/docker-compose.yaml docker stack rm osm docker stack deploy -c /etc/osm/docker/docker-compose.yaml osm ``` diff --git a/04-vim-setup.md b/04-vim-setup.md index 78edb802ac2d4bac8fecf101ba74b0f92f15be59..565a5d32afd995fac1332ecf4dd04b658f67b69d 100644 --- a/04-vim-setup.md +++ b/04-vim-setup.md @@ -979,7 +979,7 @@ This is an example of the `port-mapping-file.yaml` content: # ... ``` -NOTE: several PCI addresses can be connected to the same swith port. This is because a physical interface has several SR-IOV virtual interfaces, each one with different PCI address. +NOTE: several PCI addresses can be connected to the same switch port. This is because a physical interface has several SR-IOV virtual interfaces, each one with different PCI address. NOTE: The optional `switch_id` provided at `--config` is taken as a default if missing in the port-mapping file. This is useful if there is only one switch. diff --git a/09-troubleshooting.md b/09-troubleshooting.md index 9a88735b0b0dacc1d82e061c36e9f2c362fbc79a..edaa29b0f098259aa590be5c0a8363ea56eaf049 100644 --- a/09-troubleshooting.md +++ b/09-troubleshooting.md @@ -498,7 +498,7 @@ docker service update osm_nbi --force You can check the logs of any container with the following commands: ```bash -docker logs $(docker ps -aqf "name=osm_mon" -n 1) +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) @@ -522,7 +522,7 @@ For each container, logs can be found under: And the DOCKER_ID can be obtained this way, e.g. for MON ```bash -docker ps -aqf "name=osm_mon" -n 1 --no-trunc +docker ps -aqf "name=osm_mon.1" -n 1 --no-trunc ``` ### Changing the log level diff --git a/15-k8s-installation.md b/15-k8s-installation.md index 88ae60fd8b9031c21770063a9b41beae752eee68..916809e6b4bb3562e8c6fbebc3949b036ca7beb8 100644 --- a/15-k8s-installation.md +++ b/15-k8s-installation.md @@ -4,10 +4,14 @@ This section illustrates a safe procedure to setup a Kubernetes cluster that mee There are two modes to represent a K8s cluster in OSM. -1. Inside a VIM (single and multinet): - ![k8s-in-vim-multinet](assets/800px-k8s-in-vim-multinet.png) +1. Inside a VIM (single-net and multi-net): + ![k8s-in-vim-singlenet](assets/800px-k8s-in-vim-singlenet.png) + + ![k8s-in-vim-multinet](assets/800px-k8s-in-vim-multinet.png) + 2. Outside a VIM: + ![k8s-out-vim](assets/800px-k8s-out-vim.png) Your Kubernetes cluster needs to meet the following requirements: @@ -24,7 +28,90 @@ Here we will analyse three methods to create a Kubernetes cluster: ## Installation method 1: OSM Kubernetes cluster from an OSM Network Service -TODO: VNF and NS Packages to be made available soon. +A K8s cluster can be deployed using the following OSM packages: + +- [k8s_jujucontroller_vnf](http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_jujucontroller_vnf.tar.gz) +- [k8s_jujumachine_vnf](http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_jujumachine_vnf.tar.gz) +- [k8s_juju](http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_juju_ns.tar.gz) + +The NS (k8s_juju) consists of 1 deployer (k8s_jujucontroller_vnf) and 4 nodes (k8s_jujumachine_vnf) connected to a single network or vld (mgmtnet). The deployer is a Kubernetes installer based on Juju: it will configure the other 4 nodes to run a Kubernetes cluster. Behind the scenes, the deployer is a Juju controller where the 4 nodes are manually added to a Juju model, then a juju bundle is deployed on that model. + +The following figure illustrates the NS. + +![k8s-cluster-with-osm-packages](assets/800px-k8s-cluster-with-osm-packages.png) + +### Onboard NF and NS packages + +```bash +wget http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_jujucontroller_vnf.tar.gz +wget http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_jujumachine_vnf.tar.gz +wget http://osm-download.etsi.org/ftp/Packages/hackfests/k8s_juju_ns.tar.gz +osm nfpkg-create k8s_jujumachine_vnf.tar.gz +osm nfpkg-create k8s_jujucontroller_vnf.tar.gz +osm nspkg-create k8s_juju_ns.tar.gz +``` + +### Instantiate the NS + +```bash +osm ns-create --ns_name k8s-cluster --nsd_name k8s_juju --vim_account --config_file config.yaml --ssh_keys ${HOME}/.ssh/id_rsa.pub +``` + +Instantiation parameters are controlled by `config.yaml`. The relevant parameters are the IP addresses to be assigned to each machine (in the example below, `192.168.0.X`) and the network in the VIM where all nodes will be connected (`mgmt` in the example below): + +```yaml +--- +additionalParamsForVnf: + - + member-vnf-index: k8s_juju + additionalParams: + MACHINE1: "192.168.0.161" + MACHINE2: "192.168.0.162" + MACHINE3: "192.168.0.163" + MACHINE4: "192.168.0.164" + MACHINE5: "" + MACHINE6: "" + MACHINE7: "" + MACHINE8: "" + MACHINE9: "" + MACHINE10: "" + BUNDLE: "" +vld: + - + name: mgmtnet + vim-network-name: mgmt #The network in the VIM to connect all nodes of the clusters + vnfd-connection-point-ref: + - + ip-address: "192.168.0.161" + member-vnf-index-ref: k8s_vnf1 + vnfd-connection-point-ref: mgmt + - + ip-address: "192.168.0.162" + member-vnf-index-ref: k8s_vnf2 + vnfd-connection-point-ref: mgmt + - + ip-address: "192.168.0.163" + member-vnf-index-ref: k8s_vnf3 + vnfd-connection-point-ref: mgmt + - + ip-address: "192.168.0.164" + member-vnf-index-ref: k8s_vnf4 + vnfd-connection-point-ref: mgmt + - + ip-address: "192.168.0.170" + member-vnf-index-ref: k8s_juju + vnfd-connection-point-ref: mgmt +``` + +### Get kubeconfig file + +Connect to the machine running juju and get kubeconfig file: + +```bash +osm vnf-list --ns k8s-cluster --filter vnfd-ref=k8s_jujucontroller_vnf +ssh ubuntu@ +cat .kube/config +``` ## Installation method 2: Local development environment diff --git a/LICENSE b/LICENSE index 90fe0f2d2803fbb0333aa1d81b7d2ca86f9b2a92..8dada3edaf50dbc082c9a125058f25def75e625a 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2020 osm + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/assets/800px-k8s-cluster-with-osm-packages.png b/assets/800px-k8s-cluster-with-osm-packages.png new file mode 100644 index 0000000000000000000000000000000000000000..c55fa318250b65f636ff95573d5da6212e65f7e7 Binary files /dev/null and b/assets/800px-k8s-cluster-with-osm-packages.png differ