10e9132bb8
This is a patch to build a centos image to support installing DC/OS as a magnum coe. Two elements are included: dcos and docker, only used to build a centos image. 1. Element docker will install and configure docker in centos. 2. Element dcos will download dcos_generate_config.sh and do some configurations for DC/OS. Design spec in contrib/drivers/dcos_centos_v1/image/README.md. Partially-Implements: blueprint mesos-dcos Change-Id: I30fa4c102205aa2475b9491398c06da0d1e86f84
27 lines
630 B
Bash
Executable File
27 lines
630 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
|
set -x
|
|
fi
|
|
set -eu
|
|
set -o pipefail
|
|
|
|
# Upgrade CentOS to 7.2
|
|
sudo -E yum upgrade --assumeyes --tolerant
|
|
sudo -E yum update --assumeyes
|
|
|
|
# Verify that the kernel is at least 3.10
|
|
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
|
|
|
|
kernel_version=`uname -r | cut --bytes=1-4`
|
|
expect_version=3.10
|
|
if version_gt $expect_version $kernel_version; then
|
|
echo "Error: kernel version at least $expect_version, current version $kernel_version"
|
|
exit 1
|
|
fi
|
|
|
|
# Enable OverlayFS
|
|
sudo tee /etc/modules-load.d/overlay.conf <<-'EOF'
|
|
overlay
|
|
EOF
|