A repository to manage the private Turing BinderHub instance, Hub23.
β»οΈ CI Status | |
---|---|
πΈ Subscription | |
π Deployment | |
π§Ή Linting and Formatting | |
π Docs |
Table of Contents:
This repository contains the local Helm Chart that configures the Hub23 BinderHub deployment: hub23-chart
.
The HelmUpgradeBot automatically opens Pull Requests to this repository that update the dependencies of the Helm Chart in the requirements.yaml
file.
Upon merging the Pull Request, the Continuous Deployment Azure Pipeline automatically applies the updated Helm Chart to the Kubernetes cluster running Hub23.
Please read the πCode of Conductπ and πΎContributing GuidelinesπΎ before you begin developing.
Three command line interfaces are used to manage Hub23:
- Azure CLI - to manage the Azure compute resources
- Kubernetes CLI (
kubectl
) - to manage the Kubernetes cluster - Helm CLI - to manage the BinderHub application running on the Kubernetes cluster
If changes are made during development, make sure that:
- the new format is reflected in
deploy/prod-template.yaml
and any new secrets/tokens/passwords are redacted; - new secrets/tokens/passwords are added to the Azure Key Vault (see the Key Vault docs); and
.az-pipelines/cd-pipeline.yml
is updated in order to populate the template with the appropriate information.
This will ensure that the Hub23 deployment is kept up-to-date with the repo, and a future developer (someone else or future-you!) can recreate the configuration files for Hub23.
If you DO have write access: βοΈ
# Clone this repository
git clone https://github.com/alan-turing-institute/hub23-deploy.git
cd hub23-deploy
# Create a new branch
git checkout -b NEW_BRANCH_NAME
And you're ready to go! π
If you DON'T have write access: π
- Click "Fork" in the top-right corner of the browser window
- Select your GitHub username as the fork destination
- Clone the forked repository
# Clone your fork
git clone https://github.com/YOUR_GITHUB_USERNAME/hub23-deploy.git
cd hub23-deploy
# Create a new branch
git checkout -b NEW_BRANCH_NAME
This section uses the Azure CLI.
-
Login to Azure
az login
-
Set the Azure subscription
az account set --subscription turingmybinder
-
Connect to the cluster
az aks get-credentials --name turing --resource-group binder-prod
To find out more info about a Kubernetes pod:
kubectl --namespace hub23 describe pod POD_NAME
If the Hub is being problematic, for example, throwing "Internal Server Error" messages or not spinning up user nodes, it can be restarted with the following commands.
Scale down the Hub:
kubectl --namespace hub23 scale deployment hub --replicas=0
Wait until the hub-
pod has been terminated.
Use kubectl --namespace hub23 get pods
to check its status.
Scale the Hub back up:
kubectl --namespace hub23 scale deployment hub --replicas=1
The billing
subdir contains resources for calculating running costs of Hub23.
The Deployment Guide docs for Hub23 are stored in the docs
folder.
A GitHub Action workflow renders the documentation using Jupyter Book and publishes it to the gh-pages
branch of the repo to be hosted at https://alan-turing-institute.github.io/hub23-deploy