sonata-nfv / son-install

The SONATA Service Platform installation scripts
http://www.sonata-nfv.eu
Apache License 2.0
3 stars 13 forks source link

Install SP for 5GTango #163

Open andratapu opened 5 years ago

andratapu commented 5 years ago

Hi,

I am trying to instlal on a fresh Ubuntu 16.04, the following steps: https://sonata-nfv.github.io/component_installation.

The process to install SP is the same as for version 3.0 ? If yes, I installed first the packages mentioned at the beginning:

Create tango user

sudo adduser tango sudo usermod -a -G sudo tango

Packages installation

sudo apt-get install -y software-properties-common sudo apt-add-repository -y ppa:ansible/ansible sudo apt-get update sudo apt-get install -y ansible sudo apt-get install -y git sudo apt-get install python3 sudo apt install python3-pip sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 sudo pip3 install docker

Docker-ce

sudo apt-get update sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" sudo apt-get update sudo apt-get install docker-ce

Create docker network

sudo docker network create tango

Repository cloning

git clone https://github.com/sonata-nfv/tng-devops.git cd tng-devops

After that, I encounter the following error:

root@sonata-tango:/home/sonata/son-install# ansible-playbook utils/deploy/sp.yml -e "target=localhost public_ip=10.0.2.15" Traceback (most recent call last): File "/usr/bin/ansible-playbook", line 40, in from ansible.errors import AnsibleError, AnsibleOptionsError, AnsibleParserError ImportError: No module named 'ansible'

Could you pleas help ? Thanks !

andratapu commented 5 years ago

@mpeuster could you please help me with this issue ? Thanks a lot in advance !

mpeuster commented 5 years ago

I think @felipevicens is the right one to help here. I never installed the SP ;-)

But looks like the Python ansible module is not installed on the machine. Maybe pip install ansible helps.

luishensruiz commented 5 years ago

Hi, this erros is beacause ansible is not propertly installed. Just try reinstalling ansible via pip:

$ sudo pip install ansible

And let us know how is going.

andratapu commented 5 years ago

Hi, I ve let go to that installation and I ve started a fresh one. First of all, I want to install SP v3 before I m going to install 5G Tango. Is that ok ? When I run the command:

sudo ansible-playbook utils/deploy/sp.yml -e "target=localhost public_ip=10.0.2.15

I receive the following error:

TASK [docker : include_vars] *** fatal: [localhost]: FAILED! => {"ansible_facts": {}, "ansible_included_var_files": [], "changed": false, "message": "Could not find or access '/roles/sp/defaults/main.yml' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"} to retry, use: --limit @/home/sonata/son-install/utils/deploy/sp.retry

What to do with this further on ?@luishens01 @luishens01

Thanks in advance !

andratapu commented 5 years ago

Hi again,

On another fresh Ubuntu VM I'm trying to install directly SP for 5G Tango. I did all steps from:

https://sonata-nfv.github.io/component_installation

I fixed some errors regarding ansible / pip3-cryptography and paramiko and when I run the commands:

-For SP: sudo ansible-playbook roles/sp.yml -i environments -e target=localhost --ask-vault-pass -For VnV: sudo ansible-playbook roles/vnv.yml -i environments -e target=localhost --ask-vault-pass

I'm receiving the following error message ( see in Bold):

sonata@sonata-tango:~/tng-devops$ sudo ansible-playbook roles/sp.yml -i environments -e target=localhost --ask-vault-pass Vault password:

