Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Screenshot Customer View

Image AddedImage Added

Screenshot Operator View

Image AddedImage Added


Installation

The installation has been tested on Ubuntu 18.04.2 LTS

...

Code Block
languagebash
themeRDark
curl -k --header "Content-Type: application/json" -X POST -d @register-nbi-listeners httphttps://nbi.api.simpledemo.onap.org:30274/nbi/api/v3v4/hub

e.g. cat register-nbi-listeners
{
"callback": "http://172.30.0.130:5000/serviceOrderStateListener/listener/v1/",
"query":"eventType = ServiceOrderStateChangeNotification,ServiceOrderCreationNotification,ServiceOrderItemStateChangeNotification,ServiceCreationNotification,ServiceAttributeValueChangeNotification,ServiceRemoveNotification"
}
Right after posting your endpoint to NBI make sure it's configured properly by running
curl --header "Content-Type: application/json" httphttps://nbi.api.simpledemo.onap.org:30274/nbi/api/v3v4/hub

Create a configuration file named bng.conf under /tmp with this content

Code Block
languagebash
themeRDark
cat /tmp/bng.conf 
[DEFAULT]
db-username = root
db-password = root
db-host = 0.0.0.0
db-database = bbs
onap-nbi-url = httphttps://nbi.api.simpledemo.onap.org:30274/nbi/api/v3v4/
onap-dcae-ves-collector-url = httphttps://172.30.0.93:3023530417/eventListener/v5/
onap-message-router = httphttps://mr.api.simpledemo.openecomp.org:3022730226/events/AAI-EVENT/T/T2?timeout=10000&limit=1

...

Code Block
languagebash
themeRDark
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
 
# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;
	 
	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don't use them in a production server!
	#
	# include snippets/snakeoil.conf;
	 
	root /var/www/html;
	 
	# Add index.php to the list if you are using PHP
	index index.html index.htm index.nginx-debian.html;
	 
	server_name _;
	 
	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
		 
		if ($request_method = 'OPTIONS') {
			add_header 'Access-Control-Allow-Origin' '*';
			#
			# Om nom nom cookies
			#
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			#
			# Custom headers and headers various browsers *should* be OK with but aren't
			#
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
			#
			# Tell client that this pre-flight info is valid for 20 days
			#
			add_header 'Access-Control-Max-Age' 1728000;
add			add_header 'Content-Type' 'text/plain charset=UTF-8';
			add_header 'Content-Length' 0;
			return 204;
		}
		if ($request_method = 'POST') {
			add_header 'Access-Control-Allow-Origin' '*';
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
		}
		if ($request_method = 'GET') {
			add_header 'Access-Control-Allow-Origin' '*';
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
		}
	}
}
 
server {
	listen 5000;
	server_name default_server;
	location / {
		proxy_pass http://127.0.0.1:5010/;
		proxy_redirect off;
		 
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		 
		#proxy_set_header Host $host;
		#proxy_set_header X-Real-IP $remote_addr;
		#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		 
		client_max_body_size 10m;
		client_body_buffer_size 128k;
		 
		proxy_connect_timeout 90;
		proxy_send_timeout 90;
		proxy_read_timeout 90;
		 
		proxy_buffer_size 4k;
		proxy_buffers 4 32k;
		proxy_busy_buffers_size 64k;
		proxy_temp_file_write_size 64k;
		 
		if ($request_method = 'OPTIONS') {
			add_header 'Access-Control-Allow-Origin' '*'; 
			#
			# Om nom nom cookies
			#
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			#
#			# Custom headers and headers various browsers *should* be OK with but aren't
			#
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
			#
			# Tell client that this pre-flight info is valid for 20 days
			#
			add_header 'Access-Control-Max-Age' 1728000;
			add_header 'Content-Type' 'text/plain charset=UTF-8';
			add_header 'Content-Length' 0;
			return 204;
		}
		if ($request_method = 'POST') {
			add_header 'Access-Control-Allow-Origin' '*';
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
		}
		if ($request_method = 'GET') {
			add_header 'Access-Control-Allow-Origin' '*';
			add_header 'Access-Control-Allow-Credentials' 'true';
			add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
			add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';
		}


	}
}


Code Block
languagebash
themeMidnight
sudo /etc/init.d/nginx restart


Install latest docker daemon e.g.
https://linuxize.com/post/how-to-install-and-use-docker-on-ubuntu-18-04/

...

If you get "error-1698-28000-access-denied-for-user-rootlocalhost" check this
https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost

Copy frontend to nginx root web dirBuild bss-fe

Code Block
languagebash
themeRDarkMidnight
cd bss~/onap-bbs-fe-be/bss-fe$ sudo cp -fr * /var/www/html/

Modify the IP of the backend server configured in the fe (dirty hack to avoid rebuilding the frontend)

/source

# install dependencies
npm install

# configure
Ensure "baseURL" is set to the correct IP in config/prod.env.js

# build for production with minification
npm run build

For a detailed explanation on how things work, check out the guide and docs for vue-loader.


Copy frontend to nginx root web dir

Code Block
languagebash
themeRDark
~/onap-bbs-fe-be/bss-fe/dist/$ sudo cp -fr * /var/www/html/
Code Block
languagebash
themeRDark
vim /var/www/html/static/js/app.187d63f8300bfc4299b5.js 
search for "baseURL" and configure the IP e.g. baseURL:"http://172.30.0.130:5000"


Open app.py and set the template_id / service_id UUID, and user

Code Block
languagebash
themeRDark
Line 106, replace "TemplateID" value with "Service BBS_E2E_Service:UUID"


Line 197
"relatedParty": [ { "id": "6f486438-87b5-4bee-8f85-30090c760501" (global-customer-id)
"serviceSpecification": { "id": "0187be8c-8efb-4531-97fa-dbe984ed9cdb" (Service BBS_E2E_Service:UUID)

Run bss backend with gunicorn, make sure you update to point to the right path

30090c760501" (global-customer-id)
"serviceSpecification": { "id": "0187be8c-8efb-4531-97fa-dbe984ed9cdb" (Service BBS_E2E_Service:UUID)


Run bss backend with gunicorn, make sure you update to point to the right path

Code Block
languagebash
themeRDark
~
Code Block
languagebash
themeRDark
~/onap-bbs-fe-be/bss-fe$ /usr/bin/python3 /usr/local/bin/gunicorn -w 2 -b 0.0.0.0:5010 --access-logfile /home/ubuntu/onap-bbs-fe-be/bss-be/gunicorn-access.log --error-logfile /home/ubuntu/onap-bbs-fe-be/bss-be/gunicorn-error.log app:app --daemonbe$ ./start.sh

Run AAI events consumer in the background

...