From 8053e93eb70596679eaaa98d4e9cafeb7ad2f217 Mon Sep 17 00:00:00 2001 From: "Szekeres, Balazs (Nokia - HU/Budapest)" Date: Fri, 17 May 2019 09:03:10 +0200 Subject: [PATCH] CaaS etcd update Etcd version updated from 3.3.12 to 3.3.13. Applied some jinja magic, and now the 3 node limit is lifted. Added timezone mount. Change-Id: I453d7a105483a87170610070425a395583baa4b8 Signed-off-by: Szekeres, Balazs (Nokia - HU/Budapest) --- ansible/roles/etcd/templates/etcd.yml | 23 ++++++------ caas-etcd.spec | 2 +- docker-build/etcd/bom.json | 70 +++++++++++++++++------------------ 3 files changed, 48 insertions(+), 47 deletions(-) diff --git a/ansible/roles/etcd/templates/etcd.yml b/ansible/roles/etcd/templates/etcd.yml index 0133870..82eb27d 100644 --- a/ansible/roles/etcd/templates/etcd.yml +++ b/ansible/roles/etcd/templates/etcd.yml @@ -63,24 +63,22 @@ spec: value: "/etc/etcd/ssl/etcd{{ nodeindex }}.pem" - name: ETCD_PEER_KEY_FILE value: "/etc/etcd/ssl/etcd{{ nodeindex }}-key.pem" -{% if nodename | search("caas_master1") %} - name: ETCD_INITIAL_CLUSTER - value: "etcd1=https://{{ hostvars[groups.caas_master[0]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }}" -{% else %} +{% set etcdclusternodes = [] -%} +{%- for nodenumber in range(nodeindex|int) -%} +{%- if etcdclusternodes.append('etcd' + ((nodenumber+1)|string) + '=https://' + (hostvars[groups.caas_master[nodenumber]]['networking']['infra_internal']['ip']|string) + ':' + (caas.etcd_peer_port|string) ) -%}{%- endif -%} +{%- endfor %} + value: "{{ etcdclusternodes|join(",") }}" +{% if not nodename | search("caas_master1") %} - name: ETCD_INITIAL_CLUSTER_STATE value: "existing" -{% endif %} -{% if nodename | search("caas_master2") %} - - name: ETCD_INITIAL_CLUSTER - value: "etcd1=https://{{ hostvars[groups.caas_master[0]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }},etcd2=https://{{ hostvars[groups.caas_master[1]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }}" -{% endif %} -{% if nodename | search("caas_master3") %} - - name: ETCD_INITIAL_CLUSTER - value: "etcd1=https://{{ hostvars[groups.caas_master[0]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }},etcd2=https://{{ hostvars[groups.caas_master[1]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }},etcd3=https://{{ hostvars[groups.caas_master[2]]['networking']['infra_internal']['ip'] }}:{{ caas.etcd_peer_port }}" {% endif %} - name: ETCD_LISTENONINTERFACE value: "{{ networking.infra_internal.interface }}" volumeMounts: + - name: time-mount + mountPath: /etc/localtime + readOnly: true - name: store mountPath: /var/lib/etcd - name: etcd-config @@ -89,6 +87,9 @@ spec: mountPath: /etc/etcd/ssl readOnly: true volumes: + - name: time-mount + hostPath: + path: /etc/localtime - name: store hostPath: path: /var/lib/etcd diff --git a/caas-etcd.spec b/caas-etcd.spec index 96788e0..57ca16c 100644 --- a/caas-etcd.spec +++ b/caas-etcd.spec @@ -14,7 +14,7 @@ %define COMPONENT etcd %define RPM_NAME caas-%{COMPONENT} -%define RPM_MAJOR_VERSION 3.3.12 +%define RPM_MAJOR_VERSION 3.3.13 %define RPM_MINOR_VERSION 1 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION} %define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build diff --git a/docker-build/etcd/bom.json b/docker-build/etcd/bom.json index 129f806..e1a0f1d 100644 --- a/docker-build/etcd/bom.json +++ b/docker-build/etcd/bom.json @@ -8,169 +8,169 @@ }, { "name": "musl", - "version": "1.1.20-r3", + "version": "1.1.20", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/musl/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "busybox", - "version": "1.29.3-r10", + "version": "1.29.3", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/busybox/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "alpine-baselayout", - "version": "3.1.0-r3", + "version": "3.1.0", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-baselayout/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "alpine-keys", - "version": "2.1-r1", + "version": "2.1", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/alpine-keys/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libcrypto1.1", - "version": "1.1.1a-r1", + "version": "1.1.1b", "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libssl1.1", - "version": "1.1.1a-r1", + "version": "1.1.1b", "source-url": "https://git.alpinelinux.org/aports/tree/main/openssl/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "ca-certificates-cacert", - "version": "20190108-r0", + "version": "20190108", "source-url": "https://git.alpinelinux.org/aports/tree/main/ca-certificates/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libtls-standalone", - "version": "2.7.4-r6", + "version": "2.7.4", "source-url": "https://git.alpinelinux.org/aports/tree/main/libtls-standalone/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "ssl_client", - "version": "1.29.3-r10", - "source-url": "https://git.alpinelinux.org/aports/tree/main/busybox/APKBUILD?h=3.9-stable", + "version": "1.29.3", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/busybox/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "zlib", - "version": "1.2.11-r1", + "version": "1.2.11", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/zlib/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "apk-tools", - "version": "2.10.3-r1", + "version": "2.10.3", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/apk-tools/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "scanelf", - "version": "1.2.3-r0", + "version": "1.2.3", "source-url": "https://git.alpinelinux.org/aports/tree/main/pax-utils/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "musl-utils", - "version": "1.1.20-r3", - "source-url": "https://git.alpinelinux.org/aports/tree/main/musl/APKBUILD?h=3.9-stable", + "version": "1.1.20", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/musl/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libc-utils", - "version": "0.7.1-r0", + "version": "0.7.1", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libc-dev/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libbz2", - "version": "1.0.6-r6", + "version": "1.0.6", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/bzip2/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "expat", - "version": "2.2.6-r0", + "version": "2.2.6", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/expat/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "libffi", - "version": "3.2.1-r6", + "version": "3.2.1", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/libffi/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "gdbm", - "version": "1.13-r1", + "version": "1.13", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/gdbm/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "ncurses-terminfo-base", - "version": "6.1_p20190105-r0", + "version": "6.1_p20190105", "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "ncurses-terminfo", - "version": "6.1_p20190105-r0", + "version": "6.1_p20190105", "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "ncurses-libs", - "version": "6.1_p20190105-r0", + "version": "6.1_p20190105", "source-url": "https://git.alpinelinux.org/aports/tree/main/ncurses/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "readline", - "version": "7.0.003-r1", + "version": "7.0.003", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/readline/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "sqlite-libs", - "version": "3.26.0-r3", + "version": "3.26.0", "source-url": "https://git.alpinelinux.org/aports/tree/main/sqlite/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "python2", - "version": "2.7.15-r3", + "version": "2.7.16", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/python2/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "py-setuptools", - "version": "40.6.3-r0", + "version": "40.6.3", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py-setuptools/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "py2-pip", - "version": "18.1-r0", + "version": "18.1", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py2-pip/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "py2-dnspython", - "version": "1.15.0-r1", + "version": "1.15.0", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/community/py-dnspython/APKBUILD?h=3.9-stable", "foss": "yes" }, { "name": "py2-ipaddress", - "version": "1.0.22-r0", + "version": "1.0.22", "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py-ipaddress/APKBUILD?h=3.9-stable", "foss": "yes" }, @@ -188,8 +188,8 @@ }, { "name": "pip", - "version": "19.0.2", - "source-url": "https://github.com/pypa/pip/archive/19.0.2.tar.gz", + "version": "19.1.1", + "source-url": "https://github.com/pypa/pip/archive/19.1.1.tar.gz", "foss": "yes" }, { @@ -201,7 +201,7 @@ { "name": "setuptools", "version": "40.6.3.post20190116", - "source-url": "https://git.alpinelinux.org/aports/tree/main/py-setuptools/APKBUILD?h=3.9-stable", + "source-url": "https://git.alpinelinux.org/cgit/aports/tree/main/py-setuptools/APKBUILD?h=3.9-stable", "foss": "yes" }, { @@ -212,8 +212,8 @@ }, { "name": "etcd", - "version": "3.3.12", - "source-url": "https://github.com/coreos/etcd/archive/v3.3.12.tar.gz", + "version": "3.3.13", + "source-url": "https://github.com/coreos/etcd/archive/v3.3.13.tar.gz", "foss": "yes" } ] -- 2.16.6