* k8s local deployment work: - make it easier to deploy w/o ingress by setting 'local_service_port' (suggested port 30870) - if using local minio, ensure file endpoints set to /data/ and /data/ proxies correctly to local bucket - if not using minio, ensure file endpoints point to correct access / endpoint url. - setup should work with docker desktop, minikube, microk8s and k3s! - nginx chart: bump nginx memory limit to 20Mi - nginx image: 00-default-override-resolver-config -> 00-browsertrix-nginx-init for clarity - nginx image: use default nginx.conf, pin to nginx 1.23.2 - mongo: readd readiness probe, bump connect wait timeout (needed for ci) - config: set superadmin username to 'admin' - config schema: set 'name' as required - add sample chart values overrides: - chart values: local-config.yaml for running locally with 'local_service_port' - chart values: add microk8s-hosted.yaml for configuring a hosted microk8s setup - chart values: add microk8s-ci.yaml for ci tests - ci: remove docker swarm tests - ci: add microk8s integration tests: launching cluster, logging in, running a crawl of example.com, downloading/checking WACZ - bump to 1.1.0-beta.2
75 lines
2.0 KiB
YAML
75 lines
2.0 KiB
YAML
name: Cluster Run (MicroK8S local)
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
btrix-microk8s-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
uses: balchua/microk8s-actions@v0.3.0
|
|
with:
|
|
channel: '1.25/stable'
|
|
addons: '["dns", "helm3", "hostpath-storage", "registry", "metrics-server"]'
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
driver-opts: network=host
|
|
|
|
-
|
|
name: Wait for registry to be available
|
|
run: curl --retry 20 --retry-delay 10 --retry-connrefused http://localhost:32000/v2/
|
|
|
|
-
|
|
name: Build Backend
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: backend
|
|
push: true
|
|
tags: localhost:32000/webrecorder/browsertrix-backend:latest
|
|
cache-from: type=gha,scope=backend
|
|
cache-to: type=gha,scope=backend,mode=max
|
|
|
|
-
|
|
name: Build Frontend
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: frontend
|
|
push: true
|
|
tags: localhost:32000/webrecorder/browsertrix-frontend:latest
|
|
cache-from: type=gha,scope=frontend
|
|
cache-to: type=gha,scope=frontend,mode=max
|
|
|
|
-
|
|
name: Start Cluster with Helm
|
|
run: |
|
|
sudo microk8s helm3 upgrade --install -f ./chart/values.yaml -f ./chart/examples/microk8s-ci.yaml btrix ./chart/
|
|
|
|
-
|
|
name: Install Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
-
|
|
name: Install Python Libs
|
|
run: pip install pytest requests
|
|
|
|
-
|
|
name: Wait for all pods to be ready
|
|
run: sudo microk8s kubectl wait --for=condition=ready pod --all --timeout=240s
|
|
|
|
-
|
|
name: Run Tests
|
|
run: py.test -vv ./backend/test/*.py
|
|
|
|
-
|
|
name: Print Backend Logs
|
|
if: ${{ failure() }}
|
|
run: sudo microk8s kubectl logs svc/browsertrix-cloud-backend
|