Skip to content

Commit

Permalink
Merge pull request #5914 from influxdata/tests/ent_meta_node
Browse files Browse the repository at this point in the history
fix(ci): expose InfluxDB enterprise meta service in tests
  • Loading branch information
sranka committed May 6, 2022
2 parents 492c4ac + e76bb97 commit 376e488
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/chronograf-cypress-tests.yaml
Expand Up @@ -53,8 +53,12 @@ jobs:
--set installCRDs=true
kubectl apply -f .github/workflows/resources/test-resources.yaml
kubectl create secret generic influxdb-license --from-literal=INFLUXDB_ENTERPRISE_LICENSE_KEY=${INFLUXDB_ENTERPRISE_LICENSE_KEY}
helm upgrade --install influxdb influxdata/influxdb-enterprise --namespace default --set-string envFromSecret=influxdb-license --set-string data.service.type=NodePort
kubectl patch svc influxdb-influxdb-enterprise-data --type=json -p '[{"op":"replace","path":"/spec/ports/0/nodePort","value":30086}]'
helm upgrade --install influxdb influxdata/influxdb-enterprise --namespace default \
--set-string envFromSecret=influxdb-license \
--set-string data.service.type=NodePort \
--set-string meta.service.type=NodePort \
--set data.service.nodePort=30086 \
--set meta.service.nodePort=30091
env:
INFLUXDB_ENTERPRISE_LICENSE_KEY: "${{ secrets.INFLUXDB_ENTERPRISE_LICENSE_KEY }}"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/resources/kind-config.yaml
Expand Up @@ -3,9 +3,11 @@ kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.21.1@sha256:69860bda5563ac81e3c0057d654b5253219618a22ec3a346306239bba8cfa1a6
extraPortMappings:
- containerPort: 30086
hostPort: 8086
listenAddress: "0.0.0.0"
- containerPort: 30091
hostPort: 8091
listenAddress: "0.0.0.0"
---
8 changes: 6 additions & 2 deletions ui/cypress/local-chronograf-influxdb-enterprise.sh
Expand Up @@ -58,8 +58,12 @@ deploy_influxdb_ent() {
--set installCRDs=true
kubectl apply -f "${RWD}/.github/workflows/resources/test-resources.yaml"
kubectl create secret generic influxdb-license --from-literal=INFLUXDB_ENTERPRISE_LICENSE_KEY="${LICENSE_KEY}"
helm upgrade --wait --install influxdb influxdata/influxdb-enterprise --namespace default --set-string envFromSecret=influxdb-license --set-string data.service.type=NodePort
kubectl patch svc influxdb-influxdb-enterprise-data --type=json -p '[{"op":"replace","path":"/spec/ports/0/nodePort","value":30086}]'
helm upgrade --wait --install influxdb influxdata/influxdb-enterprise --namespace default \
--set-string envFromSecret=influxdb-license \
--set-string data.service.type=NodePort \
--set-string meta.service.type=NodePort \
--set data.service.nodePort=30086 \
--set meta.service.nodePort=30091
sleep 5
echo -e "InfluxDB data node status: $(curl -Isk "https://localhost:8086/ping" | head -n 1)"
}
Expand Down

0 comments on commit 376e488

Please sign in to comment.