Commit 280096fc authored by Spyros Trigazis's avatar Spyros Trigazis
Browse files

[cern] Upgrade to Fedora Atomic 25

Cherry-pick: https://review.openstack.org/#/c/417457/8

Image contains:
kubernetes-1.4.7-1.fc25.x86_64
docker-1.12.5-4.git03508cc.fc25.x86_64
flannel-0.5.5-8.fc25.x86_64
etcd-3.0.15-1.fc25.x86_64

* For this upgrade the upstream image is used, which is
  uploaded here [1].
* Minor changes for flannel and docker-storage-setup
  were needed.
* The image will be built in the CI and uploaded to
  tarballs.openstack.org as soon as possible.

[1] https://fedorapeople.org/groups/magnum/fedora-atomic-25-20161221.qcow2

Change-Id: Iac6e30c530821a49a5c3978e335e0b1d56a576e0

Conflicts:
	magnum/drivers/common/templates/fragments/configure_docker_storage_driver_atomic.sh
	magnum/drivers/common/templates/kubernetes/fragments/write-network-config.sh
	magnum/drivers/k8s_fedora_atomic_v1/version.py
	magnum/drivers/swarm_fedora_atomic_v1/version.py
	magnum/tests/contrib/gate_hook.sh
parent cbcf3909
#!/bin/sh
set -x
. /etc/sysconfig/heat-params
if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then
......@@ -30,6 +32,8 @@ if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then
fi
fi
systemctl stop docker
$configure_docker_storage_driver
if [ "$DOCKER_STORAGE_DRIVER" = "overlay" ]; then
......@@ -44,3 +48,5 @@ if [ "$DOCKER_STORAGE_DRIVER" = "overlay" ]; then
else
configure_devicemapper
fi
systemctl start docker-storage-setup
# This file contains docker storage drivers configuration for fedora
# atomic hosts. Currently, devicemapper and overlay are supported.
# Remove any existing docker-storage configuration. In case of an
# existing configuration, docker-storage-setup will fail.
clear_docker_storage_congiguration () {
# - Remove any existing docker-storage configuration. In case of an
# existing configuration, docker-storage-setup will fail.
# - Remove the current storage graph.
clear_docker_storage () {
if [ -f /etc/sysconfig/docker-storage ]; then
sed -i "/^DOCKER_STORAGE_OPTIONS=/ s/=.*/=/" /etc/sysconfig/docker-storage
fi
rm -rf /var/lib/docker/*
}
# Configure docker storage with xfs as backing filesystem.
configure_overlay () {
clear_docker_storage_congiguration
rm -rf /var/lib/docker/*
clear_docker_storage
if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then
mkfs.xfs -f ${device_path}
......@@ -31,7 +32,7 @@ configure_overlay () {
# Configure docker storage with devicemapper using direct LVM
configure_devicemapper () {
clear_docker_storage_congiguration
clear_docker_storage
if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then
pvcreate -f ${device_path}
......
......@@ -73,13 +73,13 @@ sed -i '
if [ "$NETWORK_DRIVER" = "flannel" ]; then
sed -i '
/^FLANNEL_ETCD=/ s|=.*|="'"$PROTOCOL"'://'"$ETCD_SERVER_IP"':2379"|
/^FLANNEL_ETCD_ENDPOINTS=/ s|=.*|="'"$PROTOCOL"'://'"$ETCD_SERVER_IP"':2379"|
' $FLANNELD_CONFIG
# Make sure etcd has a flannel configuration
. $FLANNELD_CONFIG
until curl -sf $ETCD_CURL_OPTIONS \
"$FLANNEL_ETCD/v2/keys${FLANNEL_ETCD_KEY}/config?quorum=false&recursive=false&sorted=false"
"$FLANNEL_ETCD_ENDPOINTS/v2/keys${FLANNEL_ETCD_PREFIX}/config?quorum=false&recursive=false&sorted=false"
do
echo "Waiting for flannel configuration in etcd..."
sleep 5
......
......@@ -41,14 +41,14 @@ if ! [ -f "$FLANNEL_JSON" ]; then
exit 1
fi
if ! [ "$FLANNEL_ETCD" ] && [ "$FLANNEL_ETCD_KEY" ]; then
if [ -z "$FLANNEL_ETCD_ENDPOINTS" ] || [ -z "$FLANNEL_ETCD_PREFIX" ]; then
echo "ERROR: missing required configuration" >&2
exit 1
fi
echo "creating flanneld config in etcd"
while ! curl -sf -L $ETCD_CURL_OPTIONS \
$FLANNEL_ETCD/v2/keys${FLANNEL_ETCD_KEY}/config \
$FLANNEL_ETCD_ENDPOINTS/v2/keys${FLANNEL_ETCD_PREFIX}/config \
-X PUT --data-urlencode value@${FLANNEL_JSON}; do
echo "waiting for etcd"
sleep 1
......
......@@ -12,7 +12,7 @@ FLANNEL_JSON=/etc/sysconfig/flannel-network.json
FLANNELD_CONFIG=/etc/sysconfig/flanneld
sed -i '
/^FLANNEL_ETCD=/ s/=.*/="http:\/\/127.0.0.1:2379"/
/^FLANNEL_ETCD_ENDPOINTS=/ s/=.*/="http:\/\/127.0.0.1:2379"/
' /etc/sysconfig/flanneld
# Generate a flannel configuration that we will
......
......@@ -256,7 +256,7 @@ parameters:
kube_version:
type: string
description: version of kubernetes used for kubernetes cluster
default: v1.2.0
default: v1.4.7
insecure_registry_url:
type: string
......
......@@ -13,5 +13,5 @@
# limitations under the License.
version = '1.0.0'
driver = 'k8s_fedora_atomic'
container_version = '1.9.1'
driver = 'k8s_fedora_atomic_v1'
container_version = '1.12.5'
......@@ -269,7 +269,7 @@ parameters:
kube_version:
type: string
description: version of kubernetes used for kubernetes cluster
default: v1.2.0
default: v1.4.7
insecure_registry_url:
type: string
......
#!/bin/sh
set -x
echo "stopping docker"
systemctl stop docker
echo "starting services"
systemctl daemon-reload
for service in $NODE_SERVICES; do
......
......@@ -13,5 +13,5 @@
# limitations under the License.
version = '1.0.0'
driver = 'swarm_atomic'
container_version = '1.9.1'
driver = 'swarm_fedora_atomic_v1'
container_version = '1.12.5'
......@@ -81,6 +81,7 @@ elif [[ "$COE" == "swarm" ]]; then
remote_exec $SSH_USER "sudo journalctl -u cloud-final --no-pager" cloud-final.log
remote_exec $SSH_USER "sudo journalctl -u cloud-init-local --no-pager" cloud-init-local.log
remote_exec $SSH_USER "sudo journalctl -u cloud-init --no-pager" cloud-init.log
remote_exec $SSH_USER "sudo cat /var/log/cloud-init-output.log" cloud-init-output.log
remote_exec $SSH_USER "sudo journalctl -u etcd --no-pager" etcd.log
remote_exec $SSH_USER "sudo journalctl -u swarm-manager --no-pager" swarm-manager.log
remote_exec $SSH_USER "sudo journalctl -u swarm-agent --no-pager" swarm-agent.log
......@@ -89,6 +90,8 @@ elif [[ "$COE" == "swarm" ]]; then
remote_exec $SSH_USER "sudo systemctl show docker-storage-setup --no-pager" docker-storage-setup.service.show.log
remote_exec $SSH_USER "sudo cat /etc/sysconfig/docker-storage-setup 2>/dev/null" docker-storage-setup.sysconfig.env.log
remote_exec $SSH_USER "sudo journalctl -u docker --no-pager" docker.log
remote_exec $SSH_USER "sudo systemctl status docker.socket -l" docker.socket.status.log
remote_exec $SSH_USER "sudo systemctl show docker.socket --no-pager" docker.socket.show.log
remote_exec $SSH_USER "sudo systemctl status docker -l" docker.service.status.log
remote_exec $SSH_USER "sudo systemctl show docker --no-pager" docker.service.show.log
remote_exec $SSH_USER "sudo cat /etc/sysconfig/docker" docker.sysconfig.env.log
......
......@@ -32,8 +32,8 @@ if [ "$coe" = "mesos" ]; then
elif [ "$coe" = "k8s-coreos" ]; then
echo "MAGNUM_GUEST_IMAGE_URL=http://beta.release.core-os.net/amd64-usr/1153.4.0/coreos_production_openstack_image.img.bz2" >> $BASE/new/devstack/localrc
elif [ "${coe}${special}" = "k8s-ironic" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-24-kubernetes-ironic.tar.gz'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-24-kubernetes-ironic'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-25-kubernetes-ironic.tar.gz'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-25-kubernetes-ironic'"
export DEVSTACK_GATE_VIRT_DRIVER="ironic"
# NOTE(yuanying): Current implementation requires only 1 subnet under network
......@@ -78,8 +78,8 @@ elif [ "${coe}${special}" = "k8s-ironic" ]; then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_SPECS_DISK=10"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"IRONIC_VM_EPHEMERAL_DISK=5"
else
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='http://tarballs.openstack.org/magnum/images/fedora-atomic-f23-dib.qcow2'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-atomic-f23-dib'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_GUEST_IMAGE_URL='https://fedorapeople.org/groups/magnum/fedora-atomic-25-20170106.qcow2'"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"MAGNUM_IMAGE_NAME='fedora-atomic-25-20170106'"
fi
# Enable magnum plugin in the last step
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment