diff --git a/01-quickstart.md b/01-quickstart.md index e4dd0141b67a665ecb2cf5c725b3976b07ea2e03..e63abef0f8cbc608af5593899290788004956f06 100644 --- a/01-quickstart.md +++ b/01-quickstart.md @@ -227,9 +227,7 @@ Just access the *VIM Accounts* tab, click the *New VIM* button and fill the para ## Deploying your first Network Service -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`. +Before going on, get the required NF and NS packages from [Gitlab osm-packages repository](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages). ### Onboarding a VNF diff --git a/05-osm-usage.md b/05-osm-usage.md index d0a33fc3c5361578289fe7a85d7baf37b52409f9..0bc0a95ec8ba73d1a71f5f7689b1c928aa1944d3 100644 --- a/05-osm-usage.md +++ b/05-osm-usage.md @@ -1,10 +1,14 @@ # OSM Usage -## Deploying your first Network Service +## How to deploy your first Network Service -Before going on, download the required VNF and NS packages from this URL: +Before going on, clone VNF and NS packages from [Gitlab osm-packages repository](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages) -### Onboarding a VNF +```bash +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +``` + +### Onboarding a VNF package The onboarding of a VNF in OSM involves preparing and adding the corre sponding 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. @@ -20,14 +24,6 @@ For instance, this is the OpenStack command for uploading images: openstack image create --file="./bionic-server-cloudimg-amd64.img" --container-format=bare ubuntu18.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 ./bionic-server-cloudimg-amd64.img /mnt/openvim-nfs/ -openvim image-create --name cirros034 --path /mnt/openvim-nfs/bionic-server-cloudimg-amd64.img -``` - #### Onboarding a VNF Package - From the UI: @@ -39,7 +35,9 @@ openvim image-create --name cirros034 --path /mnt/openvim-nfs/bionic-server-clou - From OSM client: ```bash -osm nfpkg-create hackfest_basic_vnf.tar.gz +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +cd osm-packages +osm nfpkg-create hackfest_basic_vnf osm nfpkg-list ``` @@ -54,7 +52,8 @@ osm nfpkg-list - From OSM client: ```bash -osm nspkg-create hackfest_basic_ns.tar.gz +cd osm-packages +osm nspkg-create hackfest_basic_ns osm nspkg-list ``` @@ -78,7 +77,7 @@ osm ns-create --ns_name --nsd_name hackfest_basic-ns --vim_ac osm ns-list ``` -## Updating the VNF instance in a Network Service +## How to update the VNF instance in a Network Service If you have an active network service and you would like to update the one of your running VNF instances, you can follow the below steps in order to update it. @@ -337,7 +336,7 @@ In this scenario, the mapping can be specified in the following way, where `"1"` --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: netVIM1} ] } ] }' ``` -You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [US1604](https://osm-download.etsi.org/ftp/images/tests/US1604.qcow2)**) in the following way: +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: ```bash osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, vim-network-name: mgmt} ] } ] }' @@ -353,58 +352,55 @@ The mapping can be specified in the following way, where `vldnet` is the name of You can try it using one of the examples of the hackfest (**packages: [hackfest_basic_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_vnf), [hackfest_basic_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_ns)); images: [ubuntu18.04](https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img)**) in the following way: + ```bash osm ns-create --ns_name hf-basic --nsd_name hackfest_basic-ns --vim_account openstack1 --config '{vld: [ {name: mgmtnet, provider-network: {physical-network: physnet1, network-type: vlan, segmentation-id: 400} } ] }' ``` ### Specify IP profile information and IP for a NS VLD -In a generic way, the mapping can be specified in the following way, where `datanet` is the name of the network in the NS descriptor, ip-profile is where you have to fill the associated parameters from the data model ( [NS data model](http://osm-download.etsi.org/ftp/osm-doc/etsi-nfv-nsd.html) ), and vnfd-connection-point-ref is the reference to the connection point: +In a generic way, the mapping can be specified in the following way, where `datanet` is the name of the network in the NS descriptor, ip-profile is where you have to fill the associated parameters from the data model ( [NS data model](https://osm-download.etsi.org/repository/osm/debian/ReleaseTHIRTEEN/docs/osm-im/osm_im_trees/etsi-nfv-nsd.html) ), and vnfd-connection-point-ref is the reference to the connection point: ```yaml --config '{vld: [ {name: datanet, ip-profile: {...}, vnfd-connection-point-ref: {...} } ] }' ``` -TODO: update example with latest Hackfest - -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: ```bash -osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vld: [ {name: datanet, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}],dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, vnfd-connection-point-ref: [ {member-vnf-index-ref: "1", vnfd-connection-point-ref: vnf-data, ip-address: "192.168.100.17"}]}]}' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vld: [ {name: datanet, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}],dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, vnfd-connection-point-ref: [ {member-vnf-index-ref: vnf1, vnfd-connection-point-ref: vnf-data, ip-address: "192.168.100.17"}]}]}' ``` ### Specify IP profile information for an internal VLD of a VNF -In this scenario, the mapping can be specified in the following way, where `"1"` is the member vnf index of the constituent vnf in the NS descriptor, `internal` is the name of internal-vld in the VNF descriptor and ip-profile is where you have to fill the associated parameters from the data model ([VNF data model](http://osm-download.etsi.org/ftp/osm-doc/etsi-nfv-vnfd.html)): +In this scenario, the mapping can be specified in the following way, where `vnf1` is the member vnf index of the constituent vnf in the NS descriptor, `internal` is the name of internal-vld in the VNF descriptor and ip-profile is where you have to fill the associated parameters from the data model ([VNF data model](https://osm-download.etsi.org/repository/osm/debian/ReleaseTHIRTEEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.html)): ```yaml ---config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...} ] } ] }' +--config '{vnf: [ {member-vnf-index: vnf1, internal-vld: [ {name: internal, ip-profile: {...} ] } ] }' ``` -TODO: update example with latest Hackfest +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: ```bash -osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}}]}]} ' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf1, internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}}]}]} ' ``` ### Specify IP address and/or MAC address for an interface #### Specify IP address for an interface -In this scenario, the mapping can be specified in the following way, where `"1"` is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor, ip-profile is where you have to fill the associated parameters from the data model ([VNF data model](http://osm-download.etsi.org/ftp/osm-doc/etsi-nfv-vnfd.html)), `id1` is the internal-connection-point id and `a.b.c.d` is the IP that you have to specify for this scenario: +In this scenario, the mapping can be specified in the following way, where `vnf1` is the member vnf index of the constituent vnf in the NS descriptor, 'internal' is the name of internal-vld in the VNF descriptor, ip-profile is where you have to fill the associated parameters from the data model ([VNF data model](https://osm-download.etsi.org/repository/osm/debian/ReleaseTHIRTEEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.html)), `id1` is the internal-connection-point id and `a.b.c.d` is the IP that you have to specify for this scenario: ```yaml ---config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {...}, internal-connection-point: [{id-ref: id1, ip-address: "a.b.c.d"}] ] } ] }' +--config '{vnf: [ {member-vnf-index: vnf1, internal-vld: [ {name: internal, ip-profile: {...}, internal-connection-point: [{id-ref: id1, ip-address: "a.b.c.d"}] ] } ] }' ``` -TODO: update example with latest Hackfest +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: ```bash - osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4 ,subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, internal-connection-point: [{id-ref: mgmtVM-internal, ip-address: "192.168.100.3"}]}]}]}' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf1, internal-vld: [ {name: internal, ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] ,dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true}}, internal-connection-point: [{id-ref: mgmtVM-internal, ip-address: "192.168.100.3"}]}]}]}' ``` #### Specify MAC address for an interface @@ -415,24 +411,21 @@ In this scenario, the mapping can be specified in the following way, where `"1"` --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, mac-address: "aa:bb:cc:dd:ee:ff" }]} ] } ] } ' ``` -TODO: update example with latest Hackfest - -You can try it using one of the examples of the hackfest (**descriptors: [hackfest1-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz), [hackfest1-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz); images: [ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [creating a basic VNF and NS](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf)**) in the following way: +You can try it using one of the examples of the hackfest (**packages: [hackfest_basic_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_vnf), [hackfest_basic_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_ns)); images: [ubuntu18.04](https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img)**) in the following way: ```bash -osm ns-create --ns_name hf12 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, interface: [{name: vdu-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } ' +osm ns-create --ns_name hf-basic --nsd_name hackfest_basic-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf, vdu: [ {id: hackfest_basic-vnf, interface: [{name: vdu-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } ' ``` #### Specify IP address and MAC address for an interface In the following scenario, we will bring together the two previous cases. -TODO: update example with latest Hackfest +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: ```bash -osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account ost4 --config '{vnf: [ {member-vnf-index: "1", internal-vld: [ {name: internal , ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] , dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true} }, internal-connection-point: [ {id-ref: mgmtVM-internal, ip-address: "192.168.100.3"} ] }, ], vdu: [ {id: mgmtVM, interface: [{name: mgmtVM-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } ' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf1, internal-vld: [ {name: internal , ip-profile: {ip-version: ipv4, subnet-address: "192.168.100.0/24", gateway-address: "0.0.0.0", dns-server: [{address: "8.8.8.8"}] , dhcp-params: {count: 100, start-address: "192.168.100.20", enabled: true} }, internal-connection-point: [ {id-ref: mgmtVM-internal, ip-address: "192.168.100.3"} ] }, ], vdu: [ {id: mgmtVM, interface: [{name: mgmtVM-eth0, mac-address: "52:33:44:55:66:21"}]} ] } ] } ' ``` ### Force floating IP address for an interface @@ -440,15 +433,13 @@ osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account ost4 --config In a generic way, the mapping can be specified in the following way, where `id1` is the name of the VDU in the VNF descriptor and `interf1` is the name of the interface: ```yaml ---config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: id1, interface: [{name: interf1, floating-ip-required: True }]} ] } ] } ' +--config '{vnf: [ {member-vnf-index: vnf1, vdu: [ {id: id1, interface: [{name: interf1, floating-ip-required: True }]} ] } ] } ' ``` -TODO: update example with latest Hackfest - -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: ```bash -osm ns-create --ns_name hf2 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu:[ {id: mgmtVM, interface: [{name: mgmtVM-eth0, floating-ip-required: True }]} ] } ] } ' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf1, vdu:[ {id: mgmtVM, interface: [{name: mgmtVM-eth0, floating-ip-required: True }]} ] } ] } ' ``` Make sure that the target specified in `vim-network-name` of the NS Package is made available from outside to be able to use the parameter `floating-ip-required`. @@ -458,16 +449,13 @@ Make sure that the target specified in `vim-network-name` of the NS Package is m In this scenario, the mapping can be specified in the following way, where `"1"` and `"2"` are the member vnf index of the constituent vnfs in the NS descriptor, `vim1` and `vim2` are the names of vim accounts and `netVIM1` and `netVIM2` are the VIM networks that you want to use: ```yaml ---config '{vnf: [ {member-vnf-index: "1", vim_account: vim1}, {member-vnf-index: "2", vim_account: vim2} ], vld: [ {name: datanet, vim-network-name: {vim1: netVIM1, vim2: netVIM2} } ] }' - # NOTE: From release SIX (current master) add 'wim_account: False' (inside --config) to avoid wim network connectivity if you have not a WIM in your system +--config '{vnf: [ {member-vnf-index: vnf1, vim_account: vim1}, {member-vnf-index: vnf2, vim_account: vim2} ], vld: [ {name: datanet, vim-network-name: {vim1: netVIM1, vim2: netVIM2} } ] }' ``` -TODO: update example with latest Hackfest - -You can try it using one of the examples of the hackfest (**descriptors: [hackfest2-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_vnfd.tar.gz), [hackfest2-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_2_nsd.tar.gz); images:[ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [modeling multi-VDU VNF](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%203%20-%20Modeling%20multi-VDU%20VNF%20v2.pdf)**) in the following way: +You can try it using one of the examples of the hackfest (**packages: [hackfest_multivdu_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_vnf), [hackfest_multivdu_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_multivdu_ns)); images: [ubuntu20.04](https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img)**) in the following way: ```bash -osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vim_account: openstack1}, {member-vnf-index: "2", vim_account: openstack3} ], vld: [ {name: mgmtnet, vim-network-name: {openstack1: mgmt, openstack3: mgmt} } ] }' +osm ns-create --ns_name hf-multivdu --nsd_name hackfest_multivdu-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf1, vim_account: openstack1}, {member-vnf-index: "2", vim_account: openstack3} ], vld: [ {name: mgmtnet, vim-network-name: {openstack1: mgmt, openstack3: mgmt} } ] }' ``` ### Specifying a volume ID for a VNF volume @@ -475,14 +463,15 @@ osm ns-create --ns_name hf12 --nsd_name hackfest2-ns --vim_account openstack1 -- In a generic way, the mapping can be specified in the following way, where `VM1` is the name of the VDU, `Storage1` is the volume name in VNF descriptor and `05301095-d7ee-41dd-b520-e8ca08d18a55` is the volume id: ```yaml ---config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: VM1, volume: [ {name: Storage1, vim-volume-id: 05301095-d7ee-41dd-b520-e8ca08d18a55} ] } ] } ] }' +--config '{vnf: [ {member-vnf-index: vnf1, vdu: [ {id: VM1, volume: [ {name: Storage1, vim-volume-id: 05301095-d7ee-41dd-b520-e8ca08d18a55} ] } ] } ] }' ``` -TODO: update example with latest Hackfest +You can try it using one of the examples of the hackfest (**packages: [hackfest_basic_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_vnf), [hackfest_basic_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/hackfest_basic_ns)); images: [ubuntu18.04](https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img)**) in the following way: -You can try it using one of the examples of the hackfest (**descriptors: [hackfest1-vnf](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_vnfd.tar.gz), [hackfest1-ns](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/packages/hackfest_1_nsd.tar.gz); images: [ubuntu1604](https://osm-download.etsi.org/ftp/osm-3.0-three/1st-hackfest/images/US1604.qcow2), presentation: [creating a basic VNF and NS](https://osm-download.etsi.org/ftp/osm-4.0-four/3rd-hackfest/presentations/20180626%20OSM%20Hackfest%20-%20Session%202%20-%20Creating%20a%20basic%20VNF%20and%20NS.pdf)**) in the following way: +```bash +osm ns-create --ns_name hf-basic --nsd_name hackfest_basic-ns -With the previous hackfest example, according [VNF data model](http://osm-download.etsi.org/ftp/osm-doc/etsi-nfv-vnfd.html) you will add in VNF Descriptor: +With the previous hackfest example, according [VNF data model](https://osm-download.etsi.org/repository/osm/debian/ReleaseTHIRTEEN/docs/osm-im/osm_im_trees/etsi-nfv-vnfd.html) you will add in VNF Descriptor: ```yaml volumes: @@ -493,7 +482,7 @@ With the previous hackfest example, according [VNF data model](http://osm-downlo Then: ```bash -osm ns-create --ns_name h1 --nsd_name hackfest1-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: "1", vdu: [ {id: hackfest1VM, volume: [ {name: Storage1, vim-volume-id: 8ab156fd-0f8e-4e01-b434-a0fce63ce1cf} ] } ] } ] }' +osm ns-create --ns_name hf-basic --nsd_name hackfest_basic-ns --vim_account openstack1 --config '{vnf: [ {member-vnf-index: vnf, vdu: [ {id: hackfest_basic-VM, volume: [ {name: Storage1, vim-volume-id: 8ab156fd-0f8e-4e01-b434-a0fce63ce1cf} ] } ] } ] }' ``` ### Adding additional parameters @@ -530,7 +519,7 @@ vnfd: And they can be provided with: ```yaml ---config '{additionalParamsForVnf: [{member-vnf-index: "1", additionalParams: {touch_filename: your-value, touch_filename2: your-value2}}]}' +--config '{additionalParamsForVnf: [{member-vnf-index: vnf1, additionalParams: {touch_filename: your-value, touch_filename2: your-value2}}]}' ``` ### Specifying an affinity-or-anti affinity group @@ -846,70 +835,45 @@ For detailed instructions on how to add cloud-init or charms to your VNF, visit - [VNF Onboarding Guidelines, Day-1](https://osm.etsi.org/docs/vnf-onboarding-guidelines/03-day1.html) - [VNF Onboarding Guidelines, Day-2](https://osm.etsi.org/docs/vnf-onboarding-guidelines/04-day2.html) -Furthermore, you can find a good explanation and examples [in this presentation](http://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/presentations/8th%20OSM%20Hackfest%20-%20Session%207.1%20-%20Introduction%20to%20Proxy%20Charms.pdf) - ## Monitoring and autoscaling ### Performance Management -#### VNF Metrics Collection - -OSM MON features a "mon-collector" module which will collect metrics whenever specified at the descriptor level. For metrics to be collected, they have to exist first at any of these two levels: +#### VNF performance management -- NFVI - made available by VIM's Telemetry System -- VNF - made available by OSM VCA (Juju Metrics) +OSM automatically monitors the status of every VM running in the VIM account. In addition, OSM can collect VM resource consumption metrics such as CPU usage, memory usage, disk usage, and I/O packet rates. For resource consumption metrics to be collected, your VIM must support a Telemetry system. Currently, the collection of VM resource consumption metrics in OSM works with: -Reference diagram: - -![OSM Performance Management Reference Diagram](assets/800px-Osm_pm_rel5.png) - -##### VIM Metrics - -For VIM metrics to be collected, your VIM should support a Telemetry system. As of Release 7.0, metric collection works with: - -- OpenStack VIM legacy or Gnocchi-based telemetry services. +- OpenStack telemetry services: VIM-legacy (ceilometer-based), Gnocchi-based or Prometheus. +- Microsoft Azure. +- Google Cloud Platform. - VMware vCloud Director with vRealizeOperations. Next step is to activate metrics collection at your VNFDs. Every metric to be collected from the VIM for each VDU has to be described both at the VDU level, and then at the VNF level. For example: ```yaml vdu: -id: vdu1 + id: hackfest_basic_metrics-VM ... - monitoring-param: - - id: metric_vdu1_cpu - nfvi-metric: cpu_utilization - - id: metric_vdu1_memory - nfvi-metric: average_memory_utilization -... -monitoring-param: -- id: metric_vim_vnf1_cpu - name: metric_vim_vnf1_cpu - aggregation-type: AVERAGE - vdu-monitoring-param: - vdu-ref: vdu1 - vdu-monitoring-param-ref: metric_vdu1_cpu -- id: metric_vim_vnf1_memory - name: metric_vim_vnf1_memory - aggregation-type: AVERAGE - vdu-monitoring-param: - vdu-ref: vdu1 - vdu-monitoring-param-ref: metric_vdu1_memory + monitoring-parameter: + - id: vnf_cpu_util + name: vnf_cpu_util + performance-metric: cpu_utilization + - id: vnf_memory_util + name: vnf_memory_util + performance-metric: average_memory_utilization + - id: vnf_packets_sent + name: vnf_packets_sent + performance-metric: packets_sent + - id: vnf_packets_received + name: vnf_packets_received + performance-metric: packets_received ``` -As you can see, a list of "NFVI metrics" is defined first at the VDU level, which contains an ID and the corresponding normalized metric name (in this case, `cpu_utilization` and `average_memory_utilization`) Then, at the VNF level, a list of `monitoring-params` is referred, with an ID, name, aggregation-type and their source (`vdu-monitoring-param` in this case) - -###### Additional notes +As you can see, a list of "NFVI metrics" is defined first at the VDU level, which contains an ID and the corresponding normalized metric name (in this case, `cpu_utilization` and `average_memory_utilization`). Normalized metric names are: `cpu_utilization`, `average_memory_utilization`, `disk_read_ops`, `disk_write_ops`, `disk_read_bytes`, `disk_write_bytes`, `packets_received`, `packets_sent`, `packets_out_dropped`, `packets_in_dropped` -- Available attributes and values can be directly explored at the [OSM Information Model](11-osm-im.md) -- A complete VNFD example can be downloaded from [here](https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/webserver_vimmetric_autoscale_vnfd.tar.gz). -- Normalized metric names are: `cpu_utilization`, `average_memory_utilization`, `disk_read_ops`, `disk_write_ops`, `disk_read_bytes`, `disk_write_bytes`, `packets_received`, `packets_sent`, `packets_out_dropped`, `packets_in_dropped` +Available attributes and values can be directly explored at the [OSM Information Model](11-osm-im.md). A complete VNFD example can be downloaded from [here](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/blob/master/hackfest_basic_metrics_vnf). -###### OpenStack-specific notes - -Since Rel SIX onwards, MON collects the last measure for the corresponding metric, so no further configuration (i.e. granularity) is needed anymore. - -###### VMware vCD specific notes +##### VMware vCD specific notes (OLD) Since REL6 onwards, MON collects all the normalized metrics, with the following exceptions: @@ -929,107 +893,6 @@ Although it is not recommended, if a more frequent interval is desired, the foll - Edit the Collection Interval (Minutes) value and set to the desired value. - Click OK to save the change. -##### VNF Metrics/Indicators - -Metrics can also be collected directly from VNFs using VCA, through the [Juju Metrics](https://docs.jujucharms.com/2.4/en/developer-metrics) framework. A simple charm containing a metrics.yaml file at its root folder specifies the metrics to be collected and the associated command. - -For example, the following metrics.yaml file collects three metrics from the VNF, called 'users', 'load' and 'load_pct' - -```yaml -metrics: - users: - type: gauge - description: "# of users" - command: who|wc -l - load: - type: gauge - description: "5 minute load average" - command: cat /proc/loadavg |awk '{print $1}' - load_pct: - type: gauge - description: "1 minute load average percent" - command: cat /proc/loadavg | awk '{load_pct=$1*100.00} END {print load_pct}' -``` - -Please note that the granularity of this metric collection method is fixed to 5 minutes and cannot be changed at this point. - -After metrics.yaml is available, there are two options for describing the metric collection in the VNFD: - -###### 1) VNF-level VNF metrics - -```yaml -mgmt-interface: - cp: vdu_mgmt # is important to set the mgmt VDU or CP for metrics collection -vnf-configuration: - initial-config-primitive: - ... - juju: - charm: testmetrics - metrics: - - name: load - - name: load_pct - - name: users -... -monitoring-param: -- id: metric_vim_vnf1_load - name: metric_vim_vnf1_load - aggregation-type: AVERAGE - vnf-metric: - vnf-metric-name-ref: load -- id: metric_vim_vnf1_loadpct - name: metric_vim_vnf1_loadpct - aggregation-type: AVERAGE - vnf-metric: - vnf-metric-name-ref: load_pct -``` - -Additional notes: - -- Available attributes and values can be directly explored at the [OSM Information Model](11-osm-im.md) -- A complete VNFD example with VNF metrics collection (VNF-level) can be downloaded from [here](https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/ubuntuvm_vnfmetric_autoscale_vnfd.tar.gz). - -###### 2) VDU-level VNF metrics - -```yaml -vdu: -- id: vdu1 - ... - interface: - - ... - mgmt-interface: true ! is important to set the mgmt interface for metrics collection - ... - vdu-configuration: - initial-config-primitive: - ... - juju: - charm: testmetrics - metrics: - - name: load - - name: load_pct - - name: users -... -monitoring-param: -- id: metric_vim_vnf1_load - name: metric_vim_vnf1_load - aggregation-type: AVERAGE - vdu-metric: - vdu-ref: vdu1 - vdu-metric-name-ref: load -- id: metric_vim_vnf1_loadpct - name: metric_vim_vnf1_loadpct - aggregation-type: AVERAGE - vdu-metric: - vdu-ref: vdu1 - vdu-metric-name-ref: load_pct -``` - -Additional notes: - -- Available attributes and values can be directly explored at the [OSM Information Model](11-osm-im.md) -- A complete VNFD example with VNF metrics collection (VDU-level) can be downloaded from [here](https://osm-download.etsi.org/ftp/osm-4.0-four/4th-hackfest/packages/ubuntuvm_vnfvdumetric_autoscale_vnfd.tar.gz). - -As in VIM metrics, a list of "metrics" is defined first either at the VNF or VDU "configuration" level, which contain a name that comes from the metrics.yaml file. Then, at the VNF level, a list of monitoring-params is referred, with an ID, name, aggregation-type and their source, which can be a "vdu-metric" or a "vnf-metric" in this case. - #### Infrastructure Status Collection OSM MON collects, automatically, "status metrics" for: @@ -1221,66 +1084,6 @@ vdu: Regarding how to configure alarms through VNFDs for the auto-scaling use case, follow the [auto-scaling documentation](#autoscaling) -#### Experimental functionality - -An optional 'OSM ELK' stack is available to allow for events visualization, consisting of the following tools: - -- **Elastisearch** - scalable search engine and event database. -- **Filebeat & Metricbeat** - part of Elastic 'beats', which evolve the former Logstash component to provide generic logs and metrics collection, respectively. -- **Kibana** - Graphical tool for exploring all the collected events and generating customized views and dashboards. - -##### Enabling the OSM ELK Stack - -If you want to install OSM along with the ELK stack, run the installer as follows: - -```bash -./install_osm.sh --elk_stack -``` - -If you just want to add the ELK stack to an existing OSM installation, run the installer as follows: - -```bash - ./install_osm.sh -o elk_stack -``` - -This will install four additional docker containers (Elasticsearch, Filebeat, Metricbeat and Kibana), as well as download a Docker image for an auxiliary tool named [Curator](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/index.html) (`bobrik`/`curator`) - -If you need to remove it at some point in time, just run the following command: - -```bash -docker stack rm osm_elk -``` - -If you need to deploy the stack again after being removed: - -```bash -docker stack deploy -c /etc/osm/docker/osm_elk/docker-compose.yml osm_elk -``` - -**IMPORTANT**: As time passes and more events are generated in your system, and depending on your configured searches, views and dashboards, Elasticsearch database which become very big, which may not be desirable in testing environments. In order to delete your data periodically, you can launch a Curator container that will delete the saved indexes, freeing the associated disk space. - -For example, to delete all the data older than the last day: - -```bash -docker run --rm --name curator --net host --entrypoint curator_cli bobrik/curator:5.5.4 --host localhost delete_indices --filter_list '[{"filtertype":"age","source":"creation_date","direction":"older","unit":"days","unit_count":1}]' -``` - -Or to delete the data older than 2 hours: - -```bash -docker run --rm --name curator --net host --entrypoint curator_cli bobrik/curator:5.5.4 --host localhost delete_indices --filter_list '[{"filtertype":"age","source":"creation_date","direction":"older","unit":"hours","unit_count":2}]' -``` - -##### Testing the OSM ELK Stack - -1. Download the sample dashboards to your desktop from this link (right click, save link as): -2. Visit Kibana at `http://[OSM_IP]:5601` and: - 1. Go to "Management" --> Saved Objects --> Import (select the downloaded file) - 2. Go to "Dashboard" and select the "OSM System Dashboard", which connects to other three sub-dashboards (You may need to redefine "filebeat-*" as the default 'index-pattern' by selecting it, marking the star and revisiting the Dashboards) - 3. Metrics (from Metricbeat) and logs (from Filebeat) should appear at the corresponding visualizations. - -![OSM Kibana Sample Dashboard](assets/800px-Osm_kibana_dashboard.png) - ### Autoscaling #### Reference diagram @@ -1305,33 +1108,32 @@ The scaling descriptor is part of a VNFD. Like the example below shows, it mainl - The minimum amount of scaled instances to produce (`max-scale-level`) ```yaml -scaling-aspect: -- aspect-delta-details: + scaling-aspect: + - aspect-delta-details: deltas: - - id: vdu01_autoscale-delta - vdu-delta: - - id: vdu01 - number-of-instances: 1 - id: vdu01_autoscale - max-scale-level: 1 - name: vdu01_autoscale - scaling-policy: - - cooldown-time: 120 - name: cpu_scaling_policy + - id: vdu_autoscale-delta + vdu-delta: + - id: hackfest_basic_metrics-VM + number-of-instances: 1 + id: vdu_autoscale + max-scale-level: 1 + name: vdu_autoscale + scaling-policy: + - cooldown-time: 5 + name: cpu_util_above_threshold scaling-criteria: - - name: cpu_scaling_policy - scale-in-relational-operation: LT - scale-in-threshold: 20 - scale-out-relational-operation: GT - scale-out-threshold: 60 - vnf-monitoring-param-ref: vnf01_cpu_util + - name: cpu_util_above_threshold + scale-in-relational-operation: LT + scale-in-threshold: 10 + scale-out-relational-operation: GT + scale-out-threshold: 60 + vnf-monitoring-param-ref: vnf_cpu_util scaling-type: automatic - threshold-time: 10 - -vdu-profile: -- id: vdu01 - min-number-of-instances: 1 - max-number-of-intannces: 11 + threshold-time: 1 + vdu-profile: + - id: hackfest_basic_metrics-VM + max-number-of-instances: 2 + min-number-of-instances: 1 ``` #### How to enable/disable autoscaling @@ -1375,7 +1177,7 @@ This will launch a Network Service formed by an HAProxy load balancer and an (au Get the descriptors: ```bash -git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git ``` Onboard them: @@ -1456,7 +1258,7 @@ healing-aspect: Get the descriptors: ```bash -git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git ``` Onboard them: @@ -1525,26 +1327,23 @@ openstack server delete 3. Check metrics at Prometheus, visit `http://[OSM_IP]:9091` and look for `osm_vm_status`. Metric value should be '0'. 4. Heal operation will be triggered at POL and VM respawn will happen. -## Using Network Slices +## How to deploy Network Slices In order to illustrate better how network slicing works in OSM, it will be discussed in the context of a running example. ### Resources -This example of use network slicing requires a set of resources (VNFs, NSs, NSTs) that are available in the following [link](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/) - -- [slice_hackfest_vnfd.tar.gz](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest_vnfd.tar.gz) -- [slice_hackfest_middle_vnfd.tar.gz](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest_middle_vnfd.tar.gz) - -**NS:** +This example of use network slicing requires a set of resources (VNFs, NSs, NSTs) that are available in the following [Gitlab osm-packages repository](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages): -- [slice_hackfest_nsd.tar.gz](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest_nsd.tar.gz) -- [slice_hackfest_middle_nsd.tar.gz](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest_middle_nsd.tar.gz) - -**NST:** - -- [slice_hackfest_nst.yaml](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest_nst.yaml) -- [slice_hackfest2_nst.yaml](https://osm-download.etsi.org/ftp/osm-6.0-six/8th-hackfest/packages/slice_hackfest2_nst.yaml) +- **NF:** + - [slice_basic_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/slice_basic_vnf) + - [slice_basic_middle_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/slice_basic_middle_vnf) +- **NS:** + - [slice_basic_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/slice_basic_ns) + - [slice_basic_middle_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/slice_basic_middle_ns) +- **NST:** + - [slice_basic_nst](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/blob/master/slice_basic_nst/slice_basic_nst.yaml) + - [slice_basic_2nd_nst](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/blob/master/slice_basic_nst/slice_basic_2nd_nst.yaml) ### Network Slice Template Diagram @@ -1554,7 +1353,7 @@ The diagram below shows the Network Slice Template created for the example. As i #### Virtual Network Functions -We use two VNFs for this example. The difference between them is the number of network interfaces to create connections. While the `slice_hackfest_middle_vnfd` VNF have three interfaces (`mgmt`, `data1`, `data2`), the `slice_hackfest_vnfd` have only two (mgmt, data). The specifications vCPU (1), RAM (1GB), disk (10GB), and `image-name` ('US1604') are the same in both VNFs. +We use two VNFs for this example. The difference between them is the number of network interfaces to create connections. While the `slice_basic_vnf` has two interfaces(mgmt, data), the `slice_basic_middle_vnf` VNF have three interfaces (`mgmt`, `data1`, `data2`). The specifications vCPU (1), RAM (1GB), disk (10GB), and `image-name` ('ubuntu18.04') are the same in both VNFs. ![vnfd](assets/800px-vnfd.png) @@ -1564,9 +1363,9 @@ We use two VNFs for this example. The difference between them is the number of n We use two network services in this example. They are differentiated by 1) the number of interfaces that posses, 2) the VNF contained inside the Network service, 3) the NS *slice_hackfest_nsd* have two VLDs, one for data and other for management 4) the *slice_hackfest_middle_nsd* has three VLDs, one for management and the other two for data1 and data2. -The *slice_hackfest_middle_nsd* have inside the `slice_hackfest_middle_vnfd` and the *slice_hackfest_nsd* has the vnf `slice_hackfest_vnfd`. +The *slice_basic_middle_ns* has inside the `slice_basic_middle_vnf` and the *slice_basic_ns* has the vnf `slice_basic_vnf`. -The diagram below shows the `slice_hackfest_nsd` and `slice_hackfest_middle_nsd`, its connection points, VLDs and VNFs. +The diagram below shows the `slice_basic_ns` and `slice_basic_middle_ns`, its connection points, VLDs and VNFs. ![nsd](assets/800px-nsd.png) @@ -1574,16 +1373,17 @@ The diagram below shows the `slice_hackfest_nsd` and `slice_hackfest_middle_nsd` ### Creating a Network Slice Template (NST) -Based on the OSM information model for Network slice templates [here](http://osm-download.etsi.org/repository/osm/debian/ReleaseSIX/docs/osm-im/osm_im_trees/nst.html) it is possible to start writing the YAML descriptor for the NST. +Based on the OSM information model for Network slice templates [here](http://osm-download.etsi.org/repository/osm/debian/ReleaseTHIRTEEN/docs/osm-im/osm_im_trees/nst.html) it is possible to start writing the YAML descriptor for the NST. ```yaml nst: -- id: slice_hackfest_nst - name: slice_hackfest_nst +- id: slice_basic_nst + name: slice_basic_nst SNSSAI-identifier: slice-service-type: eMBB quality-of-service: id: 1 + ``` The snippet above contains the mandatory fields for the NST. Additionally, we can find the description below of the `netslice-subnet` and `netslice-vld` sections. When we create an NST, the `id` references the Network Slice Template, and the `name` is the name set to the NST. Additionally, the required parameter `SNSSAI-identifier` is a reference to which kind of service is inside this slice. In OSM we have three types of `slice-service-type`. Enhanced mobile broadband (eMBB), Ultra-reliable low-latency communications (URLLC) or massive machine type communications (mMTC). Moreover, we add a `quality-of-service` parameter that is related to the 5G QoS Indicator (5QI). @@ -1596,85 +1396,92 @@ The section `netslice-subnet` shown below is the place to allocate the network s 4. The `nsd-ref` is the reference to the Network Service descriptor that forms the netslice subnet. ```yaml - netslice-subnet: - - id: slice_hackfest_nsd_1 + netslice-subnet: + - id: slice_basic_nsd_1 is-shared-nss: false description: NetSlice Subnet (service) composed by 1 vnf with 2 cp - nsd-ref: slice_hackfest_nsd - - - id: slice_hackfest_nsd_2 + nsd-ref: slice_basic_ns + - id: slice_basic_nsd_2 is-shared-nss: true description: NetSlice Subnet (service) composed by 1 vnf with 3 cp - nsd-ref: slice_hackfest_middle_nsd - - - id: slice_hackfest_nsd_3 + nsd-ref: slice_basic_middle_ns + - id: slice_basic_nsd_3 is-shared-nss: false description: NetSlice Subnet (service) composed by 1 vnf with 2 cp - nsd-ref: slice_hackfest_nsd + nsd-ref: slice_basic_ns + ``` Finally, it is defined the connections among the `netslice-subnets` in section `netslice-vld` as is shown below: ```yaml -netslice-vld: + netslice-vld: - id: slice_vld_mgmt name: slice_vld_mgmt type: ELAN mgmt-network: true nss-connection-point-ref: - - nss-ref: slice_hackfest_nsd_1 + - nss-ref: slice_basic_nsd_1 nsd-connection-point-ref: nsd_cp_mgmt - - nss-ref: slice_hackfest_nsd_2 + - nss-ref: slice_basic_nsd_2 nsd-connection-point-ref: nsd_cp_mgmt - - nss-ref: slice_hackfest_nsd_3 + - nss-ref: slice_basic_nsd_3 nsd-connection-point-ref: nsd_cp_mgmt - id: slice_vld_data1 name: slice_vld_data1 type: ELAN nss-connection-point-ref: - - nss-ref: slice_hackfest_nsd_1 + - nss-ref: slice_basic_nsd_1 nsd-connection-point-ref: nsd_cp_data - - nss-ref: slice_hackfest_nsd_2 + - nss-ref: slice_basic_nsd_2 nsd-connection-point-ref: nsd_cp_data1 + - id: slice_vld_data2 + name: slice_vld_data2 + type: ELAN + nss-connection-point-ref: + - nss-ref: slice_basic_nsd_2 + nsd-connection-point-ref: nsd_cp_data2 + - nss-ref: slice_basic_nsd_3 + nsd-connection-point-ref: nsd_cp_data ``` Having the network slice template ready is needed to onboard the resources to the OSM before upload the network slice template. The following commands help you to onboard packages to OSM: - **VNF package:** - List Virtual Network Functions Descriptors - - `osm vnfd-list` - - Upload the *slice_hackfest_vnf* package - - `osm vnfd-create slice_hackfest_vnf.tar.gz` - - Upload the *slice_hackfest_middle_vnf package* - - `osm vnfd-create slice_hackfest_middle_vnf.tar.gz` - - Show if *slice_hackfest_vnf* was uploaded correctly to OSM - - `osm vnfd-show slice_hackfest_vnfd` - - Show if *slice_hackfest_vnf* was uploaded correctly to OSM - - `osm vnfd-show slice_hackfest_middle_vnfd` + - `osm nfpkg-list` + - Upload the *slice_basic_vnf* package + - `osm nfpkg-create slice_basic_vnf` + - Upload the *slice_basic_middle_vnf package* + - `osm nfpkg-create slice_basic_middle_vnf` + - Show if *slice_basic_vnf* was uploaded correctly to OSM + - `osm nfpkg-show slice_basic_vnf` + - Show if *slice_basic_middle_vnf* was uploaded correctly to OSM + - `osm nfpkg-show slice_basic_middle_vnf` - **NS package:** - List Network Service Descriptors - - `osm nsd-list` - - Upload the *slice_hackfest_ns* package - - `osm nsd-create slice_hackfest_ns.tar.gz` - - Upload the *slice_hackfest_middle_ns* package - - `osm nsd-create slice_hackfest_middle_ns.tar.gz` - - Show if *slice_hackfest_nsd* was uploaded correctly to OSM + - `osm nspkg-list` + - Upload the *slice_basic_ns* package + - `osm nspkg-create slice_basic_ns` + - Upload the *slice_basic_middle_ns* package + - `osm nspkg-create slice_basic_middle_ns` + - Show if *slice_basic_ns* was uploaded correctly to OSM - `osm nsd-show slice_hackfest_nsd` - - Show if *slice_hackfest_middle_nsd* was uploaded correctly to OSM + - Show if *slice_basic_middle_ns* was uploaded correctly to OSM - `osm nsd-show slice_hackfest_middle_nsd` - **NST:** - List network slice templates - `osm nst-list` - - Upload the *slice_hackfest_nst.yaml* template - - `osm nst-create slice_hackfest_nst.yaml` - - Upload the *slice_hackfest2_nst.yaml* template - - `osm nst-create slice_hackfest2_nst.yaml` - - Show if *slice_hackfest_nst* was uploaded correctly to OSM - - `osm nst-show slice_hackfest_nst` - - Show if *slice_hackfest2_nst* was uploaded correctly to OSM - - `osm nst-show slice_hackfest2_nst` + - Upload the *slice_basic_nst.yaml* template + - `osm nst-create slice_basic_nst/slice_basic_nst.yaml` + - Upload the *slice_basic_2nd_nst* template + - `osm nst-create slice_basic_nst/slice_basic_2nd_nst.yaml` + - Show if *slice_basic_nst.yaml* was uploaded correctly to OSM + - `osm nst-show slice_basic_nst.yaml` + - Show if *slice_basic_2nd_nst* was uploaded correctly to OSM + - `osm nst-show slice_basic_2nd_nst` With all resources already available in OSM, it is possible to create the Network Slice Instance (NSI) using the `slice_hackfest_nst`. You can find below the help of the command to create a network slice instance: @@ -1714,16 +1521,16 @@ To instantiate the network slice template use the following command: ```bash osm nsi-create\ ---nsi_name my_first_slice\ ---nst_name slice_hackfest_nst\ ---vim_account \ +--nsi_name my_first_slice \ +--nst_name slice_basic_nst \ +--vim_account \ --config 'netslice-vld: [{ "name": "slice_vld_mgmt", "vim-network-name": }]' ``` Where: - `--nsi-name` is the name of the Network Slice Instance: `my_first_slice` -- `--nst-name` is the name of the Network Slice Template: `slice_hackfest_nst` +- `--nst-name` is the name of the Network Slice Template: `slice_basic_nst` - `--vim_account` is the default VIM account id or name to be used by the NSI - `--config` is the configuration parameter used for the slice. For example, it is possible to attach the NS management network to an external network of the VIM to have access to the VNF deployed in the slice. In this case, `netslice-vld` list, contains the name of the VLD `slice_vld_mgmt` used to attach the external network of the VIM by `vim-network-name` key. @@ -1752,22 +1559,22 @@ The network slice template used for sharing a network slice subnet is *slice_hac ```yaml nst: -- id: slice_hackfest2_nst - name: slice_hackfest2_nst +- id: slice_basic_nst2 + name: slice_basic_nst2 SNSSAI-identifier: slice-service-type: eMBB quality-of-service: id: 1 netslice-subnet: - - id: slice_hackfest_nsd_2 + - id: slice_basic_nsd_2 is-shared-nss: true description: NetSlice Subnet (service) composed by 1 vnf with 3 cp - nsd-ref: slice_hackfest_middle_nsd - - id: slice_hackfest_nsd_3 + nsd-ref: slice_basic_middle_ns + - id: slice_basic_nsd_3 is-shared-nss: false description: NetSlice Subnet (service) composed by 1 vnf with 2 cp - nsd-ref: slice_hackfest_nsd + nsd-ref: slice_basic_ns netslice-vld: - id: slice_vld_mgmt @@ -1775,29 +1582,29 @@ nst: type: ELAN mgmt-network: true nss-connection-point-ref: - - nss-ref: slice_hackfest_nsd_2 + - nss-ref: slice_basic_nsd_2 nsd-connection-point-ref: nsd_cp_mgmt - - nss-ref: slice_hackfest_nsd_3 + - nss-ref: slice_basic_nsd_3 nsd-connection-point-ref: nsd_cp_mgmt - id: slice_vld_data2 name: slice_vld_data2 type: ELAN nss-connection-point-ref: - - nss-ref: slice_hackfest_nsd_2 + - nss-ref: slice_basic_nsd_2 nsd-connection-point-ref: nsd_cp_data2 - - nss-ref: slice_hackfest_nsd_3 + - nss-ref: slice_basic_nsd_3 nsd-connection-point-ref: nsd_cp_data ``` - The YAML above contains 2 `netslice-subnet`, one with the flag `is-shared-nss` as true and the other one with the flag `is-shared-nss` as false. The `netslice-vlds` will connect the `slice_hackfest_middle_nsd` nss with management interface and data2 with the `slice_hackfest_nsd` via `nsd_cp_data`. + The YAML above contains two `netslice-subnet`, one with the flag `is-shared-nss` as true and the other one with the flag `is-shared-nss` as false. The `netslice-vlds` will connect the `slice_basic_nsd_2` nss with management interface and data2 with the `slice_basic_nsd_3` via `nsd_cp_data`. -To instantiate this network slice, we will use the same command used previously but changing the `nst_name` to `slice_hackfest2_nst`: +To instantiate this network slice, we will use the same command used previously but changing the `nst_name` to `slice_basic_2nd_nst`: -```text +```bash osm nsi-create\ ---nsi_name my_shared_slice\ ---nst_name slice_hackfest2_nst\ ---vim_account \ +--nsi_name my_shared_slice \ +--nst_name slice_basic_2nd_nst \ +--vim_account \ --config 'netslice-vld: [{ "name": "slice_vld_mgmt", "vim-network-name": }]' ``` @@ -1896,13 +1703,13 @@ KNFs can be on-boarded using Helm Charts or Juju Bundles. In the following secti #### KNF Helm Chart -Once the cluster is attached to your OSM, you can work with KNF in the same way as you do with any VNF. You can onboard them. For instance, you can use the example below of a KNF consisting of a single Kubernetes deployment unit based on OpenLDAP helm chart. +Once the cluster is attached to your OSM, you can work with KNF in the same way as you do with any VNF. For instance, you can onboard the example below of a KNF consisting of a single Kubernetes deployment unit based on OpenLDAP helm chart. ```bash -wget http://osm-download.etsi.org/ftp/Packages/examples/openldap_knf.tar.gz -wget http://osm-download.etsi.org/ftp/Packages/examples/openldap_ns.tar.gz -osm nfpkg-create openldap_knf.tar.gz -osm nspkg-create openldap_ns.tar.gz +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +cd osm-packages +osm nfpkg-create openldap_knf +osm nspkg-create openldap_ns ``` You can instantiate two NS instances: diff --git a/15-k8s-installation.md b/15-k8s-installation.md index a46247bb0bbb43d2116371a941d7e28516345889..65c6cba6bf4b8023f9672abd74a9a87a0adeafe1 100644 --- a/15-k8s-installation.md +++ b/15-k8s-installation.md @@ -30,9 +30,9 @@ Here we will analyse three methods to create a Kubernetes cluster: 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) +- [k8s_jujucontroller_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/k8s_jujucontroller_vnf) +- [k8s_jujumachine_vnf](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/k8s_jujumachine_vnf) +- [k8s_juju_ns](https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages/-/tree/master/k8s_juju_ns) 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. @@ -43,12 +43,11 @@ The following figure illustrates the NS. ### 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 +git clone --recursive https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +cd osm-packages +osm nfpkg-create k8s_jujumachine_vnf +osm nfpkg-create k8s_jujucontroller_vnf +osm nspkg-create k8s_juju_ns ``` ### Instantiate the NS