mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
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.
This commit is contained in:
@@ -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 <<EOT > /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
|
||||
|
||||
Reference in New Issue
Block a user