PLAY [localhost] *** [WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (app_gk_base_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (routes_file). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (external_callback_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (component). Using last defined value only.

TASK [sp : debug] ** skipping: [localhost]

TASK [sp : CONTAINERS CLEAN] *** skipping: [localhost]

TASK [sp : debug] ** skipping: [localhost]

TASK [sp : DATABASE CLEANER] *** skipping: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP PGSQL DEPLOYMENT 20181020-220109" }

TASK [sp : deploy a PostgreSQL database server as a Container] ***** changed: [localhost]

TASK [sp : Wait until the string "Postgres" is UP] ***** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP MONGODB DEPLOYMENT 20181020-220203" }

TASK [sp : deploy MongoDB as a Container (used by Monitory)] *** changed: [localhost]

TASK [sp : Wait until the string "Mongodb" is UP] ** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP REDISDB DEPLOYMENT 20181020-220311" }

TASK [sp : deploy RedisDB as a Container (used by Validator and Gkapi)] **** changed: [localhost]

TASK [sp : Wait until the string "Redis" is UP] **** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP PGSQL-MONITORING DEPLOYMENT 20181020-220347" }

TASK [sp : deploy a PostgreSQL database server as a Container] ***** changed: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP INFLUXDB DEPLOYMENT 20181020-220354" }

TASK [sp : MONIT InfluxDB - running Docker containers] **** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error pulling image registry.sonata-nfv.eu:5000/son-monitor-influxdb:latest - 500 Server Error: Internal Server Error (\"Get https://registry.sonata-nfv.eu:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)\")"} to retry, use: --limit @/home/sonata/tng-devops/roles/sp.retry

PLAY RECAP ***** localhost : ok=12 changed=4 unreachable=0 failed=1

sonata@sonata-tango:~/tng-devops$ sudo ansible-playbook roles/vnv.yml -i environments -e target=localhost --ask-vault-pass [sudo] password for sonata: Vault password:

PLAY [localhost] *** [WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (app_gk_base_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (routes_file). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (external_callback_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (component). Using last defined value only.

TASK [vnv : debug] ***** ok: [localhost] => { "msg": "##### SP MONGODB DEPLOYMENT 20181020-221949" }

TASK [vnv : deploy MongoDB as a Container (used by Monitory)] ** changed: [localhost]

TASK [vnv : Wait until the string "Mongodb" is UP] ***** ok: [localhost]

TASK [vnv : debug] ***** ok: [localhost] => { "msg": "##### VnV Lifecycle Manager Deployment 20181020-222010" }

TASK [vnv : VnV LCM - running Docker containers] *** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error pulling image registry.sonata-nfv.eu:5000/tng-vnv-lcm:latest - 500 Server Error: Internal Server Error (\"Get https://registry.sonata-nfv.eu:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)\")"} to retry, use: --limit @/home/sonata/tng-devops/roles/vnv.retry

PLAY RECAP ***** localhost : ok=4 changed=1 unreachable=0 failed=1

Could you please explain why I m receiving this error and how can I fix it ? ( I haven t seen anything on the tutorial regarding this ).

Thank you !

luishensruiz commented 5 years ago

Hi again,

On another fresh Ubuntu VM I'm trying to install directly SP for 5G Tango. I did all steps from:

https://sonata-nfv.github.io/component_installation

I fixed some errors regarding ansible / pip3-cryptography and paramiko and when I run the commands:

-For SP: sudo ansible-playbook roles/sp.yml -i environments -e target=localhost --ask-vault-pass -For VnV: sudo ansible-playbook roles/vnv.yml -i environments -e target=localhost --ask-vault-pass

I'm receiving the following error message ( see in Bold):

sonata@sonata-tango:~/tng-devops$ sudo ansible-playbook roles/sp.yml -i environments -e target=localhost --ask-vault-pass Vault password:

PLAY [localhost] *** [WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (app_gk_base_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (routes_file). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (external_callback_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng- devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (component). Using last defined value only.

TASK [sp : debug] ** skipping: [localhost]

TASK [sp : CONTAINERS CLEAN] *** skipping: [localhost]

TASK [sp : debug] ** skipping: [localhost]

TASK [sp : DATABASE CLEANER] *** skipping: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP PGSQL DEPLOYMENT 20181020-220109" }

TASK [sp : deploy a PostgreSQL database server as a Container] ***** changed: [localhost]

TASK [sp : Wait until the string "Postgres" is UP] ***** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP MONGODB DEPLOYMENT 20181020-220203" }

TASK [sp : deploy MongoDB as a Container (used by Monitory)] *** changed: [localhost]

TASK [sp : Wait until the string "Mongodb" is UP] ** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP REDISDB DEPLOYMENT 20181020-220311" }

TASK [sp : deploy RedisDB as a Container (used by Validator and Gkapi)] **** changed: [localhost]

TASK [sp : Wait until the string "Redis" is UP] **** ok: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP PGSQL-MONITORING DEPLOYMENT 20181020-220347" }

TASK [sp : deploy a PostgreSQL database server as a Container] ***** changed: [localhost]

TASK [sp : debug] ** ok: [localhost] => { "msg": "##### SP INFLUXDB DEPLOYMENT 20181020-220354" }

TASK [sp : MONIT InfluxDB - running Docker containers] **** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error pulling image registry.sonata-nfv.eu:5000/son-monitor-influxdb:latest - 500 Server Error: Internal Server Error ("Get https://registry.sonata-nfv.eu:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")"} to retry, use: --limit @/home/sonata/tng-devops/roles/sp.retry

PLAY RECAP ***** localhost : ok=12 changed=4 unreachable=0 failed=1

sonata@sonata-tango:~/tng-devops$ sudo ansible-playbook roles/vnv.yml -i environments -e target=localhost --ask-vault-pass [sudo] password for sonata: Vault password:

PLAY [localhost] *** [WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (app_gk_base_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (routes_file). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (external_callback_url). Using last defined value only.

[WARNING]: While constructing a mapping from /home/sonata/tng-devops/host_vars/localhost, line 4, column 1, found a duplicate dict key (component). Using last defined value only.

TASK [vnv : debug] ***** ok: [localhost] => { "msg": "##### SP MONGODB DEPLOYMENT 20181020-221949" }

TASK [vnv : deploy MongoDB as a Container (used by Monitory)] ** changed: [localhost]

TASK [vnv : Wait until the string "Mongodb" is UP] ***** ok: [localhost]

TASK [vnv : debug] ***** ok: [localhost] => { "msg": "##### VnV Lifecycle Manager Deployment 20181020-222010" }

TASK [vnv : VnV LCM - running Docker containers] *** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Error pulling image registry.sonata-nfv.eu:5000/tng-vnv-lcm:latest - 500 Server Error: Internal Server Error ("Get https://registry.sonata-nfv.eu:5000/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")"} to retry, use: --limit @/home/sonata/tng-devops/roles/vnv.retry

PLAY RECAP ***** localhost : ok=4 changed=1 unreachable=0 failed=1

Could you please explain why I m receiving this error and how can I fix it ? ( I haven t seen anything on the tutorial regarding this ).

Thank you !

Good morning,

I'm working on some corrections in the installation guide right now, meanwhile, if you want, we have available the qcows image of fulls Serveice Platform and VnV installed.

You can download them here : https://cloud.cttc.es/index.php/s/AciQsbxqkx5J8Z5

PD: Remember they need to be two different VMs. 1 for SP and 1 for VnV

edit: I finished the corrections to the component installation guide. You can check it here: https://github.com/sonata-nfv/sonata-nfv.github.io/blob/master/component_installation.md

Kind Regards Luis

andratapu commented 5 years ago

@luishens01 Thank you for your fast answer ! I made the modification you told about in tng-devops/host_vars/localhost but now I receive the following error:

TASK [sp : create data model and populate db] ** **fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/bin/docker run --net=tango -i -e DATABASE_HOST=son-postgres -e MQSERVER=amqp://guest:guest@son-broker:5672 -e RACK_ENV=staging -e DATABASE_PORT=5432 -e POSTGRES_PASSWORD=sonata -e POSTGRES_USER=sonatatest -e POSTGRES_DB=gatekeeper --rm=true sonatanfv/tng-gtk-usr:v4.0 bundle exec rake db:migrate", "delta": "0:00:02.167305", "end": "2018-10-23 20:53:29.743518", "msg": "non-zero return code", "rc": 125, "start": "2018-10-23 20:53:27.576213", "stderr": "Unable to find image 'sonatanfv/tng-gtk-usr:v4.0' locally\n/usr/bin/docker: Error response from daemon: pull access denied for sonatanfv/tng-gtk-usr, repository does not exist or may require 'docker login'.\nSee '/usr/bin/docker run --help'.", "stderr_lines": ["Unable to find image 'sonatanfv/tng-gtk-usr:v4.0' locally", "/usr/bin/docker: Error response from daemon: pull access denied for sonatanfv/tng-gtk-usr, repository does not exist or may require 'docker login'.", "See '/usr/bin/docker run --help'."], "stdout": "", "stdout_lines": []} to retry, use: --limit @/home/sonata/tng-devops/roles/sp.retry

PLAY RECAP ***** localhost : ok=28 changed=12 unreachable=0 failed=1**

b. The 2 images you told me about contain only SP installation ? How do you recommand to convert qcow2 file into vdi ? ( I have Oracle VirtualBox 5.2.2. version installed on my Windows10 where I installed Ubuntu 16.04 )

Thanks a lot in advance !

felipevicens commented 5 years ago

Hello @andratapu We appreciate your feedback. Can you try to pull the repository and change the branch to v4.0 with the command: git checkout v4.0. After that, you will not have this issue.

felipevicens commented 5 years ago

We will try to offer the image in Virtualbox as well. In the mean time you could use this commando to convert the images to VDI: qemu-img convert -O vdi Tango_SP.qcow2 Tango_SP.vdi

I hope this helps.

andratapu commented 5 years ago

@felipevicens @luishens01 Thank you for your answer ! I ve just ran "git checkout v4.0" from tng-devops directory and it doesn t seem to work:

error: pathspec 'v4.0' did not match any file(s) known to git

Why is that ?

b. regarding the conversion, I ve already ran that command but when I placed the converted vdi into Oracle VM, I get the following message:

"FATAL: Could not read from the boot medium! System halted"

Could you please advise further on ?

Thanks a lot in advance !

andratapu commented 5 years ago

@felipevicens @luishens01 @mpeuster

Hello guys,

Could you please help me and my colleague speed up this installation part ? We also want to explore more the SONATA framework for our PhD program so we would really appreciate your help and support in order to understand more over it. Would you be available some time this week or next week for a conference call with us ? By then we can have our questions prepared and maybe a demo presentation in the call would also be helpful.

The conference call we can do it over Skype or any other means you like. Thanks a lot in advance !

felipevicens commented 5 years ago

Hello @andratapu please join this channel in github, we can support you quickly. https://gitter.im/sonata-nfv/Lobby

andratapu commented 5 years ago

@felipevicens Thanks a lot for your help last Friday ! It is really motivating now. These days I gained access to the CAMPUS university infrastructure with the following topology:

-all the servers are connected in 3 switches: a. 10G switch from IBM which is SDN capable for the communication between the servers b. 1G switch for the communication with the gateway server ( for openbound internet traffic ) c. one switch where the management modules of the machines/servers are connected for the remote management which is accomplished through OpenVPN ( so, for example if at some point needed, you or your other team members could access it also if needed )

RAM : aprox. 30GB on the host which has the XenServer installed Storage: 1 TB HDD

So, we are prepared to switch the installation and utilization of SONATA in there. Could you please provide me what we discussed over at the conference from Friday ?

Thanks a lot in advance !

felipevicens commented 5 years ago

Hello @andratapu,

For OpenStack, you can use this installation guide. It will deploy an all-in-one OpenStack. It is better if you can deploy OpenStack in a bare-metal server instead of a XenServer VM.

We are preparing a "SONATA for dummies" with the basic examples and the links to the VNFs images. We will have it ready on Friday 16/11.

andratapu commented 5 years ago

Thanks , @felipevicens ! Can t wait for it ! Will that also include network slicing examples as well ? Thanks !

andratapu commented 5 years ago

@felipevicens Are the examples SONATA for dummies" and the links to the VNFs images prepared ? Where can we find them ? Thanks in advance !

felipevicens commented 5 years ago

Hello @andratapu the quick guide is ready here the next step for you that is the Service Platform configuration and first deployment is described in this section with the link if the Network Service used and real VNFs. Please jump to Gitter if you need something else. The slicing guide is still WIP here