Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

[elasticsearch] Add upgrade integration test #115

Merged
merged 2 commits into from
May 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions elasticsearch/examples/upgrade/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
default: test

include ../../../helpers/examples.mk

RELEASE := helm-es-upgrade

# Right now the version is hardcoded because helm install will ignore
# anything with an alpha tag when trying to install the latest release
# This hardcoding can be removed once we drop the alpha tag
# The "--set terminationGracePeriod=121" always makes sure that a rolling
# upgrade is forced for this test
install:
helm repo add elastic https://helm.elastic.co && \
helm upgrade --wait --timeout=600 --install $(RELEASE) elastic/elasticsearch --version 7.0.0-alpha1 --set clusterName=upgrade ; \
kubectl rollout status sts/upgrade-master --timeout=600s
helm upgrade --wait --timeout=600 --set terminationGracePeriod=121 --install $(RELEASE) ../../ --set clusterName=upgrade ; \
kubectl rollout status sts/upgrade-master --timeout=600s

init:
helm init --client-only

test: init install goss

purge:
helm del --purge $(RELEASE)
17 changes: 17 additions & 0 deletions elasticsearch/examples/upgrade/test/goss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
http:
http://localhost:9200/_cluster/health:
status: 200
timeout: 2000
body:
- 'green'
- '"number_of_nodes":3'
- '"number_of_data_nodes":3'

http://localhost:9200:
status: 200
timeout: 2000
body:
- '"number" : "7.0.0"'
- '"cluster_name" : "upgrade"'
- '"name" : "upgrade-master-0"'
- 'You Know, for Search'
6 changes: 4 additions & 2 deletions helpers/helm-tester/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM python:2.7-onbuild

RUN wget https://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz && \
tar xfv helm-v2.7.2-linux-amd64.tar.gz && \
ENV HELM_VERSION=2.13.1

RUN wget https://storage.googleapis.com/kubernetes-helm/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
tar xfv helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/local/bin/ && \
rm -rf linux-amd64
1 change: 1 addition & 0 deletions helpers/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ES_SUITE:
- default
- multi
- security
- upgrade
- 5.x
- 6.x
KIBANA_SUITE:
Expand Down
2 changes: 1 addition & 1 deletion helpers/terraform/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM centos:7

ENV VAULT_VERSION 0.9.3
ENV TERRAFORM_VERSION=0.11.7
ENV KUBECTL_VERSION=1.10.7
ENV KUBECTL_VERSION=1.14.1
ENV HELM_VERSION=2.13.1

RUN yum -y install \
Expand Down
2 changes: 1 addition & 1 deletion kibana/tests/kibana_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from helpers import helm_template
import yaml

name = 'RELEASE-NAME-kibana'
name = 'release-name-kibana'
elasticsearchHosts = 'http://elasticsearch-master:9200'


Expand Down