Skip to content

Commit

Permalink
large painful refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ctr26 committed Apr 4, 2023
1 parent fe13a0b commit ed5effe
Show file tree
Hide file tree
Showing 34 changed files with 249 additions and 768 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
secrets.env
*.env
.history

77 changes: 0 additions & 77 deletions .gitlab-ci.yml

This file was deleted.

106 changes: 53 additions & 53 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
#!make

BASEDIR = $(shell pwd)
SOURCE:=$(shell source secrets.env)
SOURCE:=$(shell source .env secrets.env)

# include secrets.env
# export

deploy.production:
helmsman --apply --debug --group production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/binder.yaml
deploy.$1

deploy.gpu.production:
helmsman --apply --debug --group production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml
deploy.$1:
helmsman --apply --debug --group $1 -f helmsman.yaml -f helmsman/$1.yaml -f helmsman/binder.yaml

deploy.denbi.production:
helmsman --apply --debug --group production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/denbi.yaml
deploy.gpu.prod:
helmsman --apply --debug --group prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --subst-env-values --subst-ssm-values

deploy.denbi.prod:
helmsman --apply --debug --group prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/denbi.yaml

deploy.staging:
helmsman --apply --debug --group staging -f helmsman.yaml -f helmsman/staging.yaml -f helmsman/binder.yaml

deploy.dev:
helmsman --apply --debug --group dev -f helmsman.yaml -f helmsman/dev.yaml -f helmsman/binder.yaml

ci.deploy.prod:
helmsman --apply --debug --group production -f helmsman/token.yaml -f helmsman.yaml -f helmsman/production.yaml
ci.deploy.staging:
helmsman --apply --debug --group staging -f helmsman/token.yaml -f helmsman.yaml -f helmsman/staging.yaml
helmsman --apply --debug --group prod -f helmsman/token.yaml -f helmsman.yaml -f helmsman/prod.yaml
ci.deploy.dev:
helmsman --apply --debug --group dev -f helmsman/token.yaml -f helmsman.yaml -f helmsman/dev.yaml

binder.deploy.prod:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml --always-upgrade
binder.deploy.staging:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml --always-upgrade
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml --always-upgrade
binder.deploy.dev:
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml --always-upgrade

# Beta gpu enabled service


beta.binder.deploy.prod:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade
beta.binder.deploy.staging:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml -f helmsman/gpu.yaml --always-upgrade
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade
beta.binder.deploy.dev:
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml -f helmsman/gpu.yaml --always-upgrade

# Alpha openstack service

persistent.alpha.binder.deploy.prod:
helmsman --apply --debug --target persistent-binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
persistent.alpha.binder.deploy.staging:
helmsman --apply --debug --target persistent-binderhub-production -f helmsman.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target persistent-binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade
persistent.alpha.binder.deploy.dev:
helmsman --apply --debug --target persistent-binderhub-prod -f helmsman.yaml -f helmsman/openstack.yaml --always-upgrade
#

alpha.binder.deploy.prod:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
alpha.binder.deploy.staging:
helmsman --apply --debug --target binderhub-staging -f helmsman.yaml -f helmsman/staging.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade
alpha.binder.deploy.dev:
helmsman --apply --debug --target binderhub-dev -f helmsman.yaml -f helmsman/dev.yaml -f helmsman/openstack.yaml --always-upgrade

alpha.deploy.prod:
helmsman --apply --debug --group production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --group prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade

alpha.cert.deploy.prod:
helmsman --apply --debug --target cert-manager-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target cert-manager-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade

alpha.trow.deploy.prod:
helmsman --apply --debug --target trow -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target trow -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade
alpha.registry.deploy.prod:
helmsman --apply --debug --target docker-registry -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target docker-registry -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade

alpha.ingress.deploy.prod:
helmsman --apply --debug --target ingress-nginx -f helmsman.yaml -f helmsman/production.yaml -f helmsman/openstack.yaml --always-upgrade
helmsman --apply --debug --target ingress-nginx -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/openstack.yaml --always-upgrade

# Beta gpu enabled service


gpu.beta.binder.deploy.prod:
helmsman --apply --debug --target binderhub-production-gpu -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade
gpu.beta.binder.deploy.staging:
helmsman --apply --debug --target binderhub-production-gpu -f helmsman.yaml -f helmsman/gpu.yaml --always-upgrade
helmsman --apply --debug --target binderhub-prod-gpu -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade
gpu.beta.binder.deploy.dev:
helmsman --apply --debug --target binderhub-prod-gpu -f helmsman.yaml -f helmsman/gpu.yaml --always-upgrade
gpu.beta.triton.deploy.prod:
helmsman --apply --debug --target tritoninferenceserver -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade
helmsman --apply --debug --target tritoninferenceserver -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade

# Dry runs for testing

binder.deploy.prod.dry:
helmsman --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml --always-upgrade --dry-run
helmsman --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml --always-upgrade --dry-run

beta.binder.deploy.prod.dry:
helmsman --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade --dry-run
helmsman --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade --dry-run

gpu.beta.binder.deploy.prod.dry:
helmsman --debug --target binderhub-production-gpu -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade --dry-run
helmsman --debug --target binderhub-prod-gpu -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade --dry-run

gpu.cert.deploy.prod:
helmsman --apply --debug --target cert-manager-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade
helmsman --apply --debug --target cert-manager-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade

gpu.nvdp.production:
helmsman --apply --debug --target nvidia-gpu-operator -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gpu.yaml --always-upgrade
gpu.nvdp.prod:
helmsman --apply --debug --target nvidia-gpu-operator -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gpu.yaml --always-upgrade


gke.binder.deploy.prod:
helmsman --apply --debug --target binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --target binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade

gke.binder.deploy.nginx:
helmsman --apply --debug --target ingress-nginx -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
gke.binder.deploy.staging:
helmsman --apply --debug --target binderhub-staging -f helmsman.yaml -f helmsman/staging.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --target ingress-nginx -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade
gke.binder.deploy.dev:
helmsman --apply --debug --target binderhub-dev -f helmsman.yaml -f helmsman/dev.yaml -f helmsman/gke.yaml --always-upgrade

gke.nvdp.production:
helmsman --apply --debug --target nvidia-device-plugin -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
gke.nvdp.prod:
helmsman --apply --debug --target nvidia-device-plugin -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade

gke.deploy.prod:
helmsman --apply --debug --group production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --group prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade
gke.triton.deploy.prod:
helmsman --apply --debug --target tritoninferenceserver -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --target tritoninferenceserver -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade
gke.prometheus.deploy.prod:
helmsman --apply --debug --target prometheus -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --target prometheus -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade


gke.persistent.alpha.binder.deploy.prod:
helmsman --apply --debug --target persistent-binderhub-production -f helmsman.yaml -f helmsman/production.yaml -f helmsman/gke.yaml --always-upgrade
gke.persistent.alpha.binder.deploy.staging:
helmsman --apply --debug --target persistent-binderhub-production -f helmsman.yaml -f helmsman/gke.yaml --always-upgrade
helmsman --apply --debug --target persistent-binderhub-prod -f helmsman.yaml -f helmsman/prod.yaml -f helmsman/gke.yaml --always-upgrade
gke.persistent.alpha.binder.deploy.dev:
helmsman --apply --debug --target persistent-binderhub-prod -f helmsman.yaml -f helmsman/gke.yaml --always-upgrade



Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ This will give the GitLab runner almost full administrative access to the cluste
bash gitlab-ci/install-helm.sh
helmfile -e minikube sync
For production
For prod
helmfile -e default sync -->

Expand Down
Empty file.
Empty file.
65 changes: 41 additions & 24 deletions binderhub/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ config:

banner_message: |
<div style="text-align: center;">This is a public Beta and liable to downtime</div>
# build_image: "aicrowd/repo2docker"
# build_image: "aicrowd/repo2docker:latest"
# base_url: "/staging" #Doesn't work
# networkPolicy:
# enabled: true
# # Good until this:
jupyterhub:
proxy:
Expand Down Expand Up @@ -130,12 +124,20 @@ jupyterhub:
# cmd: start-singleuser.sh
# cmd: null
cpu:
limit: 2
guarantee: 1
limit: 4
guarantee: 2
memory:
limit: 6G
guarantee: 1G
# storage:
limit: 8G
guarantee: 6G
storage:
extraVolumes:
- name: biostudies-nfs-binder
persistentVolumeClaim:
claimName: biostudies-nfs-pvc-binder
extraVolumeMounts:
- name: biostudies-nfs-binder
mountPath: /home/jovyan/biostudies
readOnly: true
# type: none
# extraVolumes:
# - name: nfs-bs-ftp
Expand All @@ -151,11 +153,35 @@ jupyterhub:
# mountPath: /home/jovyan/biostudies
# readOnly: true
profileList:
- display_name: "GPU Server"
description: "Spawns a notebook server with access to a GPU"
# - display_name: "GPU Server"
# description: "Spawns a notebook server with access to a GPU"
# kubespawner_override:
# extra_resource_limits:
# smarter-devices/fuse: "1"
- display_name: "BioStudies"
description: "Spawns a notebook server BioStudies attached"
slug: "Biostudies"
kubespawner_override:
extra_resource_limits:
smarter-devices/fuse: "1"
# image: cschranz/gpu-jupyter
# cpu_limit: 32
# cpu_guarantee: 16
# mem_limit: 32G
# mem_guarantee: 32G
# volume_mounts:
# - name: biostudies-nfs
# mountPath: /home/jovyan/biostudies
storage:
# type: none
extraVolumes:
- name: biostudies-nfs-binder
persistentVolumeClaim:
claimName: biostudies-nfs-pvc-binder
extraVolumeMounts:
- name: biostudies-nfs-binder
mountPath: /home/jovyan/biostudies
readOnly: true
# - display_name: "No GPU"
# description: "Spawns a notebook server with access to a GPU"
# proxy:
Expand Down Expand Up @@ -193,16 +219,7 @@ extraVolumes:
extraVolumeMounts:
- name: custom-templates
mountPath: /etc/binderhub/custom

dind:
enabled: true
resources:
requests:
cpu: "2"
memory: 4Gi
limits:
cpu: "4"
memory: 6Gi
imageBuilderType: dind

ingress:
enabled: true
Expand All @@ -213,7 +230,7 @@ ingress:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
cert-manager.k8s.io/acme-challenge-type: http01
cert-manager.io/cluster-issuer: letsencrypt-production
cert-manager.io/cluster-issuer: letsencrypt-prod
certmanager.k8s.io/acme-http01-edit-in-place: "true"
# https:
# enabled: true
Expand Down
Loading

0 comments on commit ed5effe

Please sign in to comment.