Skip to content

Commit

Permalink
Merge branch 'main' into 2657-backup-and-restore-service-deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciusdc authored Nov 5, 2024
2 parents aef37c3 + 364c9e3 commit ae88015
Show file tree
Hide file tree
Showing 35 changed files with 1,029 additions and 830 deletions.
19 changes: 19 additions & 0 deletions .github/actions/health-check/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: health-check
description: "Check health of Nebari deployment"

inputs:
domain:
description: Domain name
required: true

runs:
using: composite

steps:
- name: List kubernetes components
shell: bash
run: kubectl get --all-namespaces all,cm,secret,pv,pvc,ing

- name: Check if JupyterHub login page is accessible
shell: bash
run: curl --insecure --include 'https://${{ inputs.domain }}/hub/home'
81 changes: 81 additions & 0 deletions .github/actions/init-local/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: init-local
description: "Initialize Nebari config for local deployment"

inputs:
directory:
description: "Path to directory to initialize in"
required: false
default: './local-deployment'

outputs:
directory:
description: "Path to config directory"
value: ${{ steps.metadata.outputs.directory }}
config:
description: "Path to Nebari config"
value: ${{ steps.metadata.outputs.config }}
project:
description: "Project name"
value: ${{ steps.metadata.outputs.project }}
domain:
description: "Domain name"
value: ${{ steps.metadata.outputs.domain }}

runs:
using: composite

steps:
- shell: bash
id: metadata
run: |
# Setup metadata
DIRECTORY=$(realpath '${{ inputs.directory }}')
mkdir --parents "${DIRECTORY}"
echo "directory=${DIRECTORY}" | tee --append "${GITHUB_OUTPUT}"
CONFIG="${DIRECTORY}/nebari-config.yaml"
echo "config=${CONFIG}" | tee --append "${GITHUB_OUTPUT}"
PROJECT='github-actions'
echo "project=${PROJECT}" | tee --append "${GITHUB_OUTPUT}"
DOMAIN='github-actions.nebari.dev'
nslookup "${DOMAIN}"
echo "domain=${DOMAIN}" | tee --append "${GITHUB_OUTPUT}"
- shell: bash -l {0}
id: init
working-directory: ${{ steps.metadata.outputs.directory }}
run: |
nebari init local \
--project-name '${{ steps.metadata.outputs.project }}' \
--domain-name '${{ steps.metadata.outputs.domain }}' \
--auth-provider password \
--output '${{ steps.metadata.outputs.config }}'
- shell: bash
run: |
# Update nebari config for CI
# Change default JupyterLab theme
cat >> '${{ steps.metadata.outputs.config }}' <<- EOM
jupyterlab:
default_settings:
"@jupyterlab/apputils-extension:themes":
theme: JupyterLab Dark
EOM
# Change default value for minio persistence size
cat >> '${{ steps.metadata.outputs.config }}' <<- EOM
monitoring:
enabled: true
overrides:
minio:
persistence:
size: 1Gi
EOM
- shell: bash
run: |
# Display Nebari config
cat '${{ steps.metadata.outputs.config }}'
30 changes: 30 additions & 0 deletions .github/actions/setup-local/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: setup-local
description: "Setup runner for local deployment"

inputs:
kubectl-version:
description: "Version of kubectl to install"
required: false
default: "1.19.16"

runs:
using: composite

steps:
- uses: azure/setup-kubectl@v4
with:
version: v${{ inputs.kubectl-version }}

- shell: bash
run: |
# Enable docker permissions for user
sudo docker ps
sudo usermod -aG docker $USER && newgrp docker
docker info
docker ps
- shell: bash
run: |
# Get routing table for docker pods
ip route
12 changes: 11 additions & 1 deletion .github/workflows/run-precommit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
- develop
- release/\d{4}.\d{1,2}.\d{1,2}
pull_request:

Expand All @@ -19,6 +18,17 @@ jobs:
- name: Checkout repository 🔔
uses: actions/checkout@v4.1.1

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Setup terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.5.7"


- name: Run terraform pre-commit ⚡️
uses: pre-commit/action@v3.0.1
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
push:
branches:
- main
- develop
- release/\d{4}.\d{1,2}.\d{1,2}
paths:
- ".github/workflows/test-provider.yaml"
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
push:
branches:
- main
- develop
- release/\d{4}.\d{1,2}.\d{1,2}
paths:
- ".github/workflows/test.yaml"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_aws_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branch:
description: 'Nebari branch to deploy, test, destroy'
required: true
default: develop
default: main
type: string
image-tag:
description: 'Nebari image tag created by the nebari-docker-images repo'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_azure_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branch:
description: 'Nebari branch to deploy, test, destroy'
required: true
default: develop
default: main
type: string
image-tag:
description: 'Nebari image tag created by the nebari-docker-images repo'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test_conda_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
push:
branches:
- main
- develop
- release/\d{4}.\d{1,2}.\d{1,2}
paths:
- ".github/workflows/test_conda_build.yaml"
Expand Down
84 changes: 0 additions & 84 deletions .github/workflows/test_do_integration.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test_gcp_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branch:
description: 'Nebari branch to deploy, test, destroy'
required: true
default: develop
default: main
type: string
image-tag:
description: 'Nebari image tag created by the nebari-docker-images repo'
Expand Down
Loading

0 comments on commit ae88015

Please sign in to comment.