Skip to content

Commit

Permalink
Convert to Operator framework and fix CI/CD
Browse files Browse the repository at this point in the history
Converts to Operator framework, and aligns CI/CD with other split-off
bundles.
  • Loading branch information
knkski committed Apr 22, 2021
1 parent eb0313a commit a3bd422
Show file tree
Hide file tree
Showing 18 changed files with 2,994 additions and 405 deletions.
57 changes: 36 additions & 21 deletions .github/workflows/ci.yaml → .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,20 @@ on:

jobs:
lint:
name: Lint
name: Lint Check
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Install dependencies
run: |
sudo apt-get install python3-setuptools
sudo pip3 install black flake8
- name: Check black
run: black --check .
run: sudo apt install python3-pip tox

- name: Check flake8
run: flake8
- name: Lint code
run: tox -e lint

build:
deploy:
name: Test
runs-on: ubuntu-latest

Expand All @@ -40,49 +35,69 @@ jobs:
- name: Install dependencies
run: |
set -eux
sudo pip3 install charmcraft
sudo snap install charm --classic
sudo snap install juju --classic
sudo snap install juju-helpers --classic
sudo snap install juju-wait --classic
sudo apt update
sudo apt install -y firefox-geckodriver
sudo pip3 install -r test-requirements.txt
- name: Deploy Jupyter
- name: Bootstrap
run: |
set -eux
sg microk8s -c 'juju bootstrap microk8s uk8s'
juju add-model kubeflow
juju bundle deploy --build
- name: Deploy istio-pilot
run: |
set -eux
juju deploy cs:istio-pilot
juju wait -wvt 300
- name: Test kubeflow
- name: Deploy Jupyter
run: |
set -eux
sudo apt update
sudo apt install -y firefox-geckodriver
sudo pip3 install -r test-requirements.txt
juju bundle deploy --build
juju relate istio-pilot jupyter-ui
juju wait -wvt 300
pytest -vvs
- name: Test Jupyter
run: pytest -vvs
if: always()

- name: Get pod statuses
run: kubectl get all -A
if: failure()

- name: Get notebooks
run: kubectl get notebooks -A
if: failure()

- name: Get juju status
run: juju status
if: failure()

- name: Get jupyter-controller workload logs
run: kubectl logs --tail 100 -njupyter -ljuju-app=jupyter-controller
run: kubectl logs --tail 100 -nkubeflow -ljuju-app=jupyter-controller
if: failure()

- name: Get jupyter-controller operator logs
run: kubectl logs --tail 100 -njupyter -ljuju-operator=jupyter-controller
run: kubectl logs --tail 100 -nkubeflow -ljuju-operator=jupyter-controller
if: failure()

- name: Get jupyter-ui workload logs
run: kubectl logs --tail 100 -njupyter -ljuju-app=jupyter-ui
run: kubectl logs --tail 100 -nkubeflow -ljuju-app=jupyter-ui
if: failure()

- name: Get jupyter-ui operator logs
run: kubectl logs --tail 100 -njupyter -ljuju-operator=jupyter-ui
run: kubectl logs --tail 100 -nkubeflow -ljuju-operator=jupyter-ui
if: failure()

- name: Upload selenium screenshots
uses: actions/upload-artifact@v2
with:
name: selenium-screenshots
path: /tmp/selenium-*.png
if: failure()
File renamed without changes.
98 changes: 0 additions & 98 deletions charms/jupyter-controller/files/crds.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions charms/jupyter-controller/layer.yaml

This file was deleted.

5 changes: 1 addition & 4 deletions charms/jupyter-controller/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ resources:
type: oci-image
description: 'Backing OCI image'
auto-fetch: true
upstream-source: gcr.io/kubeflow-images-public/notebook-controller:vmaster-g6eb007d0
requires:
service-mesh:
interface: service-mesh
upstream-source: public.ecr.aws/j1r0q0g6/notebooks/notebook-controller:v1.3.0-rc.1
deployment:
type: stateless
service: omit
Expand Down
131 changes: 0 additions & 131 deletions charms/jupyter-controller/reactive/jupyter_controller.py

This file was deleted.

2 changes: 2 additions & 0 deletions charms/jupyter-controller/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ops==1.1.0
oci-image==1.0.0
Loading

0 comments on commit a3bd422

Please sign in to comment.