diff options
author | Dan Smith <daniel.smith@ericsson.com> | 2015-05-25 12:50:17 -0400 |
---|---|---|
committer | Dan Smith <daniel.smith@ericsson.com> | 2015-05-26 00:35:18 -0400 |
commit | fdc9462e02cd1c94a518d47a0ac2532bcbeb3cd5 (patch) | |
tree | f19b69ad55747d59abeadb64c3991d4870039aeb /fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh | |
parent | 758473ccdd2f5c2a5bc2ab726b0cc8972f01eb62 (diff) |
Delivering script for use with ODL automation to start ODL in daemon mode only.
To start ODL after a fuel deployment simply run "/opt/opnfv/odl/stage_odl.sh" and the DLUX GUI
will be listening at http://<br-ex ip>:8181/dlux/index.html
Usage / Order:
- after you have deployed login to controller and run config_net.sh
- do the same for your compute nodes
- login to controller and run stage_odl.sh
note: Ensure that you are able to reach the internet / and resolv.conf is set to a valid DNS
- create neutron networks and look in gui that your Nodes show up.
Change-Id: Iba3d99152052e9e31a6f709b510a30c8b080aa26
JIRA: 0
Signed-off-by: Dan Smith <daniel.smith@ericsson.com>
Diffstat (limited to 'fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh')
-rwxr-xr-x | fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh b/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh new file mode 100755 index 0000000..a7613c3 --- /dev/null +++ b/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/stage_odl.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Author: Daniel Smith (Ericsson) +# Stages ODL Controlleer +# Inputs: odl_docker_image.tar +# Usage: ./stage_odl.sh + +# ENVS +source ~/.bashrc +source ~/openrc + +LOCALPATH=/opt/opnfv/odl +DOCKERBIN=docker-latest +ODLIMGNAME=odl_docker_image.tar +DNS=8.8.8.8 +HOST_IP=`ifconfig br-ex | grep -i "inet addr" | awk -F":" '{print $2}' | awk -F" " '{print $1}'` + + +# DEBUG ECHOS +echo $LOCALPATH +echo $DOCKERBIN +echo $ODLIMGNAME +echo $DNS +echo $HOST_IP + + + +# Start Docker daemon and in background +echo "Starting Docker" +chmod +x $LOCALPATH/$DOCKERBIN +$LOCALPATH/$DOCKERBIN -d & +#courtesy sleep for virtual env +sleep 2 + +# Import the ODL Container +echo "Importing ODL Container" +$LOCALPATH/$DOCKERBIN load -i $LOCALPATH/$ODLIMGNAME + +# Start ODL, load DLUX and OVSDB modules +echo "Removing any old install found - file not found is ok here" +$LOCALPATH/$DOCKERBIN rm odl_docker +echo "Starting up ODL controller in Daemon mode - no shell possible" +$LOCALPATH/$DOCKERBIN run --name odl_docker -p 8181:8181 -p 8185:8185 -p 9000:9000 -p 1099:1099 -p 8101:8101 -p 6633:6633 -p 43506:43506 -p 44444:44444 -p 6653:6653 -p 12001:12001 -p 6400:6400 -p 6640:6640 -p 8080:8080 -p 7800:7800 -p 55130:55130 -p 52150:52150 -p 36826:26826 -i -d -t loving_daniel + +# Following, you should see the docker ps listed and a port opened +echo " you should reach ODL controller at http://HOST_IP:8181/dlux/index.html" +$LOCALPATH/$DOCKERBINNAME ps -a +netstat -lnt + + |