-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add basic test with k3d - remove embedded MinIO for query - better support for cache - always select node 0 in StatefulSet for query service
- Loading branch information
Showing
10 changed files
with
166 additions
and
90 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,100 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
k3d: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install k3d | ||
shell: bash | ||
run: | | ||
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash | ||
- name: Install BendSQL | ||
shell: bash | ||
run: | | ||
sudo curl -L -o /etc/apt/sources.list.d/datafuselabs.sources https://repo.databend.rs/deb/datafuselabs.sources | ||
sudo apt-get update | ||
sudo apt-get install -y bendsql | ||
- name: Create k3d cluster | ||
run: | | ||
k3d cluster create databend | ||
kubectl cluster-info | ||
- uses: azure/setup-helm@v3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Helm Deps | ||
run: | | ||
helm repo add minio https://charts.min.io/ | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm plugin install https://github.com/databus23/helm-diff | ||
- name: Install Databend Meta | ||
shell: bash | ||
working-directory: charts/databend-meta | ||
run: | | ||
helm dependency build | ||
helm lint . | ||
helm diff upgrade --install databend-meta . \ | ||
--namespace databend-meta \ | ||
--set bootstrap=true \ | ||
--set replicaCount=3 \ | ||
--set persistence.size=1Gi | ||
helm upgrade --install databend-meta . \ | ||
--namespace databend-meta --create-namespace \ | ||
--set bootstrap=true \ | ||
--set replicaCount=3 \ | ||
--set persistence.size=1Gi \ | ||
--wait | ||
kubectl get pods -n databend-meta | ||
- name: Install MinIO | ||
shell: bash | ||
run: | | ||
helm upgrade --install minio minio/minio \ | ||
--namespace minio --create-namespace \ | ||
--values tests/minio.yaml \ | ||
--wait | ||
- name: Install Databend Query | ||
shell: bash | ||
working-directory: charts/databend-query | ||
run: | | ||
helm dependency build | ||
helm lint . | ||
helm diff upgrade --install cluster1 . \ | ||
--namespace tenant1 \ | ||
--values ../../tests/query-with-minio.yaml | ||
helm upgrade --install cluster1 . \ | ||
--namespace tenant1 --create-namespace \ | ||
--values ../../tests/query-with-minio.yaml \ | ||
--wait | ||
kubectl get pods -n tenant1 | ||
- name: Checking Cluster Status | ||
shell: bash | ||
working-directory: tests | ||
run: | | ||
kubectl -n tenant1 get svc | ||
addr=$(kubectl -n tenant1 get svc cluster1-databend-query -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo 'select * from system.clusters;' | bendsql -h $addr -u databend -p databend --output table | ||
- name: Collect Logs | ||
if: always() | ||
run: | | ||
kubectl logs -n databend-meta -l app.kubernetes.io/name=databend-meta | ||
kubectl logs -n tenant1 -l app.kubernetes.io/name=databend-query |
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 |
---|---|---|
@@ -1,9 +1,6 @@ | ||
dependencies: | ||
- name: minio | ||
repository: https://charts.min.io/ | ||
version: 3.6.3 | ||
- name: common | ||
repository: https://charts.bitnami.com/bitnami | ||
version: 1.16.0 | ||
digest: sha256:b9e914c823b7721af59eb551e5c862e6c04e25b15a5231dbaed7e3aa8830b05a | ||
generated: "2022-06-14T13:03:34.366256+08:00" | ||
version: 1.17.1 | ||
digest: sha256:91bdebcf473f5da3c018dd74f25fab166d4faaa6be86d492f5caa50fc63f93fb | ||
generated: "2023-05-09T16:49:16.183394+08:00" |
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 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
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,11 @@ | ||
replicas: 3 | ||
rootUser: miniouser | ||
rootPassword: miniopassword | ||
persistence: | ||
enabled: true | ||
storageClass: "" | ||
size: 2Gi | ||
minioAPIPort: 9000 | ||
resources: | ||
requests: | ||
memory: 100Mi |
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,17 @@ | ||
replicaCount: 3 | ||
config: | ||
query: | ||
tenantId: tenant1 | ||
clusterId: cluster1 | ||
users: | ||
- name: databend | ||
authType: double_sha1_password | ||
authString: 3081f32caef285c232d066033c89a78d88a6d8a5 # databend | ||
storage: | ||
type: s3 | ||
s3: | ||
endpoint_url: "http://minio.minio.svc:9000" | ||
access_key_id: "miniouser" | ||
secret_access_key: "miniopassword" | ||
service: | ||
type: LoadBalancer |