This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial attempt at travis smoke tests (#40)
* Initial attempt at travis smoke tests * Uses `oc cluster up` instead of minishift to keep things simpler * Now queries only the last 3s of metrics from the smoketest container * test can be re-run * Test watches job status with a timeout to determine success or failure * I'd prefer something more robust * Still trying to find exactly how to wait for succes or EXPLICIT failure * Will need a timeout either way, so not sure how important it is TBH * Gobs of info output whether your test passes OR fails for easy comparing * Extra tweaks before PR * Fixed the deployment to pass tests and did some label cleanup (#39) * Some label cleanup * Removed redundant ServiceMonitor * Fixed 'alertmanager' route * No backends matched the label and it seemed redundant * Removed it and pointed the route to `alertmanager-operated` instead * Documented the label set that we should stick to * Eliminated several non-conformant labels * Fixed some markdown lint * Moved some waits from travis.yml to deploy.sh because humans need to wait too * Also improved them to be more robust * Fixed wait for prometheus operator to actually wait for CRDs to be usable * I've found two places where the labels intersect with the operator * Node labels * https://github.com/redhat-service-assurance/smart-gateway-operator/blob/7386c50807c09fb2229a35c9063c464213539078/roles/smartgateway/tasks/main.yml#L52 * This needs a node labelled as `application: sa-telemetry`, `node: white` * Which is what we do here: https://github.com/redhat-service-assurance/telemetry-framework/blob/3562d4492a22fdd784c7689fd06cc50835d0a779/deploy/quicktest_upstream.sh#L17 * I propose that this change to `app: smartgateway`, `sa-affinity: white` * Do we even need this? Why is the smartgateway dependent on a specifically labelled node when other components are not? * If necesarry, we can handle this in a new PR because of the dependency * ServiceMonitor labels * ServiceMonitor `smartgateway: white` label: https://github.com/redhat-service-assurance/smart-gateway-operator/blob/7386c50807c09fb2229a35c9063c464213539078/roles/smartgateway/tasks/main.yml#L84 * Prometheus `smartgateway: white` selector: https://github.com/redhat-service-assurance/telemetry-framework/blob/3562d4492a22fdd784c7689fd06cc50835d0a779/deploy/service-assurance/prometheus/prometheus.yaml#L35 * I propose these change to `app: smart-gateway` * The other labels used in the operator appear to be self-contained * Should be able to fix them there without touching this repo * Pod `app: prometheus-white` label: https://github.com/redhat-service-assurance/smart-gateway-operator/blob/7386c50807c09fb2229a35c9063c464213539078/roles/smartgateway/tasks/main.yml#L25 * Service `smartgateway: white` label: https://github.com/redhat-service-assurance/smart-gateway-operator/blob/7386c50807c09fb2229a35c9063c464213539078/roles/smartgateway/tasks/main.yml#L65 * ServiceMonitor `smartgateway: white` selector: https://github.com/redhat-service-assurance/smart-gateway-operator/blob/7386c50807c09fb2229a35c9063c464213539078/roles/smartgateway/tasks/main.yml#L88 * Note that the two above are actually not related to the ServiceMonitor label & Prometheus selector mentioned in the previous section * I propose making all of these `app: smart-gateway, sa-affinity:white` * Removed sa-affinity label
- Loading branch information
Showing
17 changed files
with
225 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
language: minimal | ||
sudo: required | ||
|
||
before_install: | ||
- tests/install-and-run-ocp.sh | ||
|
||
install: | ||
- sudo add-apt-repository ppa:ansible/ansible-2.8 -y | ||
- sudo apt-get update | ||
- sudo apt-get install -y ansible openssl wget | ||
|
||
script: | ||
- cd deploy | ||
- ./quickstart_upstream.sh | ||
- cd ../tests | ||
- ./smoketest.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,6 @@ metadata: | |
spec: | ||
to: | ||
kind: Service | ||
name: alertmanager | ||
name: alertmanager-operated | ||
weight: 100 | ||
wildcardPolicy: None |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
#set -e | ||
|
||
# OC command line tools | ||
OC_VER=v3.11.0 | ||
OC_HASH=0cbc58b | ||
OC_NAME="openshift-origin-client-tools-${OC_VER}-${OC_HASH}-linux-64bit" | ||
wget https://github.com/openshift/origin/releases/download/${OC_VER}/${OC_NAME}.tar.gz | ||
tar -xvzf ${OC_NAME}.tar.gz | ||
sudo mv ${OC_NAME}/oc /usr/local/bin/ | ||
|
||
# Start the containerized openshift | ||
sudo sed -i "s/\DOCKER_OPTS=\"/DOCKER_OPTS=\"--insecure-registry=172.30.0.0\/16 /g" /etc/default/docker | ||
sudo cat /etc/default/docker | ||
sudo service docker restart | ||
oc cluster up --public-hostname=$(hostname) #--base-dir /var/lib/minishift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.