How to port Cord in a box in M-Cord scenario ver 4.1.

The procedure to porting CORD in M-CORD 4.1 scenario

Nick Ho 2018 3
nick133371@gmail.com

Server Requirement

Before starting the Cord-in-a-Box installation, be sure that your server fit the following requirement

  • 64-bit AMD64/x86-64 server
  • 48 GB+ RAM
  • 12+ CPU cores
  • 1 TB+ disk
  • Access to internet
  • ubuntu 16.04.3 with fresh update
  • sudo less

Sudo less

use sudo visudo to edit the following configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# User privilege specification
root ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

ubuntu ALL=(ALL) NOPASSWD:ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

Install M-CORD

Download source code from cord github, and modify the property of the bash file.

1
2
curl -o ~/cord-bootstrap.sh https://raw.githubusercontent.com/opencord/cord/cord-4.1/scripts/cord-bootstrap.sh
chmod +x cord-bootstrap.sh

Install the basic CORD configuration and install vagrant.

1
./cord-bootstrap.sh -v

If you have error when vagrant try to download ubuntu image, try to add following code into the bash file.
Then, execute ./cord-bootstrap.sh -v again.

1
export VAGRANT\_SERVER\_URL="https://vagrantcloud.com"

If you are having trouble when building CORD at the stage “lxc finished” in case of container connectivity problem.
You can do the following modification.

1
vim ~/cord/build/maas/roles/maas/tasks/config-maas.yml

try to add dnssec_validation: ‘no’ into the file.

1
2
3
4
5
6
7
8
# ~/cord/build/maas/roles/maas/tasks/config-maas.yml
- name: Ensure Upstream DNS Server
maas:
key: '{{apikey.stdout}}'
maas: 'http://{{mgmt_ip_address.stdout}}/MAAS/api/1.0'
upstream_dns: '{{maas.upstream_dns}}'
dnssec_valiation: 'no'
state: present

Then, set the cord scenario.
In cord4.1, you might face some problem if directly build M-CORD.
So we can build rcord first, and change cord profile into M-CORD or whatever CORD.

1
2
3
cd ~/cord/build
make PODCONFIG=rcord-virtual.yml config
make -j4 build | &tee ~/build.out

After successfully building the rcord, and then change cord profile

1
2
3
4
5
6
7
8
9
10
11
\# run after shutdown or bring up newly written service 
make xos-teardown; make clean-openstack; make clean-profile; \
cd genconfig/ && rm -rf config.* cord_* inventory.ini; \
cd ../ && make config PODCONFIG=mcord-ng40-virtual.yml; \

# make PODCONFIG=mcord-oai-virtual.yml config

make -j4 build; make compute-node-refresh \

# check for xos password
ssh head1 -qt "cat /opt/credentials/xosadmin@opencord.org"

And you can get into the web UI from {your_ip}:8080/xos
account :xosadmin@opencord.org
password has checked by the above command
Then you will see the following service graph.

Having trouble with no GUI after sucessfully deployed?

1
ps ax|grep 8080

copy the line related to ssh it will like:

1
9762 ?        S      0:00 ssh -o User=vagrant -o Port=22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ForwardX11=no -o IdentityFile="/home/cord/cord/build/scenarios/cord/.vagrant/machines/head1/libvirt/private_key" -L *:8080:192.168.121.157:80 -N 192.168.121.157

and then kill that process

1
sudo kill -9 <<process ID>>

open a new terminal and paste the command you have copied

1
ssh -o User=vagrant -o Port=22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ForwardX11=no -o IdentityFile="/home/cord/cord/build/scenarios/cord/.vagrant/machines/head1/libvirt/private_key" -L *:8080:192.168.121.157:80 -N 192.168.121.157

And then Ctrl+z

Clean environment

If you want to re-install CORD or you want to clean all the configuration of M-CORD, try the following script.

1
2
cd cord/build
make clean-all

General OAI service

1
2
3
4
5
6
7
8
9
10
vagrant@head1:~$ source /opt/cord_profile/admin-openrc.sh
vagrant@head1:~$ nova list --all-tenants
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------------------------------+
| 04765e74-26f8-426d-b37a-67f425faf4ab | mysite_oaispgw1-2 | ACTIVE | - | Running | management=172.27.0.3; public=10.8.1.2; vspgw_network=10.0.8.2 |
| 1cf41f60-5d4a-4f02-9500-9bfabce8c05c | mysite_oaispgw1-3 | ACTIVE | - | Running | management=172.27.0.4; public=10.8.1.3; vspgw_network=10.0.8.3 |
| d9177408-63be-450d-b9a6-16a3c1e03d5e | mysite_vhss1-1 | ACTIVE | - | Running | management=172.27.0.2; vhss_network=10.0.7.2 |
| 619d3f85-90f1-4218-8764-d92efcada553 | mysite_vmme1-4 | ACTIVE | - | Running | management=172.27.0.5; vmme_network=10.0.6.2 |
+--------------------------------------+-------------------+--------+------------+-------------+----------------------------------------------------------------+