From dbb10cd771883ca3c2a3a044f0abc4ec65a2f5d0 Mon Sep 17 00:00:00 2001 From: toszo Date: Thu, 28 Mar 2019 16:38:06 +0100 Subject: [PATCH] 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 ```