aboutsummaryrefslogtreecommitdiff
path: root/docker/etcd
diff options
context:
space:
mode:
authorWill Szumski <will@stackhpc.com>2022-06-23 16:43:26 +0100
committerWill Szumski <will@stackhpc.com>2022-07-20 12:20:49 +0100
commit91d22dd40fab3b410709bb7cabcf0b0f830214bc (patch)
tree87a5fb9aba534254c74309e23e193584281d2c62 /docker/etcd
parent9931f839136c28cd8cdd7a0e649b0efe1eb561ea (diff)
downloadkolla-91d22dd40fab3b410709bb7cabcf0b0f830214bc.tar.gz
kolla-91d22dd40fab3b410709bb7cabcf0b0f830214bc.zip
Install etcd binary from github
Removes a dependency on RDO for install etcd in CentOS images. Aligns version of etcd across all distributions, see below: ``` (venv-kolla) [will@juno kolla]$ docker run --rm -it kolla/ubuntu-source-etcd:yoga bash ()[etcd@730a011b670a /]$ etcd --version etcd Version: 3.2.26 Git SHA: Not provided (use ./build instead of go build) Go Version: go1.13.7 Go OS/Arch: linux/amd64 ``` ``` (venv-kolla) [will@juno kolla]$ sudo docker run -it kolla/centos-source-etcd:yoga bash ()[etcd@9aa486c9e94f /]$ etcd --version etcd Version: 3.2.21 Git SHA: 3ac81f3 Go Version: go1.12.8 Go OS/Arch: linux/amd64 ``` ``` (venv-kolla) [will@juno kolla]$ docker run --rm -it kolla/debian-source-etcd:yoga bash ()[etcd@b49cb5fcdf87 /]$ etcd --version etcd Version: 3.3.25 Git SHA: Not provided (use ./build instead of go build) Go Version: go1.15.9 Go OS/Arch: linux/amd64 ``` This will also allow us to update to a more recent version in the future. We have to be careful not to jump by more than one point release to ensure compatibility: https://etcd.io/docs/v3.5/upgrades/upgrading-etcd/#upgrading-an-etcd-v3x-cluster Change-Id: I62a34256fb7395d0448af169ac3cf036f60cd290
Diffstat (limited to 'docker/etcd')
-rw-r--r--docker/etcd/Dockerfile.j216
1 files changed, 10 insertions, 6 deletions
diff --git a/docker/etcd/Dockerfile.j2 b/docker/etcd/Dockerfile.j2
index dc39acbe2..6f55b0b15 100644
--- a/docker/etcd/Dockerfile.j2
+++ b/docker/etcd/Dockerfile.j2
@@ -9,12 +9,16 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{{ macros.configure_user(name='etcd') }}
-{% if base_package_type == 'rpm' %}
- {% set etcd_packages = ['etcd'] %}
-{% elif base_package_type == 'deb' %}
- {% set etcd_packages = ['etcd'] %}
-{% endif %}
-{{ macros.install_packages(etcd_packages | customizable("packages")) }}
+{% block etcd_repository_version %}
+# NOTE(wszumski): It is suggested to upgrade one minor version at a time:
+# https://github.com/etcd-io/website/blob/3e04053d1cb15b2ddc2904ba4121ca5aa73bea66/content/en/docs/v3.3/upgrades/upgrade_3_3.md#upgrade-requirements
+ARG etcd_version=v3.3.27
+ARG etcd_url=https://github.com/etcd-io/etcd/releases/download/${etcd_version}/etcd-${etcd_version}-linux-{{debian_arch}}.tar.gz
+{% endblock %}
+
+RUN curl ${etcd_url} -o /tmp/etcd.tar.gz \
+ && tar -C /usr/bin -xvz --strip-components=1 --wildcards '*/etcd' --wildcards '*/etcdctl' -f /tmp/etcd.tar.gz \
+ && rm -f /tmp/etcd.tar.gz
COPY etcd_sudoers /etc/sudoers.d/kolla_etcd_sudoers
COPY extend_start.sh /usr/local/bin/kolla_extend_start