Add ovs integration tests for netvirt
[releng/builder.git] / vagrant / docker / bootstrap.sh
index 3ba1164fc54b6a75cc57b38477eafb56a12ab38f..ebafa994f23555aaf444e2e3a29a32c4653514c7 100644 (file)
@@ -2,15 +2,15 @@
 
 # vim: sw=4 ts=4 sts=4 et :
 
-fedora_changes() {
+rh_changes() {
     # make sure we're fully updated
     echo "---> Updating OS"
-    dnf clean all
-    dnf update -y -q
+    yum clean all
+    yum update -y -q
 
     # install docker and enable it
     echo "---> Installing docker"
-    dnf install -y docker supervisor bridge-utils
+    yum install -y docker supervisor bridge-utils
     systemctl enable docker
 
     # configure docker networking so that it does not conflict with LF
@@ -19,18 +19,14 @@ fedora_changes() {
 # /etc/sysconfig/docker-network
 DOCKER_NETWORK_OPTIONS='--bip=10.250.0.254/24'
 EOL
+    # configure docker daemon to listen on port 5555 enabling remote
+    # managment
+    sed -i -e "s#='--selinux-enabled'#='--selinux-enabled -H unix:///var/run/docker.sock -H tcp://0.0.0.0:5555'#g" /etc/sysconfig/docker
 
     # docker group doesn't get created by default for some reason
     groupadd docker
 }
 
-el_changes() {
-    # make sure we're fully updated
-    echo "---> Updating OS"
-    yum clean all
-    yum update -q -y
-}
-
 ubuntu_changes() {
     # make sure we're fully updated
     echo "---> Updating OS"
@@ -40,11 +36,8 @@ ubuntu_changes() {
 
 OS=`/usr/bin/facter operatingsystem`
 case "$OS" in
-    Fedora)
-        fedora_changes
-    ;;
-    Centos|RedHat)
-        el_changes
+    CentOS|Fedora|RedHat)
+        rh_changes
     ;;
     Ubuntu)
         ubuntu_changes