From 5cd1d19cc846145cf0223c67886eb80e20a1e2a7 Mon Sep 17 00:00:00 2001 From: Lasse Dalegaard Date: Tue, 26 Sep 2017 22:19:18 +0200 Subject: [PATCH] Add rkt default network to Travis The current Travis setup scripts copy in rkt, but do not set up a default container network. Here we copy the container network setup over from the vagrant setup scripts. --- scripts/travis-rkt.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/scripts/travis-rkt.sh b/scripts/travis-rkt.sh index 2e06bf250..07375133f 100755 --- a/scripts/travis-rkt.sh +++ b/scripts/travis-rkt.sh @@ -19,4 +19,29 @@ function install_rkt() { mv /tmp/rkt-v${VERSION}/*.aci /usr/local/bin } +function configure_rkt_networking() { + if [[ -e /etc/rkt/net.d/99-network.conf ]] ; then + return + fi + + mkdir -p /etc/rkt/net.d + cat < /etc/rkt/net.d/99-network.conf +{ + "name": "default", + "type": "ptp", + "ipMasq": false, + "ipam": { + "type": "host-local", + "subnet": "172.16.28.0/24", + "routes": [ + { + "dst": "0.0.0.0/0" + } + ] + } +} +EOT +} + install_rkt +configure_rkt_networking