From cdfdd9cb453eeffd0c3668f456b46baa2dac8c95 Mon Sep 17 00:00:00 2001 From: toszo Date: Wed, 27 Mar 2019 12:44:43 +0100 Subject: [PATCH 1/7] Fix for #177 and K8s upgrade to 1.13.1 #178 --- CHANGELOG-0.2.md | 9 +++++++++ .../roles/kubernetes-common/tasks/install-packages.yml | 2 ++ core/core/src/templates/common/manifest.yaml.j2 | 2 +- .../azure/infrastructure/epiphany-bld-apps/data.yaml | 2 +- .../azure/infrastructure/epiphany-template/data.yaml.j2 | 2 +- core/data/metal/single-machine/data.yaml | 2 +- core/data/vmware/epiphany-lab/data.yaml | 2 +- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG-0.2.md b/CHANGELOG-0.2.md index dcbeabad45..1cc96ed0d9 100644 --- a/CHANGELOG-0.2.md +++ b/CHANGELOG-0.2.md @@ -1,5 +1,14 @@ # Changelog 0.2 +## [0.2.2] 2019-03-27 + +### Changed +- Kubernetes version 1.13.1 #178 + +### Fixed + +- Fix issue with kubernetes-cni in 0.2.2 #177 + ## [0.2.1] 2019-03-07 ### Fixed diff --git a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml index f1c1c17f91..b0a1faa580 100644 --- a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml +++ b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml @@ -15,6 +15,7 @@ name: - kubelet-{{kubernetes.version}} - kubectl-{{kubernetes.version}} + - kubernetes-cni=0.6.0 # todo remove it in future release - kubeadm-{{kubernetes.version}} update_cache: yes state: present @@ -25,6 +26,7 @@ name: - kubelet={{kubernetes.version}}-00 - kubectl={{kubernetes.version}}-00 + - kubernetes-cni=0.6.0-00 # todo remove it in future release - kubeadm={{kubernetes.version}}-00 update_cache: yes state: present diff --git a/core/core/src/templates/common/manifest.yaml.j2 b/core/core/src/templates/common/manifest.yaml.j2 index 70ed0112c3..eda707ec3b 100644 --- a/core/core/src/templates/common/manifest.yaml.j2 +++ b/core/core/src/templates/common/manifest.yaml.j2 @@ -87,7 +87,7 @@ nodes: {%- endfor %} kubernetes: - version: 1.13.0 #latest + version: 1.13.1 storage: enable: {{ core.kubernetes.storage.enable }} type: {{ core.kubernetes.storage.type }} diff --git a/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml b/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml index ae47958f78..3f39f1aeb0 100644 --- a/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml +++ b/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml @@ -1128,7 +1128,7 @@ core: kubernetes: - version: 1.13.0 + version: 1.13.1 # image_registry_secrets: # - name: regcred # server_url: your-registry-url diff --git a/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 b/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 index 5fd7dcfe82..8ebeea86c6 100644 --- a/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 +++ b/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 @@ -1167,7 +1167,7 @@ core: {% endif %} kubernetes: - version: 1.13.0 + version: 1.13.1 # image_registry_secrets: # - name: regcred # server_url: your-registry-url diff --git a/core/data/metal/single-machine/data.yaml b/core/data/metal/single-machine/data.yaml index 6aefc14e72..c55a044b2c 100644 --- a/core/data/metal/single-machine/data.yaml +++ b/core/data/metal/single-machine/data.yaml @@ -103,7 +103,7 @@ nodes: private: 192.168.1.2 kubernetes: - version: 1.13.0 + version: 1.13.1 #image_registry_secrets: # - name: regcred # server_url: your-registry-url diff --git a/core/data/vmware/epiphany-lab/data.yaml b/core/data/vmware/epiphany-lab/data.yaml index 099dc635cb..3bfed06b13 100644 --- a/core/data/vmware/epiphany-lab/data.yaml +++ b/core/data/vmware/epiphany-lab/data.yaml @@ -324,7 +324,7 @@ nodes: private: 192.168.1.66 kubernetes: - version: 1.13.0 + version: 1.13.1 storage: enable: False From f1cb68f92cbb88fb7d37ba92fda7f69445f781a3 Mon Sep 17 00:00:00 2001 From: toszo Date: Wed, 27 Mar 2019 13:00:50 +0100 Subject: [PATCH 2/7] Documentation - how to upgrade to 1.13.1 --- CHANGELOG-0.2.md | 4 +++ docs/home/HOWTO.md | 66 +++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 1 deletion(-) diff --git a/CHANGELOG-0.2.md b/CHANGELOG-0.2.md index 1cc96ed0d9..75d93e66f2 100644 --- a/CHANGELOG-0.2.md +++ b/CHANGELOG-0.2.md @@ -2,6 +2,10 @@ ## [0.2.2] 2019-03-27 +### Added + +- Documentation for manual upgrade Kubernetes from 1.13.0 to 1.13.1 [link](./docs/home/HOWTO.md#how-to-upgrade-kubernetes-cluster-from-1.13.0-to-1.13.1) + ### Changed - Kubernetes version 1.13.1 #178 diff --git a/docs/home/HOWTO.md b/docs/home/HOWTO.md index fab96ebee5..d4f2393a34 100644 --- a/docs/home/HOWTO.md +++ b/docs/home/HOWTO.md @@ -29,7 +29,8 @@ - [How to run chaos on Epiphany Kubernetes cluster and monitor it with Grafana](#how-to-run-chaos-on-epiphany-kubernetes-cluster-and-monitor-it-with-grafana) - [How to tunnel Kubernetes dashboard from remote kubectl to your PC](#how-to-tunnel-kubernetes-dashboard-from-remote-kubectl-to-your-pc) - [How to setup Azure VM as docker machine for development](#how-to-setup-azure-vm-as-docker-machine-for-development) - - [How to upgrade Kubernetes cluster](#how-to-upgrade-kubernete-cluster) + - [How to upgrade Kubernetes cluster](#how-to-upgrade-kubernetes-cluster) + - [How to upgrade Kubernetes cluster from 1.13.0 to 1.13.1](#how-to-upgrade-kubernete-cluster-from-1.13.0-to-1.13.1) - [How to authenticate to Azure AD app](#how-to-authenticate-to-azure-ad-app) - [How to expose service through HA Proxy load balancer](#how-to-expose-service-lb) - Security @@ -794,6 +795,69 @@ Start cluster upgrade with upgrading master node. Detailed instructions how to u Once master upgrade finished successfully, you shall start upgrading nodes - **one by one**. Kubernetes master will notice when worker node is down and it will instatiate services on existing operating node, that is why it is essential to have more than one worker node in cluster to minimize applications downtime. +## How to upgrade Kubernetes cluster from 1.13.0 to 1.13.1 + +Detailed instruction can be found in [Kubernetes upgrade to 1.13 documentation](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/) + +### Upgrade Master + +```bash +# RUN ON MASTER + +1. sudo kubeadm version +2. sudo kubeadm upgrade plan v1.13.1 + +3. apt update +4. apt-cache policy kubeadm + + +5. sudo apt-mark unhold kubeadm && \ +sudo apt-get update && sudo apt-get install -y kubeadm=1.13.1-00 && \ +sudo apt-mark hold kubeadm + +6. kubeadm version +7. sudo kubeadm upgrade plan v1.13.1 + +8. kubeadm upgrade apply v1.13.1 + +9. sudo apt-mark unhold kubelet && \ +sudo apt-get update && sudo apt-get install -y kubelet=1.13.1-00 && \ +sudo apt-mark hold kubelet +``` + +### Upgrade Worker Node + +Commands below should be run in context of each node in the cluster. Variable `$NODE` represents node name (node names can be retrieved by command `kubectl get nodes` on master) + +Worker nodes will be upgraded one by one - it will prevent application downtime. + +```bash + +# RUN ON WORKER NODE - $NODE + +1. sudo apt-mark unhold kubectl && \ +sudo apt-get update && sudo apt-get install -y kubectl=1.13.1-00 && \ +sudo apt-mark hold kubectl + +# RUN ON MASTER + +2. kubectl drain $NODE --ignore-daemonsets + +# EXECUTE ON WORKER NODE - $NODE + +3. sudo kubeadm upgrade node config --kubelet-version v1.13.1 + +4. sudo apt-get update +5. sudo apt-get install -y kubelet=1.13.1-00 kubeadm=1.13.1-00 + +6. sudo systemctl restart kubelet +7. sudo systemctl status kubelet +8. kubectl uncordon $NODE + +9. # go to 1. for next node + +``` + ## How to upgrade Kafka cluster ### Kafka upgrade From 84b5d2a96f542e1588615f39b5bbddc7b0d79616 Mon Sep 17 00:00:00 2001 From: toszo Date: Wed, 27 Mar 2019 15:54:08 +0100 Subject: [PATCH 3/7] Upgrade K8s to 1.13.1 manual for RHEL --- docs/home/HOWTO.md | 73 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 7 deletions(-) diff --git a/docs/home/HOWTO.md b/docs/home/HOWTO.md index d4f2393a34..b2125b58c2 100644 --- a/docs/home/HOWTO.md +++ b/docs/home/HOWTO.md @@ -30,7 +30,7 @@ - [How to tunnel Kubernetes dashboard from remote kubectl to your PC](#how-to-tunnel-kubernetes-dashboard-from-remote-kubectl-to-your-pc) - [How to setup Azure VM as docker machine for development](#how-to-setup-azure-vm-as-docker-machine-for-development) - [How to upgrade Kubernetes cluster](#how-to-upgrade-kubernetes-cluster) - - [How to upgrade Kubernetes cluster from 1.13.0 to 1.13.1](#how-to-upgrade-kubernete-cluster-from-1.13.0-to-1.13.1) + - [How to upgrade Kubernetes cluster from 1.13.0 to 1.13.1](#how-to-upgrade-kubernetes-cluster-from-1130-to-1131) - [How to authenticate to Azure AD app](#how-to-authenticate-to-azure-ad-app) - [How to expose service through HA Proxy load balancer](#how-to-expose-service-lb) - Security @@ -799,12 +799,14 @@ Once master upgrade finished successfully, you shall start upgrading nodes - **o Detailed instruction can be found in [Kubernetes upgrade to 1.13 documentation](https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-13/) -### Upgrade Master +### Ubuntu Server + +#### Upgrade Master ```bash # RUN ON MASTER -1. sudo kubeadm version +1. sudo kubeadm version # should show v1.13.0 2. sudo kubeadm upgrade plan v1.13.1 3. apt update @@ -815,17 +817,17 @@ Detailed instruction can be found in [Kubernetes upgrade to 1.13 documentation]( sudo apt-get update && sudo apt-get install -y kubeadm=1.13.1-00 && \ sudo apt-mark hold kubeadm -6. kubeadm version +6. sudo kubeadm version # should show v1.13.1 7. sudo kubeadm upgrade plan v1.13.1 -8. kubeadm upgrade apply v1.13.1 +8. sudo kubeadm upgrade apply v1.13.1 9. sudo apt-mark unhold kubelet && \ sudo apt-get update && sudo apt-get install -y kubelet=1.13.1-00 && \ sudo apt-mark hold kubelet ``` -### Upgrade Worker Node +#### Upgrade Worker Nodes Commands below should be run in context of each node in the cluster. Variable `$NODE` represents node name (node names can be retrieved by command `kubectl get nodes` on master) @@ -851,11 +853,68 @@ sudo apt-mark hold kubectl 5. sudo apt-get install -y kubelet=1.13.1-00 kubeadm=1.13.1-00 6. sudo systemctl restart kubelet -7. sudo systemctl status kubelet +7. sudo systemctl status kubelet # should be running 8. kubectl uncordon $NODE 9. # go to 1. for next node +# RUN ON MASTER +10. kubectl get nodes # should return nodes in status "Ready" and version 1.13.1 + +``` + +### RHEL + +#### Upgrade Master + +```bash +# RUN ON MASTER + +1. sudo kubeadm version # should show v1.13.0 +2. sudo kubeadm upgrade plan v1.13.1 + +3. sudo yum install -y kubeadm-1.13.1-0 --disableexcludes=kubernetes + +4. sudo kubeadm version # should show v1.13.1 +5. sudo kubeadm upgrade plan v1.13.1 + +6. sudo kubeadm upgrade apply v1.13.1 + +7. sudo yum install -y kubelet-1.13.1-0 --disableexcludes=kubernetes + +``` + +#### Upgrade Worker Nodes + +Commands below should be run in context of each node in the cluster. Variable `$NODE` represents node name (node names can be retrieved by command `kubectl get nodes` on master) + +Worker nodes will be upgraded one by one - it will prevent application downtime. + +```bash + +# RUN ON WORKER NODE - $NODE + +1. yum install -y kubectl-1.13.1-0 --disableexcludes=kubernetes + +# RUN ON MASTER + +2. kubectl drain $NODE --ignore-daemonsets + +# EXECUTE ON WORKER NODE - $NODE + +3. sudo kubeadm upgrade node config --kubelet-version v1.13.1 + +4. sudo yum install -y kubelet-1.13.1-0 kubeadm-1.13.1-0 --disableexcludes=kubernetes + +5. sudo systemctl restart kubelet +6. sudo systemctl status kubelet # should be running +7. kubectl uncordon $NODE + +8. # go to 1. for next node + +# RUN ON MASTER +9. kubectl get nodes # should return nodes in status "Ready" and version 1.13.1 + ``` ## How to upgrade Kafka cluster From 6b653f2b38fa50db5df5d7ca9c0d74e42081f916 Mon Sep 17 00:00:00 2001 From: toszo Date: Wed, 27 Mar 2019 16:01:56 +0100 Subject: [PATCH 4/7] Minor doc fixes (upgrade K8s 1.13.1) --- docs/home/HOWTO.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/home/HOWTO.md b/docs/home/HOWTO.md index b2125b58c2..01a1a50ddc 100644 --- a/docs/home/HOWTO.md +++ b/docs/home/HOWTO.md @@ -845,7 +845,7 @@ sudo apt-mark hold kubectl 2. kubectl drain $NODE --ignore-daemonsets -# EXECUTE ON WORKER NODE - $NODE +# RUN ON WORKER NODE - $NODE 3. sudo kubeadm upgrade node config --kubelet-version v1.13.1 @@ -854,6 +854,9 @@ sudo apt-mark hold kubectl 6. sudo systemctl restart kubelet 7. sudo systemctl status kubelet # should be running + +# RUN ON MASTER + 8. kubectl uncordon $NODE 9. # go to 1. for next node @@ -900,7 +903,7 @@ Worker nodes will be upgraded one by one - it will prevent application downtime. 2. kubectl drain $NODE --ignore-daemonsets -# EXECUTE ON WORKER NODE - $NODE +# RUN ON WORKER NODE - $NODE 3. sudo kubeadm upgrade node config --kubelet-version v1.13.1 @@ -908,6 +911,9 @@ Worker nodes will be upgraded one by one - it will prevent application downtime. 5. sudo systemctl restart kubelet 6. sudo systemctl status kubelet # should be running + +# RUN ON MASTER + 7. kubectl uncordon $NODE 8. # go to 1. for next node From c9461934b6d297c9d259cd2d56ac92533714743b Mon Sep 17 00:00:00 2001 From: toszo Date: Wed, 27 Mar 2019 16:52:50 +0100 Subject: [PATCH 5/7] Change kubernetes cni install version in ansible task --- .../ansible/roles/kubernetes-common/tasks/install-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml index b0a1faa580..43eb6cbaa1 100644 --- a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml +++ b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml @@ -15,7 +15,7 @@ name: - kubelet-{{kubernetes.version}} - kubectl-{{kubernetes.version}} - - kubernetes-cni=0.6.0 # todo remove it in future release + - kubernetes-cni=0.6.0-0 # todo remove it in future release - kubeadm-{{kubernetes.version}} update_cache: yes state: present From dbb10cd771883ca3c2a3a044f0abc4ec65a2f5d0 Mon Sep 17 00:00:00 2001 From: toszo Date: Thu, 28 Mar 2019 16:38:06 +0100 Subject: [PATCH 6/7] Items #182, #178, #177, #183 Kubernete-cni v0.6.0 installation, docker-ce on RedHat, fied url for Kafka --- CHANGELOG-0.2.md | 2 + .../src/ansible/roles/docker/tasks/RedHat.yml | 11 ++++- .../roles/docker/tasks/configure-docker.yml | 8 ---- .../ansible/roles/kafka/tasks/setup-kafka.yml | 4 +- .../tasks/install-packages.yml | 8 ++-- .../epiphany-bld-apps/data.yaml | 2 +- .../epiphany-template/data.yaml.j2 | 4 +- core/manifest.yaml | 2 +- core/version.sh | 2 +- docs/home/HOWTO.md | 40 +++++++++++++++---- 10 files changed, 55 insertions(+), 28 deletions(-) diff --git a/CHANGELOG-0.2.md b/CHANGELOG-0.2.md index 75d93e66f2..82c40d8b66 100644 --- a/CHANGELOG-0.2.md +++ b/CHANGELOG-0.2.md @@ -8,10 +8,12 @@ ### Changed - Kubernetes version 1.13.1 #178 +- Docker version for RedHat to 18.06 ### Fixed - Fix issue with kubernetes-cni in 0.2.2 #177 +- Fix Kafka url #183 ## [0.2.1] 2019-03-07 diff --git a/core/core/src/ansible/roles/docker/tasks/RedHat.yml b/core/core/src/ansible/roles/docker/tasks/RedHat.yml index 46400f46ad..6c79738ab0 100644 --- a/core/core/src/ansible/roles/docker/tasks/RedHat.yml +++ b/core/core/src/ansible/roles/docker/tasks/RedHat.yml @@ -1,7 +1,14 @@ --- +- name: Add Docker-CE stable repo + yum_repository: + name: docker-ce-stable + description: Docker CE Stable Repo + baseurl: https://download.docker.com/linux/centos/7/$basearch/stable + gpgkey: https://download.docker.com/linux/centos/gpg + gpgcheck: yes + - name: Install Docker yum: - name: docker + name: docker-ce-18.06.3.ce-3.el7 state: present update_cache: yes - when: ansible_os_family == "RedHat" diff --git a/core/core/src/ansible/roles/docker/tasks/configure-docker.yml b/core/core/src/ansible/roles/docker/tasks/configure-docker.yml index 09990dd63f..9de0a1005e 100644 --- a/core/core/src/ansible/roles/docker/tasks/configure-docker.yml +++ b/core/core/src/ansible/roles/docker/tasks/configure-docker.yml @@ -1,12 +1,4 @@ --- -- name: Unset log driver if defined in /etc/sysconfig/docker - replace: # remove --log-driver=driver-name to configure log-driver in daemon.json - path: /etc/sysconfig/docker - regexp: '^(OPTIONS=.*?)(?:--log-driver=[\w|-]+\s*|\s+--log-driver=[\w|-]+)(.*)$' - replace: '\1\2' - notify: Restart Docker - when: ansible_os_family == "RedHat" - - name: Copy configuration file (daemon.json) template: src: daemon.json.j2 diff --git a/core/core/src/ansible/roles/kafka/tasks/setup-kafka.yml b/core/core/src/ansible/roles/kafka/tasks/setup-kafka.yml index 8f37536f43..e54a0ffb66 100644 --- a/core/core/src/ansible/roles/kafka/tasks/setup-kafka.yml +++ b/core/core/src/ansible/roles/kafka/tasks/setup-kafka.yml @@ -3,10 +3,10 @@ stat: path: "/tmp/kafka_{{ kafka_var.scala.version }}-{{ kafka_var.version }}.tgz" register: kafka_check - + - name: Fetch Kafka binary package get_url: - url: "http://apache.mirrors.tds.net/kafka/{{ kafka_var.version }}/kafka_{{ kafka_var.scala.version }}-{{ kafka_var.version }}.tgz" + url: "https://archive.apache.org/dist/kafka/{{ kafka_var.version }}/kafka_{{ kafka_var.scala.version }}-{{ kafka_var.version }}.tgz" dest: "/tmp/kafka_{{ kafka_var.scala.version }}-{{ kafka_var.version }}.tgz" when: not kafka_check.stat.exists diff --git a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml index 43eb6cbaa1..85709e504a 100644 --- a/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml +++ b/core/core/src/ansible/roles/kubernetes-common/tasks/install-packages.yml @@ -10,23 +10,23 @@ - samba-common when: kubernetes.storage.enable == True -- name: Install RedHat family packages +- name: Install Kubernetes packages for RedHat family yum: name: + - kubernetes-cni-0.6.0-0 # todo remove it in future release - kubelet-{{kubernetes.version}} - kubectl-{{kubernetes.version}} - - kubernetes-cni=0.6.0-0 # todo remove it in future release - kubeadm-{{kubernetes.version}} update_cache: yes state: present when: ansible_os_family == "RedHat" -- name: Install Debian family packages +- name: Install Kubernetes packages for Debian family apt: name: + - kubernetes-cni=0.6.0-00 # todo remove it in future release - kubelet={{kubernetes.version}}-00 - kubectl={{kubernetes.version}}-00 - - kubernetes-cni=0.6.0-00 # todo remove it in future release - kubeadm={{kubernetes.version}}-00 update_cache: yes state: present diff --git a/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml b/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml index 3f39f1aeb0..34aaaebecb 100644 --- a/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml +++ b/core/data/azure/infrastructure/epiphany-bld-apps/data.yaml @@ -8,7 +8,7 @@ title: Epiphany Apps Infrastructure... kind: datafile -version: 0.2.0 +version: 0.2.2 # NOTE: Any data values that are empty put "" or the value None will be used in the templates for those attributes. diff --git a/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 b/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 index 8ebeea86c6..930cb82537 100644 --- a/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 +++ b/core/data/azure/infrastructure/epiphany-template/data.yaml.j2 @@ -9,7 +9,7 @@ title: Epiphany ({{ azure.image_offer }}) {{ environment_name }} kind: datafile -version: 0.2.0 +version: 0.2.2 # NOTE: Any data values that are empty put "" or the value None will be used in the templates for those attributes. @@ -27,7 +27,7 @@ core: build: # IMPORTANT - will be appended to release name and output folder and part of the template names - version: &version 0.1.21 + version: &version 0.2.2 # Type of build environment environment: &env development # Name of the given release. Version will be appended diff --git a/core/manifest.yaml b/core/manifest.yaml index fe75bb9c5d..d8eddc443f 100644 --- a/core/manifest.yaml +++ b/core/manifest.yaml @@ -3,7 +3,7 @@ # This data is for the core of Epiphany and not the data for a given environment. name: Epiphany -version: 0.2.0 +version: 0.2.2 # Set the proxy info up if your environment requires it. This is sometimes the case for on-premise builds/installs proxy: diff --git a/core/version.sh b/core/version.sh index c95caacba7..49c1c524cf 100755 --- a/core/version.sh +++ b/core/version.sh @@ -25,5 +25,5 @@ set -e unset EPIPHANY_VERSION unset EPIPHANY_VERSION_NAME -export EPIPHANY_VERSION="0.2.0" +export EPIPHANY_VERSION="0.2.2" export EPIPHANY_VERSION_NAME="Epiphany" \ No newline at end of file diff --git a/docs/home/HOWTO.md b/docs/home/HOWTO.md index 01a1a50ddc..5b62a70c2a 100644 --- a/docs/home/HOWTO.md +++ b/docs/home/HOWTO.md @@ -868,6 +868,30 @@ sudo apt-mark hold kubectl ### RHEL +#### Upgrade Docker version + +Upgrading on Kubernetes to 1.13.1 on RHEL requires Docker upgrade. Newer Docker packages exist in docker-ce repository but you can use newer Docker-ee if you need. Verified Docker versions for Kubernetes are: 1.11.1, 1.12.1, 1.13.1, 17.03, 17.06, 17.09, 18.06. [Go to K8s docs](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#external-dependencies) + +```bash + +# Remove previous docker version +1 sudo yum remove docker \ + docker-common \ + container-selinux \ + docker-selinux \ + docker-engine +2. sudo rm -rf /var/lib/docker +3. sudo rm -rf /run/docker +4. sudo rm -rf /var/run/docker +5. sudo rm -rf /etc/docker + +# Add docker-ce repository +6. sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo +7. sudo yum makecache fast +8. sudo yum -y install docker-ce-18.06.3.ce-3.el7 + +``` + #### Upgrade Master ```bash @@ -905,21 +929,23 @@ Worker nodes will be upgraded one by one - it will prevent application downtime. # RUN ON WORKER NODE - $NODE -3. sudo kubeadm upgrade node config --kubelet-version v1.13.1 +3. # Upgrade Docker version using instruction from above + +4. sudo kubeadm upgrade node config --kubelet-version v1.13.1 -4. sudo yum install -y kubelet-1.13.1-0 kubeadm-1.13.1-0 --disableexcludes=kubernetes +5. sudo yum install -y kubelet-1.13.1-0 kubeadm-1.13.1-0 --disableexcludes=kubernetes -5. sudo systemctl restart kubelet -6. sudo systemctl status kubelet # should be running +6. sudo systemctl restart kubelet +7. sudo systemctl status kubelet # should be running # RUN ON MASTER -7. kubectl uncordon $NODE +8. kubectl uncordon $NODE -8. # go to 1. for next node +9. # go to 1. for next node # RUN ON MASTER -9. kubectl get nodes # should return nodes in status "Ready" and version 1.13.1 +10. kubectl get nodes # should return nodes in status "Ready" and version 1.13.1 ``` From 0c4dc0ff44f876e90ac4f3a3a03b3a86c7ba9493 Mon Sep 17 00:00:00 2001 From: toszo Date: Fri, 29 Mar 2019 09:27:13 +0100 Subject: [PATCH 7/7] Item: #178, Documentation updates --- CHANGELOG-0.2.md | 7 ++++--- .../infrastructure/epiphany-playground/basic-data.yaml | 2 +- core/data/metal/epiphany-lab/data.yaml | 2 +- docs/home/HOWTO.md | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG-0.2.md b/CHANGELOG-0.2.md index 82c40d8b66..a103970cdf 100644 --- a/CHANGELOG-0.2.md +++ b/CHANGELOG-0.2.md @@ -1,18 +1,19 @@ # Changelog 0.2 -## [0.2.2] 2019-03-27 +## [0.2.2] 2019-03-29 ### Added -- Documentation for manual upgrade Kubernetes from 1.13.0 to 1.13.1 [link](./docs/home/HOWTO.md#how-to-upgrade-kubernetes-cluster-from-1.13.0-to-1.13.1) +- Documentation for manual upgrade Kubernetes from 1.13.0 to 1.13.1 [link](./docs/home/HOWTO.md#how-to-upgrade-kubernetes-cluster-from-1130-to-1131) ### Changed + - Kubernetes version 1.13.1 #178 - Docker version for RedHat to 18.06 ### Fixed -- Fix issue with kubernetes-cni in 0.2.2 #177 +- Workaround issue where [Kubelet depends on kubernetes-cni 0.6.0](https://github.com/kubernetes/kubernetes/issues/75683) #177 - Fix Kafka url #183 ## [0.2.1] 2019-03-07 diff --git a/core/data/azure/infrastructure/epiphany-playground/basic-data.yaml b/core/data/azure/infrastructure/epiphany-playground/basic-data.yaml index 898b8d4f7f..552435fa0d 100644 --- a/core/data/azure/infrastructure/epiphany-playground/basic-data.yaml +++ b/core/data/azure/infrastructure/epiphany-playground/basic-data.yaml @@ -2,7 +2,7 @@ # Simplified datafile that you can use together with template (see README.md in this folder). # Change values according to your needs, start with generating ssh keys and placing them in the directory "keys_directory". Do not forget to update "keys_directory" as well. kind: simplified-datafile -version: 0.2.0 +version: 0.2.2 environment_name: Playground azure: subscription_name: YOUR-SUBSCRIPTION-NAME diff --git a/core/data/metal/epiphany-lab/data.yaml b/core/data/metal/epiphany-lab/data.yaml index 73608a0f90..05ac565859 100644 --- a/core/data/metal/epiphany-lab/data.yaml +++ b/core/data/metal/epiphany-lab/data.yaml @@ -324,7 +324,7 @@ nodes: private: 192.168.1.66 kubernetes: - version: 1.13.0 + version: 1.13.1 storage: enable: False diff --git a/docs/home/HOWTO.md b/docs/home/HOWTO.md index 5b62a70c2a..599e4c9e90 100644 --- a/docs/home/HOWTO.md +++ b/docs/home/HOWTO.md @@ -787,7 +787,7 @@ Upgrade procedure might be different for each Kubernetes version. Upgrade shall Each version can be upgraded in a bit different way, to find information how to upgrade your version of Kubernetes please use this [guide](https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-upgrade/#kubeadm-upgrade-guidance). -Epiphany use kubeadm to boostrap a cluster and same tool shall be used to upgrade it. +Epiphany uses kubeadm to boostrap a cluster and the same tool is also used to upgrade it. Upgrading Kubernetes cluster with running applications shall be done step by step. To prevent your applications downtime you should use at least **two Kubernetes worker nodes** and at least **two instances of each of your service**. @@ -870,7 +870,7 @@ sudo apt-mark hold kubectl #### Upgrade Docker version -Upgrading on Kubernetes to 1.13.1 on RHEL requires Docker upgrade. Newer Docker packages exist in docker-ce repository but you can use newer Docker-ee if you need. Verified Docker versions for Kubernetes are: 1.11.1, 1.12.1, 1.13.1, 17.03, 17.06, 17.09, 18.06. [Go to K8s docs](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#external-dependencies) +Upgrading Kubernetes to 1.13.1 on RHEL requires Docker upgrade. Newer Docker packages exist in docker-ce repository but you can use newer Docker-ee if you need. Verified Docker versions for Kubernetes are: 1.11.1, 1.12.1, 1.13.1, 17.03, 17.06, 17.09, 18.06. [Go to K8s docs](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.13.md#external-dependencies) ```bash