summaryrefslogtreecommitdiff
path: root/.ubuntu_prepare.sh
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-10-01 12:10:46 -0500
committerbaude <bbaude@redhat.com>2018-10-03 12:45:37 -0500
commit14473270d7af520dae006605ab798ad9db34f184 (patch)
tree3224b4b540df5adccc615f5adede8c3e3db7eb90 /.ubuntu_prepare.sh
parent230edff5216d0a7cedeff06c891450f8691b5aa2 (diff)
downloadpodman-14473270d7af520dae006605ab798ad9db34f184.tar.gz
podman-14473270d7af520dae006605ab798ad9db34f184.tar.bz2
podman-14473270d7af520dae006605ab798ad9db34f184.zip
Add ability for ubuntu to be tested
unfortunately the papr CI system cannot test ubuntu as a VM; therefore, this PR still keeps travis. but it does include fixes that will be required for running on modern versions of ubuntu. Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to '.ubuntu_prepare.sh')
-rw-r--r--.ubuntu_prepare.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/.ubuntu_prepare.sh b/.ubuntu_prepare.sh
new file mode 100644
index 000000000..7b7dd1bb1
--- /dev/null
+++ b/.ubuntu_prepare.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+set -xeuo pipefail
+
+export GOPATH=/go
+export PATH=$HOME/gopath/bin:$PATH:$GOPATH/bin
+
+runc=0
+conmon=0
+cni=0
+podman_conf=0
+
+conmon_source=/go/src/github.com/containers/conmon
+cni_source=/go/src/github.com/containernetworking/plugins
+runc_source=/go/src/github.com/opencontainers/runc
+podman_source=/var/tmp/checkout
+
+while getopts "cnrf" opt; do
+ case "$opt" in
+ c) conmon=1
+ ;;
+ f) podman_conf=1
+ ;;
+ n) cni=1
+ ;;
+ r) runc=1
+ ;;
+ *) echo "Nothing to do ... exiting."
+ exit 0
+ ;;
+ esac
+done
+
+if [ $conmon -eq 1 ]; then
+ # Build and install conmon from source
+ echo "Building conmon ..."
+ git clone http://github.com/containers/conmon $conmon_source
+ cd $conmon_source && make install PREFIX=/usr
+fi
+
+
+if [ $cni -eq 1 ]; then
+ # Build and install containernetworking plugins from source
+ echo "Building containernetworking-plugins..."
+ git clone http://github.com/containernetworking/plugins $cni_source
+ cd $cni_source
+ ./build.sh
+ mkdir -p /usr/libexec/cni
+ cp -v bin/* /usr/libexec/cni/
+fi
+
+
+if [ $runc -eq 1 ]; then
+ # Build and install runc
+ echo "Building runc..."
+ git clone http://github.com/opencontainers/runc $runc_source
+ cd $runc_source
+ make install PREFIX=/usr
+fi
+
+if [ $podman_conf -eq 1 ]; then
+ # Install various configuration files required by libpod
+
+ # Install CNI conf file for podman
+ mkdir -p /etc/cni/net.d
+ cp -v $podman_source/cni/87-podman-bridge.conflist /etc/cni/net.d/
+
+ # Install registries.conf
+ mkdir -p /etc/containers
+ cp -v $podman_source/test/registries.conf /etc/containers/
+ cp -v $podman_source/test/policy.json /etc/containers/
+fi