Skip to content

Upgrade Jupyter apis to v1.6.0 #132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 64 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a76d5f1
initial commit, take all upstream file
Aug 30, 2022
69287da
revert namespace service
Sep 1, 2022
8a875f6
install packages with npm install for all dirs
Sep 2, 2022
6254a79
Update publish.yaml
rohank07 Sep 7, 2022
387171a
Add translations
Sep 7, 2022
365f532
Merge branch 'feat-upgrade-1.4' of https://github.com/StatCan/jupyter…
Sep 7, 2022
4313244
updated kubeflow-common-lib to 1.6.0
Sep 13, 2022
471ee37
updated i18n to v1.6.0
Sep 13, 2022
536f6eb
replaced e2e folder with cypress to follow v1.6.0
Sep 13, 2022
30c7d71
updated jupyter folder to v1.6.0
Sep 13, 2022
a52e782
added back start script for local testing
Sep 13, 2022
ced2a50
updated jupyter/src to v1.6.0
Sep 13, 2022
fae5ba9
removed added package-lock
Sep 13, 2022
fedf5f1
removed unuse stuff
Sep 15, 2022
1290ff2
added back our own icons/logos
Sep 16, 2022
3a8e032
added back hint text
Sep 26, 2022
8c9d0df
added back the icons in the form sections
Sep 26, 2022
52034bc
Merge pull request #148 from StatCan/fix-136-add-hint-text
mathis-marcotte Sep 27, 2022
f5d2d52
Fix 139 add volume table (#145)
mathis-marcotte Sep 28, 2022
ec4741c
Fix 140 add kubecost table (#149)
mathis-marcotte Sep 29, 2022
bf8cb52
1.6 update - add sass (#147)
mathis-marcotte Sep 29, 2022
bb9529a
image pull policy fix (#151)
mathis-marcotte Sep 29, 2022
e522a64
added back system language input (#150)
mathis-marcotte Sep 29, 2022
f72afcd
Validation fix (#144)
Jose-Matsuda Oct 3, 2022
2ff1ecd
modify limits, gpus and cpus (#152)
mathis-marcotte Oct 4, 2022
da7c7f5
add: empty dir
rohank07 Oct 5, 2022
d150736
added back change detector
Oct 5, 2022
bb864fc
Fix i18n angular (#161)
Oct 5, 2022
1983123
Merge branch 'main' into upgrade-frontend-1.6
Oct 5, 2022
d2ffd64
merge origin main with upgrade-frontend-1.6
Oct 5, 2022
9ca8822
Add gitignore
Oct 5, 2022
068a365
feat(Taskfile.yaml): update go:build task
Collinbrown95 Oct 5, 2022
8ee373a
rename(Taskfile): revert back to original Taskfile.yml
Collinbrown95 Oct 5, 2022
d10172c
fix(i18n): locale from en-US to en
Collinbrown95 Oct 5, 2022
5e0749b
add default en
Oct 5, 2022
1a2246c
added missing api endpoint for storage classes
Oct 5, 2022
0404b70
update publish.yml
rohank07 Oct 12, 2022
a2f50bb
debug(publish.yml): temporary push on dev branch
Collinbrown95 Oct 12, 2022
37f7fca
Merge pull request #162 from StatCan/fix-143-miscellaneous
Collinbrown95 Oct 12, 2022
9c2cffd
Merge pull request #163 from StatCan/missing-storage-classes-endpoint
Collinbrown95 Oct 12, 2022
66347d8
Merge pull request #155 from StatCan/downward-api
Collinbrown95 Oct 12, 2022
099bdc3
refactor(Dockerfile): bind API to new port
Collinbrown95 Oct 12, 2022
437dd25
Merge pull request #165 from StatCan/refactor/Dockerfile
Collinbrown95 Oct 12, 2022
1931282
refactor(Dockerfile): change copy paths
Collinbrown95 Oct 14, 2022
2388e8f
fix(environment): path to logo svgs
Collinbrown95 Oct 14, 2022
a096bf3
fix(frontend): icon paths
Collinbrown95 Oct 14, 2022
6d850d6
fix(frontend): svg paths
Collinbrown95 Oct 14, 2022
4f005f1
Update 1.6 translation files (#166)
mathis-marcotte Oct 18, 2022
37df279
1.6 fix volumes (#164)
Jose-Matsuda Oct 18, 2022
1e5580f
fix failing build? (#169)
Jose-Matsuda Oct 18, 2022
c695a0a
remove unused commit
Jose-Matsuda Oct 18, 2022
223f6ab
fix(volume name): update formCtrl.get() (#174)
bryanpaget Oct 20, 2022
cb55521
set(sizeNum): default to 16
bryanpaget Oct 21, 2022
f839911
Merge pull request #175 from StatCan/fix-sizeNum-default-value
bryanpaget Oct 24, 2022
b4898ba
added missing json names
Oct 25, 2022
61a1d90
reapplied changes
Oct 28, 2022
dc103a4
removed form elements for clarity
Oct 31, 2022
21cdd47
updated message files
Oct 31, 2022
4ae94ed
added Pro b icon (#179)
mathis-marcotte Nov 1, 2022
f4091ed
added current language context to system language input (#180)
mathis-marcotte Nov 1, 2022
977f1e4
updated message file
Nov 1, 2022
069937d
updated translations (#183)
mathis-marcotte Nov 3, 2022
d78c9ef
updated translation
Nov 3, 2022
e7b5cfd
remochore: ve action from dev branch
Jose-Matsuda Nov 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
coverage_unit.txt
jupyter-apis
crud-web-apps
.task/
.vscode
.env
.task
__debug_bin
__debug_bin
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ COPY ./frontend/jupyter/package*.json ./
COPY ./frontend/jupyter/tsconfig*.json ./
COPY ./frontend/jupyter/angular.json ./
COPY ./frontend/jupyter/src ./src
COPY ./frontend/jupyter/i18n /src/i18n

RUN npm ci

RUN cp -R /src/dist/kubeflow/ ./node_modules/kubeflow/
RUN npm run build -- --output-path=./dist/default --configuration=production
RUN npm run build -- --output-path=./dist/rok --configuration=rok-prod
# Build both locales:
RUN ./node_modules/.bin/ng build --configuration production --localize

# Stage 1: Build with the golang image
FROM golang:1.17-alpine AS backend
Expand All @@ -27,9 +32,12 @@ COPY . .
RUN CGO_ENABLED=0 go install .

# Stage 2: Generate final image
FROM scratch
COPY --from=frontend /src/dist/default /static/
FROM alpine:3.16.2
COPY --from=frontend /src/dist/frontend /src/dist/frontend
COPY --from=frontend /src/dist/default /src/dist/default
COPY --from=backend /go/bin/jupyter-apis /jupyter-apis
ENV LISTEN_ADDRESS 0.0.0.0:5000
EXPOSE 5000
ENV LISTEN_ADDRESS 0.0.0.0:5001
EXPOSE 5001
ENTRYPOINT [ "/jupyter-apis" ]

# TODO Will need to mount the static logo files too
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ tasks:
desc: Build the container image
cmds:
- docker build -t {{.CONTAINER_IMAGE}} -f Dockerfile .
- "k3d image import {{.CONTAINER_IMAGE}} -c nginx-test"

docker:enter:
desc: Enter into the built container
Expand Down
82 changes: 82 additions & 0 deletions TaskfileLocalDebug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
version: "3"
dotenv: [".env"]
output: prefixed
silent: true

vars:
CLUSTER_NAME: nginx-test
CONTEXT_NAME: "k3d-{{.CLUSTER_NAME}}"
AGENT_NODE_NAME: k3d-{{.CLUSTER_NAME}}-agent
SERVER_NODE_NAME: k3d-{{.CLUSTER_NAME}}-server
ISTIO_VERSION: "1.7.8" # Match istio control plane version
ISTIOCTL: "istioctl --context={{.CONTEXT_NAME}}"
KUBECTL: "kubectl --context={{.CONTEXT_NAME}}"
REGISTRY_NAME: "{{.CLUSTER_NAME}}-registry"
REGISTRY_PORT: "5050"
DEV_CONTAINER_TAG: "{{.CLUSTER_NAME}}-dev"

tasks:
# _ _____ _
# | | _|___ / __| |
# | |/ / |_ \ / _` |
# | < ___) | (_| |
# |_|\_\____/ \__,_|

k3d:cluster:create:
prefix: ⚙️ > create k3d cluster
desc: create k3d cluster
cmds:
- k3d cluster create --config=k8s/k3d/config.yaml

k3d:cluster:destroy:
prefix: ⚙️ > destroy
desc: destroy k3d cluster
cmds:
- "k3d cluster delete {{.CLUSTER_NAME}}"

k3d:start:
prefix: ⚙️ > start
desc: starts k3d cluster
cmds:
- "k3d cluster start {{.CLUSTER_NAME}}"

k3d:stop:
prefix: ⚙️ > stop
desc: stops k3d cluster
cmds:
- "k3d cluster stop {{.CLUSTER_NAME}}"

# K8s manifest
k8s:manifest:apply:
prefix: ⚙️ > k8sapply
desc: Apply manifest to k3d cluster
cmds:
- "kustomize build k8s/manifests/ | kubectl apply -f -"
sources:
- k8s/manifests/*.yaml

# _ _
# __| | ___ ___| | _____ _ __
# / _` |/ _ \ / __| |/ / _ \ '__|
# | (_| | (_) | (__| < __/ |
# \__,_|\___/ \___|_|\_\___|_|
# k3d image import nginx-test-dev:latest -c nginx-test
build:dev-image:
prefix: build dev image
desc: build development image
cmds:
- "docker build . -t {{.DEV_CONTAINER_TAG}}"
- "k3d image import {{.DEV_CONTAINER_TAG}}:latest -c {{.CLUSTER_NAME}}"
sources:
- Dockerfile
# ____ ___ ______ ____
# / ___|_ _| / / ___| _ \
# | | | | / / | | | | |
# | |___ | | / /| |___| |_| |
# \____|___/_/ \____|____/
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/go-task/Taskfile.yml
go:build:
desc: Build the Go code
cmds:
- go build -v {{.LDFLAGS}}

36 changes: 26 additions & 10 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,34 @@ type DataVolumes struct {
}

type ValueElement struct {
Value ValueValue `yaml:"value" json:"value"`
Value VolumeValues `yaml:"value" json:"value"`
}

type ValueValue struct {
Type ImagePullPolicy `yaml:"type" json:"type"`
Name ImagePullPolicy `yaml:"name" json:"name"`
Size ImagePullPolicy `yaml:"size" json:"size"`
MountPath ImagePullPolicy `yaml:"mountPath" json:"mountPath"`
AccessModes ImagePullPolicy `yaml:"accessModes" json:"accessModes"`
Class ImagePullPolicy `yaml:"class" json:"class"`
// Structs for the yaml versions of definitions, minimalistic as it is just a default
//can't re-use structs from go since this is yaml and not json
type VolumeValues struct {
Mount string `yaml:"mount" json:"mount"`
NewPvc NewPvcYaml `yaml:"newPvc" json:"newPvc"`
}

type NewPvcMetadataYaml struct {
Name string `yaml:"name" json:"name"`
}
type NewPvcRequestsYaml struct {
Storage string `yaml:"storage" json:"storage"`
}
type NewPvcResourcesYaml struct {
Requests NewPvcRequestsYaml `yaml:"requests" json:"requests"`
}
type NewPvcSpecYaml struct {
Resources NewPvcResourcesYaml `yaml:"resources" json:"resources"`
AccessModes []corev1.PersistentVolumeAccessMode `yaml:"accessModes" json:"accessModes"`
}
type NewPvcYaml struct {
Metadata NewPvcMetadataYaml `yaml:"metadata" json:"metadata"`
Spec NewPvcSpecYaml `yaml:"spec" json:"spec"`
} // last struct for yaml versions

type ImagePullPolicy struct {
Value string `yaml:"value" json:"value"`
}
Expand Down Expand Up @@ -129,8 +145,8 @@ type TolerationGroupOption struct {
}

type WorkspaceVolume struct {
Value ValueValue `yaml:"value" json:"value"`
ReadOnly bool `yaml:"readOnly" json:"readOnly"`
Value VolumeValues `yaml:"value" json:"value"`
ReadOnly bool `yaml:"readOnly" json:"readOnly"`
}

type Configuration struct {
Expand Down
11 changes: 8 additions & 3 deletions frontend/common/kubeflow-common-lib/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/kubeflow/tsconfig.lib.json",
"project": "projects/kubeflow/ng-package.json"
}
},
, "configurations": {
"production": {
"tsConfig": "projects/kubeflow/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
Expand All @@ -39,4 +44,4 @@
}
}},
"defaultProject": "kubeflow"
}
}
Loading