Removed opendaylight build capabilities as a preparation toward Arno SR1
[genesis.git] / common / puppet-opnfv / manifests / templates / dockerfile / container_scripts / start_odl_docker_container.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # daniel.smith@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10 #
11 # Simple expect script to start up ODL client and load feature set for DLUX and OVSDB
12 #  NOTE: THIS WILL BE REPLACED WITH A PROGRAMATIC METHOD SHORTLY
13 #################################################################################
14 #  Start up script for calling karaf / ODL inside a docker container.
15 #
16 #  This script will also call a couple expect scripts to load the feature set that we want
17
18
19 #ENV
20 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
21
22 #MAIN
23 echo "Starting up the da Sheilds..."
24 /opt/odl/distribution-karaf-0.2.3-Helium-SR3/bin/karaf server &
25 echo "Sleeping 5 bad hack"
26 sleep 10
27 echo "should see stuff listening now"
28 netstat -na
29 echo " should see proess running for karaf"
30 ps -efa
31 echo " Starting the packages we want"
32 /etc/init.d/speak.sh
33 echo "Printout the status - if its right, you should see 8181 appear now"
34 netstat -na
35 ps -efa
36
37
38
39 ## This is a loop that keeps our container going currently, prinout the "status of karaf" to the docker logs every minute
40 ## Cheap - but effective
41 while true;
42 do
43         echo "Checking status of ODL:"
44         /opt/odl/distribution-karaf-0.2.3-Helium-SR3/bin/status
45         sleep 60
46 done
47
48