Version 60 (modified by 4 years ago) ( diff ) | ,
---|
Table of Contents
Open Source MANO (OSM) Tutorial
Overview
A full deployment consists of 3 components:
- OSM as the NFV Orchestrator
- Openstack, OpenVIM, Open Nebula, or similar as the virtual infrastructure manager (VIM)
- Some number of compute nodes, where the VIM will run VMs under OSM's instruction
We will use the following components:
- OSM on ubuntu 18.04
- Devstack on ubuntu 18.04, in a single node configuration (this can easily be extended following devstack guides)
- This Devstack configuration combines the VIM node and the compute node on one machine. OSM communicates with the Openstack identity service to discover the rest of the configuration.
This tutorial implements the getting started from: here, and adds support for ORBIT hardware, with the image based on Ubuntu 18.04.
To save time, run the OSM and VIM steps in separate ssh terminals, as they can be done at the same time.
Prerequisites:
- SSH keys set up for the testbed
- Ability to set up ssh tunneling to access the web interface pages
- A reservation for a domain with at least two compute resources
- For convenience, 3 terminal windows.
OSM Node Set Up
- Log into the console with your first terminal
- Load the
tutorial-osm.ndz
onto the first node, and resize to ≥ 60gb:- Example:
omf load -t srv1-lg1.sb1.cosmos-lab.org -i tutorial-osm.ndz -r 60
- Wait for imaging process to complete. Work on the other terminals in the meantime
- You should see:
INFO exp: 1 node successfully imaged ...
- Example:
- Turn the node on:
omf tell -a on -t srv1-lg1.sb1.cosmos-lab.org
- Wait for the node to come up, (up to ~3 minutes)
- You can ping the node, it will respond once booted
From Scratch
Dependencies:
- 40Gb disk space
- user:
- non-root user,
- with non-empty password
- member of sudo, docker, lxd groups
- Packages:
- net-tools
- ipv6 disabled
- Prepare the node
- Load the image:
omf load -t srv2-lg1.sb1.cosmos-lab.org -i baseline_1804.ndz -r 60
- Turn the node on:
omf tell -a on -t srv3-lg1.sb1.cosmos-lab.org
- Log in as root:
ssh native@srv3-lg1.sb1.cosmos-lab.org
- set up non-root user
echo native:native | chpasswd
- Add user to groups:
sudo groupadd lxd && sudo groupadd docker && sudo usermod -a -G lxd,docker native
- logout:
exit
- Log in as the user "native":
ssh native@srv3-lg1.sb1.cosmos-lab.org
- Load the image:
- Set up OSM
- Install "net-tools"
sudo apt install net-tools
- Download script:
wget https://osm-download.etsi.org/ftp/osm-6.0-six/install_osm.sh
- Make it executable:
chmod +x install_osm.sh
- Run it:
./install_osm.sh 2>&1 | tee osm_install_log.txt
- enter "y"
- if it crashes, run
lxd init
- if it crashes, run
- choose all defaults, except
none
for ipv6 - if failed, rerun install_osm.sh
- Install "net-tools"
- Connect browser
- Via ssh tunnel
- via VPN TODO
- navigate browser to node control ip, enter admin/admin as credentials
Run these commands to clean up the old configuration:
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
Save image
VIM Node Set up:
OSM must have a Virtual Infrastructure Manager (VIM) to control. We will use openstack on single node devstack for this tutorial, following this guide.
- Log into the console with your second terminal
- Load the
tutorial-devstack.ndz
onto the second node, and resize to ≥ 60gb:- Example:
omf load -t srv2-lg1.sb1.cosmos-lab.org -i tutorial-devstack.ndz -r 60
- Wait for imaging process to complete. Work on the other terminals in the meantime
- You should see:
INFO exp: 1 node successfully imaged ...
- Example:
- Turn the node on:
omf tell -a on -t srv2-lg1.sb1.cosmos-lab.org
- Wait for the node to come up (up to ~3 minutes)
- You can ping the node, it will respond once booted
- SSH into the node
ssh native@srv2-lg1.sb1.cosmos-lab.org
- Change to the Devstack directory:
cd ~/devstack
- Run the installation script:
./stack.sh
Note, we use username: native, password: native
, because Openstack needs a non-root user.
Commands will run for a while (about 10 minutes). If successful, it will output the credentials and address to login via the webui, and will look like the following:
========================= DevStack Component Timing (times are in seconds) ========================= run_process 16 test_with_retry 2 apt-get-update 5 osc 115 wait_for_service 10 git_timed 107 dbsync 65 pip_install 201 apt-get 166 ------------------------- Unaccounted time 345 ========================= Total runtime 1032 This is your host IP address: 10.19.1.2 This is your host IPv6 address: ::1 Horizon is now available at http://10.19.1.2/dashboard Keystone is serving at http://10.19.1.2/identity/ The default users are: admin and demo The password: native
You will need the Host IP address, Horizon and Keystone URLs, and user and password in the following steps.
From Scratch
Follow https://docs.openstack.org/devstack/latest/guides/single-machine.html
https://docs.openstack.org/devstack/latest/networking.html
If you don’t specify any configuration you will get the following:
neutron (including l3 with openvswitch)
private project networks for each openstack project
a floating ip range of 172.24.4.0/24 with the gateway of 172.24.4.1
the demo project configured with fixed ips on a subnet allocated from the 10.0.0.0/22 range
a br-ex interface controlled by neutron for all its networking (this is not connected to any physical interfaces).
DNS resolution for guests based on the resolv.conf for your host
an ip masq rule that allows created guests to route out
PUBLIC_INTERFACE=eth1 (this connects to the br-ex bridge)
https://docs.openstack.org/devstack/latest/_sources/guides/neutron.rst.txt
- Change IP without running stack.sh:
- Run unstack.sh
- In keystone database "update endpoint set url = REPLACE(url, '[old IP address]', '[new IP address]')";
- Update all Ips in /etc folder "grep -rl '[old IP address]' /etc | xargs sed -i 's/[old IP address]/[new IP address]/g'"
- Update all Ips in /opt/stack folder "grep -rl '[old IP address]' /opt/stack | xargs sed -i 's/[old IP address]/[new IP address]/g'"
- Restart apache2 server
- Run rejoin-stack.sh
- Restart Keystone "keystone-all"
Connecting to the Web Interfaces
Use your third terminal, or whatever ssh program you are using, to forward a different local port to port 80 on each of the OSM and VIM machines.
For more information, follow This Guide
For example, using a linux shell, and forwarding: 9901 → srv1-lg1:80 , 9902 → srv2-lg1:80
ssh testbeduser@sb1.cosmos-lab.org -N \ -L 9980:srv1-lg1:80 \ -L 9981:srv2-lg1:80
The OSM Web UI will likely be ready much sooner than the Openstack UI, due to the time taken for installation.
- OSM Web UI
- Credentials are:
admin / admin
- Use your browser to navigate to the first forwarded port, here
localhost:9980
- Credentials are:
- If the webui doesn't come up:
- SSH to the node with the ssh credentials: native / native
- Check to see that all containers are running
docker stack ps osm
- Try re-installing OSM by running
./install_osm.sh
- Openstack Web UI
- Credentials are:
admin / native
, unless different in the stack.sh output. - Use your browser to navigate to the second forwarded port, here
localhost:9981
- The web UI won't be ready until stack.sh completes successfully
- Credentials are:
- The following steps are executed in the respective web interfaces
Connecting OSM to the VIM
- Log into the OSM with admin/admin
- Click "VIM accounts" on the left bar
- Delete existing accounts with the trash can icon
- Add the new account for your openstack with the following information:
- URL
http://$DEVSTACK_IP/identity/v3/
- User
admin
- password
native
- tenant
admin
- name
openstack-site
- Type:
openstack
- URL
- Click create
Adding a disk image to openstack
- download the attachment cirros-0.3.4-x86_64-disk.img from this page, by clicking attachments, then clicking the small download icon.
- in a new window, go to the openstack webui
- click images
- click create image, and use the following properties (important)
- name:
cirros034
- image source: browse for the file you downloaded from the wiki
- format:
qcow2
- name:
- click create image
Creating a VNF
- Go back to the OSM webui
- VNF package onboarding
- go to packages → vnf packages
- download the attachment cirros_vnf.tar.gz
- drag the downloaded file to the window
- NS package onboarding
- go to packages → ns packages
- download the attachment cirros_2vnf_ns.tar.gz
- drag it to the window
- Instantiate the NF
- click the launch icon and enter information
- name
- description
- nsd_id:
cirros_2vnf_ns
- vim account id:
openstack-site
- click the launch icon and enter information
Interacting with the VNF
- In the Openstack UI:
- Select the project "admin" from the dropdown in the top left
- Click instances:
- you should now see a pair of cirros instances running.
- open a console on one, and try pinging the other
Changelog
08/20/2020 Updated to OSM release EIGHT, Openstack release Train
Attachments (3)
-
cirros_vnf.tar.gz
(5.1 KB
) - added by 5 years ago.
cirros_vnf
-
cirros_2vnf_ns.tar.gz
(18.4 KB
) - added by 5 years ago.
cirros_2vnf_ns
-
cirros-0.3.4-x86_64-disk.img
(12.7 MB
) - added by 5 years ago.
cirros034