Versions Compared

Key

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

Table of Contents


MSB can run as dockerdockers, it's very handy to try it at on your laptop.

Run MSB microservices on the same host using host network

MSB consists of multiple microservices, for testing, the easiest way is to run them in on the same host by using host network.  

1. Run the Consul dockers.
sudo docker run -d --net=host --name msb_consul consul:01.94.3


2. Run the MSB dockers.

...

3. Explore the MSB portal.

httphttps://127.0.0.1/msb


4. Register your REST service to MSB via curl
For testing, we can register the services via curl. MSB is working with OOM team to register For real use case, MSB can register the services automatically when deploying the ONAP components are deployed by OOM or Heat template.

export AAI_IP=10.74.148.80
export AAI_PORT=443
export MSB_IP=10.96.33.44
export MSB_PORT=80

curl -X POST \
-H "Content-Type: application/json" \
-d '"{\"serviceName\": \"aai-cloudInfrastructure\", \"version\": \"v8v11\", \"url\": \"/aai/v8/v11/cloud-infrastructure\",\"protocol\": \"REST\", \"pathenable_ssl\": "/aai/v8\"true\", \"nodes\": [ {\"ip\": "10.74.215.65\"$AAI_IP\",\"port\": \"8443$AAI_PORT\"}]}' \
"http   https://127.0.0.1:10081$MSB_IP:$MSB_PORT/api/microservices/v1/services"


5.Access the rest service via api gateway
curl --user AAI:AAI -H "X-TransactionId:123" -H "X-FromAppId:test"  http://127.0.0.1$MSB_IP:$MSB_PORT/api/aai/v8/cloud-infrastructure-cloudInfrastructure/v11/cloud-regions


Run MSB microservices using default docker network

...

sudo docker run -d -p 8500:8500  --name msb_consul consul:01.94.3

CONSUL_IP=`sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' msb_consul`

...

sudo docker run -d -p 80:80 -e CONSUL_IP=$CONSUL_IP -e SDCLIENT_IP=$DISCOVERY_IP -e "ROUTE_LABELS=visualRange:1" --name msb_internal_apigateway nexus3.onap.org:10001/onap/msb/msb_apigateway


Run MSB

...

The chart for MSB running in kubernetes cluster is available here: 

with OOM

1. Precondition: 

Have kubernetes cluster, kubectl and helm installed.

Login the ONAP docker registry first: docker login -u docker -p docker nexus3.onap.org:10001


2.Download oom from ONAP gerrit

git clone https://gerrit.onap.org/r/gitweb?p=oom.git;a=tree;f=kubernetes/msb;h=17f8fd89791b81f1e981716dcffdb3e2e90299ae;hb=refs/heads/masteroom


3.Install MSB and Kube2MSB registrator

cd ~/oom/kubernets/config

./createConfig.sh -n onap

cd ~/oom/kubernetes/oneclick/

../createAll.bash -a msb -n onap

./createAll.bash -a kube2msb -n onap


4.Install AAI for testing

./createAll.bash -a aai-n onap


5. Open the MSB IAG portal in the browser. You are able to see the registered AAI services.

https://${Node_IP}:30283/msb