summaryrefslogtreecommitdiffstats
path: root/fuel/build/f_odl_docker/puppet/modules/opnfv
diff options
context:
space:
mode:
Diffstat (limited to 'fuel/build/f_odl_docker/puppet/modules/opnfv')
-rw-r--r--fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp14
-rwxr-xr-xfuel/build/f_odl_docker/puppet/modules/opnfv/scripts/start_odl_container.sh15
2 files changed, 24 insertions, 5 deletions
diff --git a/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp b/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp
index ae24460..922ab41 100644
--- a/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp
+++ b/fuel/build/f_odl_docker/puppet/modules/opnfv/manifests/odl_docker.pp
@@ -35,6 +35,20 @@ class opnfv::odl_docker
source => "/etc/puppet/modules/opnfv/scripts/start_odl_container.sh",
mode => 750,
}
+
+ # fix failed to find the cgroup root issue
+ # https://github.com/docker/docker/issues/8791
+ if $::operatingsystem == 'Ubuntu' {
+ package {'cgroup-lite':
+ ensure => present,
+ }
+
+ service {'cgroup-lite':
+ ensure => running,
+ enable => true,
+ require => Package['cgroup-lite'],
+ }
+ }
}
}
}
diff --git a/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/start_odl_container.sh b/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/start_odl_container.sh
index 0b4fd46..0bddd20 100755
--- a/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/start_odl_container.sh
+++ b/fuel/build/f_odl_docker/puppet/modules/opnfv/scripts/start_odl_container.sh
@@ -24,7 +24,7 @@ DEV=1
MATCH_PORT=1
-LOCALPATH=/opt/opnfv/odl_docker
+LOCALPATH=/opt/opnfv/odl
DOCKERBINNAME=docker-latest
DOCKERIMAGENAME=odl_docker_image.tar
DNS=8.8.8.8
@@ -54,6 +54,10 @@ else
echo "Starting Docker in Daemon mode"
chmod +x $LOCALPATH/$DOCKERBINNAME
$LOCALPATH/$DOCKERBINNAME -d &
+
+ # wait until docker will be fully initialized
+ # before any further action against just started docker
+ sleep 5
fi
@@ -72,17 +76,18 @@ echo " starting up ODL - DLUX and Mapping Ports"
if [ "$MATCH_PORT" -eq "1" ]
then
echo "Starting up Docker..."
- docker rm odl_docker
+ $LOCALPATH/$DOCKERBINNAME rm odl_docker
+fi
if [ "$ENABLE_SHELL" -eq "1" ];
then
echo "Starting Container in Interactive Mode (/bin/bash will be provided, you will need to run ./start_odl_docker.sh inside the container yourself)"
- docker 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 8080:8080 -p 7800:7800 -p 55130:55130 -p 52150:52150 -p 36826:26826 -i -d -t loving_daniel /bin/bash
+ $LOCALPATH/$DOCKERBINNAME 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 -t loving_daniel /bin/bash
else
echo "Starting Conatiner in Daemon mode - no shell will be provided and docker attach will not provide shell)"
- docker 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 8080:8080 -p 7800:7800 -p 55130:55130 -p 52150:52150 -p 36826:26826 -i -d -t loving_daniel
+ $LOCALPATH/$DOCKERBINNAME 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
echo "should see the process listed here in docker ps -a"
- docker ps -a;
+ $LOCALPATH/$DOCKERBINNAME ps -a;
echo "Match Port enabled, you can reach the DLUX login at: "
echo "http://$HOST_IP:8181/dlux.index.html"
fi