Versions Compared

Key

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

Quick Start

Downloading

Get HAS

Table of Contents
maxLevel3
minLevel2

Installation and Configuration

Install the HAS project

Installing from the Source Code

Prerequisite:

The conductor has a runtime dependency on SMS and MUSIC. They can be set up using the following steps.

View file
namesetup-sms.sh
height250
View file
namemusic.tar.gz
height250
View file
namehas.json
height250
View file
nameosdf.json
height250
View file
nameonboard.json
height250

To run SMS, Run the following commands

Code Block
languagebash
./setup-sms.sh
docker exec --user root -i sms /bin/sh -c "mkdir -p /preload/config"
docker cp has.json sms:/preload/config/has.json
docker cp osdf.json sms:/preload/config/osdf.json
docker exec --user root -i sms /bin/sh -c "/sms/bin/preload -cacert /sms/certs/aaf_root_ca.cer -jsondir /preload/config -serviceport 10443 -serviceurl http://localhost"

To run music, Run the following commands

Code Block
languagebash
tar -xvf music.tar.gz
cd music
# to start music
./music_script.sh
# to stop music
./music_teardown_script.sh
curl -vvvvv --noproxy "*" --request POST http://localhost:8080/MUSIC/rest/v2/admin/onboardAppWithMusic -H "Content-Type: application/json" -H "Authorization: Basic Y29uZHVjdG9yOmMwbmR1Y3Qwcg==" --data @onboard.json


For HAS to communicate with SMS, The following changes have to be done to the conductor.conf

  • In the SMS URL, Protocol has to be changed from HTTPS to HTTP
  •  In the same URL, hostname has to be changed from aaf-sms.onap to localhost


Get HAS seed code from the Linux Foundation Projects page.

Code Block
languagepowershell
git clone https://gerrit.onap.org/r/optf/has

Running the Example


virtualenv Use virtual environment to create and manage libraries and dependencies for HAS project.

Code Block
languagepowershell
virtualenv -p /usr/bin/python3.8 {virtual_environment_location}

...


source {virtual_

...

environment_location}/bin/activate


Inside of /has/HAS conductor folder, run the following commands:python

Code Block
languagepowershell
python3.8 setup.py install

...


pip install -e .


Then in your In {virtual_environment "_location}/bin " folder, you should see the following files:five components of HAS/Conductor project and you can with the commands below.

conductor-

...

api,conductor-controller

...

, conductor-

...

solver, conductor-reservation

...

, conductor-

...

data
Code Block
languagepowershell
conductor-api --port=8091 -- --config-file={conductor_conf_file_location}

...

 
conductor-controller --config-file={conductor_conf_file_location}

...


conductor-solver --config-file={conductor_conf_file_location}

...


conductor-reservation --config-file={conductor_conf_file_location}

...


conductor-data --config-file={conductor_conf_file_location}

...

Commit the Code

...


Installing through OOM

Please first follow the steps inside ONAP on Kubernetes with Rancher to build a kubernetes environment for ONAP deployment.

Clone the OOM repository from ONAP Gerrit 

Code Block
languagepowershell
git clone -b casablanca http://gerrit.onap.org/r/oom
cd oom/kubernetes


Install Helm plugins to enable ONAP deployment.

Code Block
languagepowershell
sudo cp -R ~/oom/kubernetes/helm/plugins/ ~/.helm


Configure the values.yaml inside /oom/kubernetes/onap/ folder as the one attached here. Here I only enabled AAF, AAI, OOF and Policy. You can also enable other components if needed. 

Setup the helm server and build local helm repository

Code Block
languagepowershell
cd ~/oom/kubernetes
helm serve &
helm repo add local http://127.0.0.1:8879
make all; make onap


Deploy ONAP through Helm

Code Block
languagepowershell
helm deploy dev local/onap --namespace onap


Process for debuging


Load changes inside the development environment

The changes will be updated through an update of the docker image. Please make sure you've setup the development env according to Setting Up Your Development Environment (i.e. create proper settings.xml file for maven)

Code Block
languagepowershell
git clone http://gerrit.onap.org/r/optf/has
<!- Make code changes here->
cd <path>/has
mvn clean install <!- Build the maven artifact with changes ->

Then create new Dockerfile and build-dockers-debug.sh under has/ folder to build the new image. The artifact can be found in the has/conductor/target folder

Code Block
languagepowershell
sudo <file-path>/build-dockers-debug.sh <tag_for_image> <path_to_artifact_zip> <path_to_folder_with_Dockerfile>

Replace the image name inside the deployment for all HAS components.

Commiting the Code

git commit -am "Initial proj struct"
git review -s
git commit -as --amend
# scroll down 2 lines (above your Change-ID) insert "Issue-ID: {issue_id}"

git review