Skip to content

Commit

Permalink
Merge branch 'master' into data_pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang authored Apr 16, 2024
2 parents 380430d + 0afe341 commit cb7e7d3
Show file tree
Hide file tree
Showing 41 changed files with 1,873 additions and 1,085 deletions.
50 changes: 47 additions & 3 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
name: Package
name: Package and publish the chart
on:
pull_request_target:
types: [closed]
workflow_dispatch:
inputs:
manual-package-invocation:
description: 'Package (y/n)?'
required: true
default: 'y'
version-bump:
description: 'Version bump: major, minor, patch'
required: true
branch-name:
description: 'Branch name to package'
required: true
jobs:
package:
name: Package and push
package-from-pr:
if: github.event.pull_request.merged == true
name: Package and push from PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,3 +31,34 @@ jobs:
charts-token: ${{ secrets.CHARTS_TOKEN }}
github-labels: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
git-branch: ${{ github.event.pull_request.base.ref }}
package-from-manual:
if: github.event.inputs.manual-package-invocation == 'y'
name: Package and push manual invocation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: cloudve/helm-ci@master
with:
chart-name: galaxy
charts-repo: cloudve/helm-charts
github-token: ${{ secrets.CHARTS_TOKEN }}
charts-token: ${{ secrets.CHARTS_TOKEN }}
github-labels: ${{ github.event.inputs.version-bump }}
git-branch: ${{ github.event.inputs.branch-name }}
tag-and-release:
needs: [ package-from-pr, package-from-manual ]
name: Create a tag and GitHub release for this version.
runs-on: ubuntu-latest
if: |
always()
&& contains(needs.*.result, 'success')
&& !contains(needs.*.result, 'failure')
steps:
- name: Tag and release
run: |
version=v$(cat galaxy/Chart.yaml | grep ^version: | awk '{print $2}')
git tag -a $version -m "Automatic release of $version"
git push origin $version
gh release create $version --generate-notes --latest
65 changes: 11 additions & 54 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: Linting and deployment tests (w/ & w/out CVMFS) on K3S
name: Linting and deployment test on K3S
on:
push:
branches:
- master
- anvil
pull_request: {}
workflow_dispatch: {}
jobs:
linting:
runs-on: ubuntu-latest
Expand All @@ -13,12 +14,9 @@ jobs:
run: curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl && kubectl version || true
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Helm dep update
run: cd galaxy/ && helm dep update && cd ..
- name: Helm linting
Expand All @@ -28,18 +26,17 @@ jobs:
steps:
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Helm dep update
run: cd galaxy/ && helm dep update && cd ..
- name: Start k8s locally
uses: jupyterhub/action-k3s-helm@v1
uses: jupyterhub/action-k3s-helm@v3
with:
k3s-version: v1.19.10+k3s1 # releases: https://github.com/k3s-io/k3s/tags
k3s-version: v1.25.15+k3s2 # releases: https://github.com/k3s-io/k3s/tags
metrics-enabled: false
traefik-enabled: false
- name: Verify function of k8s, kubectl, and helm
run: |
echo "kubeconfig: $KUBECONFIG"
Expand All @@ -51,51 +48,12 @@ jobs:
- name: Helm repo add galaxy
run: helm repo add galaxy https://github.com/CloudVE/helm-charts/raw/master
- name: Helm install Galaxy
run: time bash -c 'helm install --create-namespace -n galaxy galaxy ./galaxy --set persistence.accessMode="ReadWriteOnce" --set persistence.size="5Gi" --set postgresql.deploy=true --set resources.requests.memory=0Mi,resources.requests.cpu=0m --wait --timeout=600s'
run: time bash -c 'helm install --create-namespace -n galaxy galaxy ./galaxy --set persistence.accessMode="ReadWriteOnce" --set resources.requests.memory=0Mi,resources.requests.cpu=0m,cvmfs.cvmfscsi.cache.alien.enabled=false --wait --timeout=1200s'
- name: Get events
run: kubectl get events -n galaxy; kubectl get events -n csi-drivers;
if: always()
- name: Print web handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-web[^ ]*')"
if: always()
- name: Print job handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-job[^ ]*')"
if: always()
- name: Print workflow handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-workflow[^ ]*')"
if: always()
cvmfstest:
runs-on: ubuntu-latest
steps:
- name: Install Helm
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Helm dep update
run: cd galaxy/ && helm dep update && cd ..
- name: Start k8s locally
uses: jupyterhub/action-k3s-helm@v1
with:
k3s-version: v1.19.10+k3s1 # releases: https://github.com/k3s-io/k3s/tags

- name: Verify function of k8s, kubectl, and helm
run: |
echo "kubeconfig: $KUBECONFIG"
kubectl version
kubectl get pods --all-namespaces
helm version
helm list
- name: Helm repo add galaxy
run: helm repo add galaxy https://github.com/CloudVE/helm-charts/raw/master
- name: Helm install Galaxy
run: time bash -c 'helm install --create-namespace -n galaxy galaxy ./galaxy --set persistence.accessMode="ReadWriteOnce" --set persistence.size="5Gi" --set cvmfs.enabled=true --set cvmfs.deploy=true --set cvmfs.cache.preload.enabled=false --set cvmfs.cache.alienCache.enabled=false --set cvmfs.cache.localCache.enabled=true --set postgresql.deploy=true --set resources.requests.memory=0Mi,resources.requests.cpu=0m --set initJob.downloadToolConfs.enabled=false --set cvmfs.repositories.cvmfs-gxy-cloud=cloud.galaxyproject.org --set cvmfs.galaxyPersistentVolumeClaims.cloud.storage=1Gi --set cvmfs.galaxyPersistentVolumeClaims.cloud.storageClassName=cvmfs-gxy-cloud --set cvmfs.galaxyPersistentVolumeClaims.cloud.mountPath=/cvmfs/cloud.galaxyproject.org --wait --timeout=600s'
- name: Get events
run: kubectl get events -n galaxy; kubectl get events -n csi-drivers
- name: Get pods, pvc, and pv
run: kubectl get pods -n galaxy; kubectl get pvc -n galaxy; kubectl get pv -n galaxy
if: always()
- name: Print web handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-web[^ ]*')"
Expand All @@ -106,4 +64,3 @@ jobs:
- name: Print workflow handler log
run: bash -c "kubectl logs -n galaxy $(kubectl -n galaxy get pods | grep -o '[^ ]*galaxy-workflow[^ ]*')"
if: always()

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,5 @@ galaxy/charts/

# IDEs
.idea

Chart.lock
Loading

0 comments on commit cb7e7d3

Please sign in to comment.