Skip to content

update docs

update docs #20

Workflow file for this run

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Deployment Test
on:
push:
tags:
- v*
branches:
- main
paths:
- charts/devlake/**
- .github/workflows/deploy-test.yml
pull_request:
paths:
- charts/devlake/**
- .github/workflows/deploy-test.yml
- "!**.md"
jobs:
deploy-with-helm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
database_type: ["mysql-builtin", "mysql-external"]
steps:
- name: Creating kind cluster
uses: container-tools/kind-action@v1
- name: Cluster information
run: |
kubectl cluster-info
kubectl get nodes
kubectl get pods -n kube-system
helm version
kubectl version
kubectl get storageclasses
- name: Checkout
uses: actions/checkout@v2
- name: Helm install devlake
if: matrix.database_type == 'mysql-external'
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add grafana https://grafana.github.io/helm-charts
helm install mysql bitnami/mysql --set auth.rootPassword=admin --set auth.database=lake --set auth.username=merico --set auth.password=merico
# external mysql at service: mysql
helm dep build charts/devlake
helm install --wait --timeout 300s deploy-test charts/devlake \
--set service.uiPort=30000 \
--set mysql.useExternal=true \
--set mysql.externalServer=mysql \
--set option.localtime=""
kubectl get pods -o wide
kubectl get services -o wide
- name: Helm install devlake
if: matrix.database_type == 'mysql-builtin'
run: |
helm repo add grafana https://grafana.github.io/helm-charts
helm dep build charts/devlake
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
echo Node IP: ${NODE_IP}
helm install --wait --timeout 300s deploy-test charts/devlake \
--set service.uiPort=30000 \
--set mysql.image.tag=8-debian \
--set option.localtime=""
kubectl get pods -o wide
kubectl get services -o wide
# TODO: using some e2e test code to replace it
- name: Curl with endpoints
run: |
export NODE_IP=$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}")
failed=0
for retry in {1..10} ; do
failed=0
# home
curl --fail http://${NODE_IP}:30000 || failed=1
# API for devlake
curl --fail http://${NODE_IP}:30000/api/blueprints || failed=1
# API for grafana
curl --fail http://${NODE_IP}:30000/grafana/api/health || failed=1
if [ $failed -eq 0 ] ; then
break
else
sleep 3
fi
done
if [ $failed -ne 0 ] ; then
echo 'Test apis failed, please check logs from the PODS'
exit 1
fi
- name: Show logs for pods
if: ${{ always() }}
run: |
for pod in $(kubectl get pods -o jsonpath='{.items[*].metadata.name}') ; do
echo describe for $pod
kubectl describe pod $pod
echo logs for $pod
kubectl logs $pod || echo ""
done