Skip to content

Commit

Permalink
Update Katib operator and image
Browse files Browse the repository at this point in the history
Updates Docker image to include changes from kubeflow#1450, and updates
operator to latest version of operator framework.
  • Loading branch information
knkski committed Mar 10, 2021
1 parent 081db0d commit 8063869
Show file tree
Hide file tree
Showing 28 changed files with 670 additions and 620 deletions.
56 changes: 40 additions & 16 deletions .github/workflows/test-charmed-katib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ on:
- pull_request

jobs:
lint:
name: Lint
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 operators

- name: Check flake8
run: cd operators && flake8

build:
name: Test
runs-on: ubuntu-latest
Expand All @@ -25,7 +44,7 @@ jobs:
sudo snap install juju --classic
sudo snap install juju-helpers --classic
sudo snap install juju-wait --classic
sudo apt update
sudo pip3 install charmcraft
- name: Build Docker images
run: |
Expand All @@ -47,21 +66,14 @@ jobs:
git clone git://git.launchpad.net/canonical-osm
cp -r canonical-osm/charms/interfaces/juju-relation-mysql mysql
sg microk8s -c 'juju bootstrap microk8s uk8s'
juju add-model katib
juju add-model kubeflow
juju bundle deploy -b bundle-edge.yaml --build
juju wait -wvt 300
- name: Test Katib
run: |
set -eux
kubectl run \
--rm \
-i \
--restart=Never \
--image=ubuntu \
katib-check \
-- \
bash -c "apt update && apt install -y curl && curl -f http://katib-ui.katib.svc.cluster.local:8080/katib/"
kubectl apply -f examples/v1beta1/random-example.yaml
- name: Get pod statuses
run: kubectl get all -A
Expand All @@ -71,14 +83,26 @@ jobs:
run: juju status
if: failure()

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

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

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

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

- name: Get katib-ui logs
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-ui
- name: Get katib-db-manager workload logs
run: kubectl logs --tail 100 -nkubeflow -ljuju-app=katib-db-manager
if: failure()

- name: Get katib-manager logs
run: kubectl logs --tail 100 -nkatib -ljuju-app=katib-manager
- name: Get katib-db-manager operator logs
run: kubectl logs --tail 100 -nkubeflow -ljuju-operator=katib-db-manager
if: failure()
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ __pycache__/
.coverage
.pytest_cache
*.egg-info
build/
*.charm

# Project specific ignore files
*.swp
Expand Down
2 changes: 2 additions & 0 deletions operators/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 100
2 changes: 1 addition & 1 deletion operators/bundle-edge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ applications:
charm: katib-controller
scale: 1
resources:
oci-image: docker.io/kubeflowkatib/katib-controller:latest
oci-image: rocks.canonical.com:5000/kubeflow/katib-controller:edge
katib-db:
charm: cs:~charmed-osm/mariadb-k8s
scale: 1
Expand Down
8 changes: 4 additions & 4 deletions operators/bundle.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
bundle: kubernetes
applications:
katib-controller: { charm: katib-controller, scale: 1, annotations: { gui-x: '0', gui-y: '0' } }
katib-db: { charm: cs:~charmed-osm/mariadb-k8s, scale: 1, annotations: { gui-x: '0', gui-y: '300' }, options: { database: katib } }
katib-db-manager: { charm: katib-db-manager, scale: 1, annotations: { gui-x: '300', gui-y: '0' } }
katib-ui: { charm: katib-ui, scale: 1, annotations: { gui-x: '300', gui-y: '300' } }
katib-controller: { charm: katib-controller, scale: 1 }
katib-db: { charm: cs:~charmed-osm/mariadb-k8s, scale: 1, options: { database: katib } }
katib-db-manager: { charm: katib-db-manager, scale: 1 }
katib-ui: { charm: katib-ui, scale: 1 }
relations:
- [katib-db-manager, katib-db]
6 changes: 0 additions & 6 deletions operators/katib-controller/layer.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions operators/katib-controller/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ description: |
hyperparameters of applications written in any language of the users’ choice and natively
supports many ML frameworks, such as TensorFlow, MXNet, PyTorch, XGBoost, and others.
tags: [ai, bigdata, katib, kubeflow, machine-learning, hyperparameter]
maintainers: [Kenneth Koski <kenneth.koski@canonical.com>]
maintainers:
- Dominik Fleischmann <dominik.fleischmann@canonical.com>
- Kenneth Koski <kenneth.koski@canonical.com>
series: [kubernetes]
resources:
oci-image:
type: oci-image
description: Backing OCI image
auto-fetch: true
upstream-source: docker.io/kubeflowkatib/katib-controller:v1beta1-a96ff59
upstream-source: rocks.canonical.com:5000/kubeflow/katib-controller:edge
provides:
katib-controller:
interface: http
Expand Down
Loading

0 comments on commit 8063869

Please sign in to comment.