-echo -e "\n Configuring RO"
-#RO_TENANT_ID=`lxc exec RO -- openmano tenant-create osm |awk '{print $1}'`
-
-echo -e "\n Configuring VCA"
-#JUJU_PASSWD=`date +%s | sha256sum | base64 | head -c 32`
-#lxc exec VCA -- juju change-user-password $JUJUPASSWD
-#JUJU_CONTROLLER_IP=`lxc exec VCA -- lxc list -c 4 |grep eth0 |awk '{print $2}'`
-
-echo -e "\n Configuring SO"
-#sudo route add -net $JUJU_CONTROLLER_IP/32 gw $VCA_CONTAINER_IP
-#lxc exec SO-ub -- sudo -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode --test-name "launchpad"
-#sleep 2
-#lxc exec SO-ub -- resource-orchestrator name openmano account-type openmano openmano host $RO_CONTAINER_IP tenant-id $RO_TENANT_ID port 9090
-#lxc exec SO-ub -- config-agent account juju account-type juju juju ip-address $JUJU_CONTROLLER_IP port 17070 user admin secret $JUJU_PASSWD
-
-echo "\nDONE"
+echo -e " Configuring RO"
+lxc exec RO -- sed -i -e "s/^\#\?log_socket_host:.*/log_socket_host: $SO_CONTAINER_IP/g" /opt/openmano/openmanod.cfg
+lxc exec RO -- service openmano restart
+sleep 5
+RO_TENANT_ID=`lxc exec RO -- openmano tenant-create osm |awk '{print $1}'`
+
+echo -e " Configuring VCA"
+JUJU_PASSWD=`date +%s | sha256sum | base64 | head -c 32`
+echo -e "$JUJU_PASSWD\n$JUJU_PASSWD" | lxc exec VCA -- juju change-user-password
+JUJU_CONTROLLER_IP=`lxc exec VCA -- lxc list -c 4 |grep eth0 |awk '{print $2}'`
+
+echo -e " Configuring SO"
+sudo route add -host $JUJU_CONTROLLER_IP gw $VCA_CONTAINER_IP
+lxc exec SO-ub -- nohup sudo -b -H /usr/rift/rift-shell -r -i /usr/rift -a /usr/rift/.artifacts -- ./demos/launchpad.py --use-xml-mode
+sleep 60
+curl -k --request POST \
+ --url https://$SO_CONTAINER_IP:8008/api/config/config-agent \
+ --header 'accept: application/vnd.yang.data+json' \
+ --header 'authorization: Basic YWRtaW46YWRtaW4=' \
+ --header 'cache-control: no-cache' \
+ --header 'content-type: application/vnd.yang.data+json' \
+ --data '{"account": [ { "name": "osmjuju", "account-type": "juju", "juju": { "ip-address": "'$JUJU_CONTROLLER_IP'", "port": "17070", "user": "admin", "secret": "'$JUJU_PASSWD'" } } ]}'
+
+curl -k --request PUT \
+ --url https://$SO_CONTAINER_IP:8008/api/config/resource-orchestrator \
+ --header 'accept: application/vnd.yang.data+json' \
+ --header 'authorization: Basic YWRtaW46YWRtaW4=' \
+ --header 'cache-control: no-cache' \
+ --header 'content-type: application/vnd.yang.data+json' \
+ --data '{ "openmano": { "host": "'$RO_CONTAINER_IP'", "port": "9090", "tenant-id": "'$RO_TENANT_ID'" }, "name": "osmopenmano", "account-type": "openmano" }'
+
+
+echo -e "\nDONE"