Skip to content
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

QCL add cluster yaml, config, staging hub #2295

Merged
merged 19 commits into from
Mar 6, 2023
Merged

QCL add cluster yaml, config, staging hub #2295

merged 19 commits into from
Mar 6, 2023

Conversation

pnasrat
Copy link
Contributor

@pnasrat pnasrat commented Mar 2, 2023

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some notes about domain names

.github/workflows/deploy-hubs.yaml Outdated Show resolved Hide resolved
config/clusters/qcl/cluster.yaml Outdated Show resolved Hide resolved
config/clusters/qcl/support.values.yaml Outdated Show resolved Hide resolved
@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 2, 2023

Getting API rate limited but local validate fails. Will fix up after lunch

deployer validate qcl
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://jupyterhub.github.io/helm-chart/" chart repository
Saving 1 charts
Downloading jupyterhub from repo https://jupyterhub.github.io/helm-chart/
Deleting outdated charts
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://helm.dask.org/" chart repository
Saving 2 charts
Downloading dask-gateway from repo https://helm.dask.org/
Deleting outdated charts
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://helm.dask.org/" chart repository
...Successfully got an update from the "https://jupyterhub.github.io/helm-chart/" chart repository
Saving 2 charts
Downloading binderhub from repo https://jupyterhub.github.io/helm-chart/
Downloading dask-gateway from repo https://helm.dask.org/
Deleting outdated charts
Getting updates for unmanaged Helm repositories...
...Successfully got an update from the "https://yuvipanda.github.io/cryptnono/" chart repository
...Successfully got an update from the "https://kubernetes.github.io/autoscaler" chart repository
...Successfully got an update from the "https://kubernetes.github.io/ingress-nginx" chart repository
...Successfully got an update from the "https://grafana.github.io/helm-charts" chart repository
...Successfully got an update from the "https://prometheus-community.github.io/helm-charts" chart repository
Saving 5 charts
Downloading prometheus from repo https://prometheus-community.github.io/helm-charts
Downloading grafana from repo https://grafana.github.io/helm-charts
Downloading ingress-nginx from repo https://kubernetes.github.io/ingress-nginx
Downloading cluster-autoscaler from repo https://kubernetes.github.io/autoscaler
Downloading cryptnono from repo https://yuvipanda.github.io/cryptnono/
Deleting outdated charts
Validating non-encrypted support values files for qcl...
1 / 1: Validating non-encrypted hub values files for staging...
Error: failed to parse /home/pnasrat/workspace/src/github.com/2i2c-org/infrastructure/config/clusters/qcl/staging.values.yaml: error converting YAML to JSON: yaml: line 4: mapping values are not allowed in this context

@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 2, 2023

Note to self validate runs

helm template /home/pnasrat/workspace/src/github.com/2i2c-org/infrastructure/helm-charts/basehub --values=/home/pnasrat/workspace/src/github.com/2i2c-org/infrastructure/config/clusters/qcl/common.values.yaml --values=/home/pnasrat/workspace/src/github.com/2i2c-org/infrastructure/config/clusters/qcl/staging.values.yaml

@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 2, 2023

Sigh obvious typo now validate fails with

Error: values don't meet the specifications of the schema(s) in the following chart(s):
basehub:
- (root): Additional property basehub is not allowed

@consideRatio
Copy link
Member

When using basehub, your values should not be indented under basehub.

The daskhub chart dependa on basehub, so basehub chart config is nested under such key for a daskhub chart

@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 3, 2023

Tested TLS working correctly via

curl -I https://grafana.qcl.2i2c.cloud
HTTP/2 302 
date: Fri, 03 Mar 2023 14:35:30 GMT
content-type: text/html; charset=utf-8
cache-control: no-cache
expires: -1
location: /login
pragma: no-cache
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
strict-transport-security: max-age=15724800; includeSubDomains

curl -I https://grafana.quantifiedcarbon.com
HTTP/2 302 
date: Fri, 03 Mar 2023 14:35:45 GMT
content-type: text/html; charset=utf-8
cache-control: no-cache
expires: -1
location: /login
pragma: no-cache
x-content-type-options: nosniff
x-frame-options: deny
x-xss-protection: 1; mode=block
strict-transport-security: max-age=15724800; includeSubDomains

pnasrat and others added 13 commits March 3, 2023 09:42
Typo

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
Domain name fix

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
Domain name fixes

Co-authored-by: Erik Sundell <erik.i.sundell@gmail.com>
Based off practices in utoronto hub and that the hubs reference table only uses the 2i2c.cloud urls so should support both

Note as we use grafana hub ingress rule that is handled differently to the support helm-chart redirect template for hub urls
@pnasrat pnasrat marked this pull request as ready for review March 3, 2023 14:54
@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 3, 2023

Actually need to add enc-staging values file before review

@pnasrat pnasrat marked this pull request as draft March 3, 2023 15:45
@pnasrat pnasrat marked this pull request as ready for review March 3, 2023 15:58
@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 3, 2023

Deployed staging hub here https://staging.quantifiedcarbon.com/hub/login?next=%2Fhub%2F I may need to get the auth wired in

@pnasrat
Copy link
Contributor Author

pnasrat commented Mar 3, 2023

Ready for review PTAL. Staging hub is up from a manual deploy. Then will do further configuration under main tracking issue.

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work this looks great!!

Things I figure remains in our out of this PR are:

  • Redirects for prod / grafana
  • Prod hub
  • admin_users to include listed accounts from QCL
  • singleuser.profileList configuration

Comment on lines +20 to +35
grafana:
grafana.ini:
server:
root_url: https://grafana.quantifiedcarbon.com/
auth.github:
enabled: true
allowed_organizations: 2i2c-org
ingress:
hosts:
- grafana.qcl.2i2c.cloud
- grafana.quantifiedcarbon.com
tls:
- secretName: grafana-tls
hosts:
- grafana.qcl.2i2c.cloud
- grafana.quantifiedcarbon.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered this config quite a bit, thinking that perhaps it was important to list grafana.quantifiedcarbon.com as the topmost host. I think it may not be important based on investigation in #2304 though.

What do you think about going for grafana.quantifiedcarbon.com as the first entry systematically in lists to reduce a risk of issues for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll read through your investigation on #2304 and this can be updated if need be before we enable the prod hub and handover to the community

Comment on lines +4 to +7
redirects:
rules:
- from: staging.qcl.2i2c.cloud
to: staging.quantifiedcarbon.com
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work figuring this out! I wasn't aware of this system to create Ingress resources was available in the basehub helm chart, and suspect it may not have been documented either yet.

We should have redirect rules for grafana and the production hub here as well. Maybe the production hub is out of scope for this PR and thats fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some documentation here https://infrastructure.2i2c.org/en/latest/howto/manage-domains/index.html

I think when we start work on the deployer improvments making the generator take optional args for custom domains might help

Yes I think this is good to go and I'll split out the prod hub.

@pnasrat pnasrat merged commit 6546c28 into master Mar 6, 2023
@pnasrat pnasrat deleted the add-qcl-hub branch March 6, 2023 13:32
@github-actions
Copy link

github-actions bot commented Mar 6, 2023

🎉🎉🎉🎉

Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/4343972840

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants