Skip to content

Commit

Permalink
Merge pull request 2i2c-org#4096 from GeorgianaElena/rm-binderhub-chart
Browse files Browse the repository at this point in the history
Remove the binderhub chart and associated info
  • Loading branch information
GeorgianaElena authored May 21, 2024
2 parents 482a255 + 390191d commit 853088a
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 641 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/deploy-hubs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,6 @@ jobs:
run: |
deployer deploy ${{ matrix.jobs.cluster_name }} dask-staging
- name: Upgrade binder-staging hub on cluster ${{ matrix.jobs.cluster_name }} if it exists
if: matrix.jobs.upgrade_staging && matrix.jobs.cluster_name == '2i2c'
run: |
deployer deploy ${{ matrix.jobs.cluster_name }} binder-staging
# Retry action: https://github.com/marketplace/actions/retry-step
- name: Run health check for dask-staging hub on cluster ${{ matrix.jobs.cluster_name }} if it exists
if: matrix.jobs.upgrade_staging && matrix.jobs.cluster_name == '2i2c'
Expand Down
103 changes: 0 additions & 103 deletions config/clusters/2i2c/binder-staging.values.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions config/clusters/2i2c/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ hubs:
- daskhub-common.values.yaml
- dask-staging.values.yaml
- enc-dask-staging.secret.values.yaml
- name: binder-staging
display_name: "2i2c binder staging"
domain: binder-staging.2i2c.cloud
helm_chart: binderhub
helm_chart_values_files:
- binder-staging.values.yaml
- enc-binder-staging.secret.values.yaml
- name: imagebuilding-demo
display_name: "2i2c image building demo"
domain: imagebuilding-demo.2i2c.cloud
Expand Down
24 changes: 0 additions & 24 deletions config/clusters/2i2c/enc-binder-staging.secret.values.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions deployer/commands/cilogon.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ def persist_client_credentials_in_config_file(client, hub_type, config_filename)

if hub_type == "daskhub":
auth_config["basehub"] = jupyterhub_config
elif hub_type == "binderhub":
auth_config["binderhub"] = jupyterhub_config
else:
auth_config = jupyterhub_config

Expand All @@ -100,16 +98,11 @@ def load_client_id_from_file(config_filename):
auth_config = yaml.load(f)

daskhub = auth_config.get("basehub", None)
binderhub = auth_config.get("binderhub", None)
try:
if daskhub:
return auth_config["basehub"]["jupyterhub"]["hub"]["config"][
"CILogonOAuthenticator"
]["client_id"]
elif binderhub:
return auth_config["binderhub"]["jupyterhub"]["hub"]["config"][
"CILogonOAuthenticator"
]["client_id"]
return auth_config["jupyterhub"]["hub"]["config"]["CILogonOAuthenticator"][
"client_id"
]
Expand Down
1 change: 0 additions & 1 deletion deployer/commands/generate/billing/importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ def combine_internal_costs(self, df):
"dask-staging",
"configconnector-operator-system",
"cnrm-system",
"binder-staging",
}
df["2i2c_costs"] = 0.0
for namespace in internal.intersection(df.columns):
Expand Down
1 change: 0 additions & 1 deletion deployer/commands/generate/helm_upgrade/decision.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def discover_modified_common_files(modified_paths):
# Filepaths related to helm chart infrastructure
"helm-charts/basehub/*",
"helm-charts/daskhub/*",
"helm-charts/binderhub/*",
]
# If this filepath has changes, we should upgrade the support chart on all clusters
support_chart_filepath = "helm-charts/support/*"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ gke:
#
2i2c:
requesting_daemon_sets: calico-node,fluentbit-gke,gke-metadata-server,gke-metrics-agent,ip-masq-agent,netd,pdcsi-node,support-cryptnono,support-prometheus-node-exporter
other_daemon_sets: binder-staging-dind,binder-staging-image-cleaner,imagebuilding-demo-binderhub-service-docker-api
other_daemon_sets: imagebuilding-demo-binderhub-service-docker-api
cpu_requests: 354m
memory_requests: 656Mi
k8s_version: v1.29.1-gke.1589020
Expand Down
6 changes: 1 addition & 5 deletions deployer/commands/validate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ def _prepare_helm_charts_dependencies_and_schemas():
_generate_values_schema_json(daskhub_dir)
subprocess.check_call(["helm", "dep", "up", daskhub_dir])

binderhub_dir = HELM_CHARTS_DIR.joinpath("binderhub")
_generate_values_schema_json(binderhub_dir)
subprocess.check_call(["helm", "dep", "up", binderhub_dir])

support_dir = HELM_CHARTS_DIR.joinpath("support")
_generate_values_schema_json(support_dir)
subprocess.check_call(["helm", "dep", "up", support_dir])
Expand Down Expand Up @@ -130,7 +126,7 @@ def hub_config(
# Workaround the current requirement for dask-gateway 0.9.0 to have a
# JupyterHub api-token specified, for updates if this workaround can be
# removed, see https://github.com/dask/dask-gateway/issues/473.
if hub.spec["helm_chart"] in ("daskhub", "binderhub"):
if hub.spec["helm_chart"] == "daskhub":
cmd.append("--set=dask-gateway.gateway.auth.jupyterhub.apiToken=dummy")
try:
subprocess.check_output(cmd, text=True)
Expand Down
5 changes: 1 addition & 4 deletions deployer/utils/file_acquisition.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def persist_config_in_encrypted_file(encrypted_file, new_config):
def remove_jupyterhub_hub_config_key_from_encrypted_file(encrypted_file, key):
"""
Remove config from the dict `config["jupyterhub"]["hub"]["config"][<key>]`
in `encrypted_file` (the config is also searched for under daskhub/binderhub prefixes).
in `encrypted_file` (the config is also searched for under daskhub prefix).
If after removing this config, the file only contains a config dict with empty leaves,
delete the entire file, as it no longer holds any information.
Expand All @@ -131,11 +131,8 @@ def remove_jupyterhub_hub_config_key_from_encrypted_file(encrypted_file, key):
config = yaml.load(f)

daskhub = config.get("basehub", None)
binderhub = config.get("binderhub", None)
if daskhub:
config["basehub"]["jupyterhub"]["hub"]["config"].pop(key)
elif binderhub:
config["binderhub"]["jupyterhub"]["hub"]["config"].pop(key)
else:
config["jupyterhub"]["hub"]["config"].pop(key)

Expand Down
4 changes: 0 additions & 4 deletions docs/helper-programs/generate-hub-features-table.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,9 @@ def get_custom_pages_html(jupyterhub_config):

def retrieve_jupyterhub_config_dict(hub_config):
daskhub_type = hub_config.get("basehub", None)
binderhub_type = hub_config.get("binderhub", None)
try:
if daskhub_type:
return hub_config["basehub"]["jupyterhub"]

elif binderhub_type:
return hub_config["binderhub"]["jupyterhub"]
return hub_config["jupyterhub"]
except KeyError:
return {}
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ci-cd/hub-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This job provides the following outputs:
While the aim of this workflow is to only upgrade the pieces of the infrastructure that require it with every change, some changes do require us to redeploy everything.
- If a cluster's `cluster.yaml` file has been modified, we upgrade the support chart and **all** hubs on **that** cluster. This is because we cannot tell what has been changed without inspecting the diff of the file.
- If any of the `basehub`, `daskhub`, or `binderhub` Helm charts have additions/modifications in their paths, we redeploy **all** hubs across **all** clusters.
- If any of the `basehub` or `daskhub` Helm charts have additions/modifications in their paths, we redeploy **all** hubs across **all** clusters.
- If the support Helm chart has additions/modifications in its path, we redeploy the support chart on **all** clusters.
- If the deployer module has additions/modifications in its path, then we redeploy **all** hubs on **all** clusters.
Expand All @@ -46,7 +46,7 @@ A matrix job is set up that parallelises over all the clusters defined in the JS
For each cluster, the support chart is first upgraded (if required) followed by the staging hub (if required).

```{note}
The 2i2c cluster is a special case here as it has three staging hubs: one running the `basehub` Helm chart, another running the `daskhub` Helm chart, and another running the `binderhub` helm chart.
The 2i2c cluster is a special case here as it has three staging hubs: one running the `basehub` Helm chart and another running the `daskhub` Helm chart.
We therefore run extra steps for the 2i2c cluster to upgrade these hubs (if required).
```

Expand Down
6 changes: 3 additions & 3 deletions docs/topic/monitoring-alerting/uptime-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ As the checks are all in GCP they can be created through the [monitoring console
The `alpha` gcloud component also supports setting snoozes from the command line. For further documentation see the [Google Cloud Monitoring docs](https://cloud.google.com/monitoring/alerts/manage-snooze#gcloud-cli) or the [gcloud alpha monitoring snoozes](https://cloud.google.com/sdk/gcloud/reference/alpha/monitoring/snoozes) reference. You may need to add the `alpha` component to your `gcloud` install.


Example CLI use that snoozes binder-staging check for 7 days:
Example CLI use that snoozes staging check for 7 days:

```
HUB=binder-staging
POLICY=$(gcloud alpha monitoring policies list --filter "displayName ~ binder-staging" --format='value(name)')
HUB=staging
POLICY=$(gcloud alpha monitoring policies list --filter "displayName ~ staging" --format='value(name)')
# echo $POLICY
# projects/two-eye-two-see/alertPolicies/12673409021288629743
gcloud alpha monitoring snoozes create --display-name="Uptime Check Disabled $HUB" --criteria-policies="$POLICY" --start-time="$(date -Iseconds)" --end-time="+PT7D"
Expand Down
23 changes: 0 additions & 23 deletions helm-charts/binderhub/.helmignore

This file was deleted.

12 changes: 0 additions & 12 deletions helm-charts/binderhub/Chart.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions helm-charts/binderhub/templates/user-sa.yaml

This file was deleted.

56 changes: 0 additions & 56 deletions helm-charts/binderhub/values.schema.yaml

This file was deleted.

Loading

0 comments on commit 853088a

Please sign in to comment.