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

Add allen-swdb hub #1585

Merged
merged 33 commits into from
Sep 30, 2022
Merged

Add allen-swdb hub #1585

merged 33 commits into from
Sep 30, 2022

Conversation

yuvipanda
Copy link
Member

  • Also add a generate-cluster command to our deployer that generates
    the jsonnet & tfvars files from a template

Ref #1440

@github-actions
Copy link

github-actions bot commented Aug 2, 2022

Support and Staging deployments

Cloud Provider Cluster Name Upgrade Support? Reason for Support Redeploy Upgrade Staging? Reason for Staging Redeploy
aws allen-swdb Yes Following helm chart values files were modified: support.values.yaml, enc-support.secret.values.yaml Yes Core infrastructure has been modified
gcp m2lines No Yes Core infrastructure has been modified
gcp pangeo-hubs No Yes Core infrastructure has been modified
aws carbonplan No Yes Core infrastructure has been modified
gcp linked-earth No Yes Core infrastructure has been modified
gcp cloudbank No Yes Core infrastructure has been modified
gcp callysto No Yes Core infrastructure has been modified
gcp 2i2c No Yes Core infrastructure has been modified
gcp leap No Yes Core infrastructure has been modified
aws openscapes No Yes Core infrastructure has been modified
aws uwhackweeks No Yes Core infrastructure has been modified
gcp 2i2c-uk No Yes Core infrastructure has been modified
gcp awi-ciroh No Yes Core infrastructure has been modified
kubeconfig utoronto No Yes Core infrastructure has been modified
gcp meom-ige No Yes Core infrastructure has been modified

Production deployments

Cloud Provider Cluster Name Hub Name Reason for Redeploy
gcp m2lines prod Core infrastructure has been modified
gcp pangeo-hubs prod Core infrastructure has been modified
gcp pangeo-hubs coessing Core infrastructure has been modified
aws carbonplan prod Core infrastructure has been modified
gcp linked-earth prod Core infrastructure has been modified
gcp cloudbank spelman Core infrastructure has been modified
gcp cloudbank ccsf Core infrastructure has been modified
gcp cloudbank elcamino Core infrastructure has been modified
gcp cloudbank glendale Core infrastructure has been modified
gcp cloudbank howard Core infrastructure has been modified
gcp cloudbank miracosta Core infrastructure has been modified
gcp cloudbank skyline Core infrastructure has been modified
gcp cloudbank canada Core infrastructure has been modified
gcp cloudbank demo Core infrastructure has been modified
gcp cloudbank fresno Core infrastructure has been modified
gcp cloudbank lassen Core infrastructure has been modified
gcp cloudbank clovis Core infrastructure has been modified
gcp cloudbank sbcc Core infrastructure has been modified
gcp cloudbank mills Core infrastructure has been modified
gcp cloudbank palomar Core infrastructure has been modified
gcp cloudbank pasadena Core infrastructure has been modified
gcp cloudbank sjcc Core infrastructure has been modified
gcp cloudbank tuskegee Core infrastructure has been modified
gcp cloudbank avc Core infrastructure has been modified
gcp cloudbank csu Core infrastructure has been modified
gcp callysto prod Core infrastructure has been modified
gcp 2i2c demo Core infrastructure has been modified
gcp 2i2c ohw Core infrastructure has been modified
gcp 2i2c pfw Core infrastructure has been modified
gcp 2i2c peddie Core infrastructure has been modified
gcp 2i2c catalyst-cooperative Core infrastructure has been modified
gcp 2i2c earthlab Core infrastructure has been modified
gcp 2i2c paleohack2021 Core infrastructure has been modified
gcp 2i2c aup Core infrastructure has been modified
gcp 2i2c utexas Core infrastructure has been modified
gcp 2i2c temple Core infrastructure has been modified
gcp leap prod Core infrastructure has been modified
aws openscapes prod Core infrastructure has been modified
aws uwhackweeks snowex Core infrastructure has been modified
gcp 2i2c-uk lis Core infrastructure has been modified
gcp awi-ciroh prod Core infrastructure has been modified
aws allen-swdb prod Core infrastructure has been modified
kubeconfig utoronto prod Core infrastructure has been modified
gcp meom-ige prod Core infrastructure has been modified

@yuvipanda yuvipanda marked this pull request as ready for review August 2, 2022 08:56
@yuvipanda yuvipanda requested a review from a team August 2, 2022 08:56
Copy link
Member

@sgibson91 sgibson91 left a comment

Choose a reason for hiding this comment

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

A couple of comments but LGTM

- enc-support.secret.values.yaml
hubs:
- name: staging
display_name: "Staging"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
display_name: "Staging"
display_name: "Allen Institute (staging)"

config/clusters/allen-swdb/cluster.yaml Outdated Show resolved Hide resolved
Comment on lines 159 to 162
```bash
terraform output -raw continuous_deployer_creds > ../../config/clusters/<your-cluster-name>/deployer-credentials.secret.json
sops --output config/clusters/<your-cluster-name>/enc-deployer-credentials.secret.json --encrypt ../../config/clusters/<your-cluster-name>/deployer-credentials.secret.json
terraform output -raw continuous_deployer_creds > ../../config/clusters/<your-cluster-name>/enc-deployer-credentials.secret.json
sops --in-place --encrypt ../../config/clusters/<your-cluster-name>/enc-deployer-credentials.secret.json
```
Copy link
Member

@sgibson91 sgibson91 Aug 2, 2022

Choose a reason for hiding this comment

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

Maybe we can keep the original command and provide your suggestion as an alternative? I like to not use --in-place and explicitly add the enc- through --output because our .gitignore file prevents files that contain secret in their name but are not prefixed with enc- from being accidentally committed to the repo. I can then clean up unencrypted files using git clean.

https://infrastructure.2i2c.org/en/latest/topic/secrets.html

Copy link
Member Author

Choose a reason for hiding this comment

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

@sgibson91 sorry Sarah, I know this isn't the first time I'd changed this to --in-place - I had forgotten the last time you had reminded me of it! I've just reverted this change to go back to using --output instead as it was before, and will keep this in mind for the future!

Copy link
Contributor

@damianavila damianavila left a comment

Choose a reason for hiding this comment

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

Lovely to see the templating idea already in motion!!!

GitHubOAuthenticator:
allowed_organizations:
- 2i2c-org:tech-team
- alleninstitute
Copy link

Choose a reason for hiding this comment

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

Please add authorization for GitHub Org SWDB2022: https://github.com/SWDB2022

Copy link
Member Author

Choose a reason for hiding this comment

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

@mabuice try now?

Comment on lines 36 to 58
initContainers:
# Need to explicitly fix ownership here, since EFS doesn't do anonuid
- name: volume-mount-ownership-fix
image: busybox
command:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan /home/jovyan/shared && ls -lhd /home/jovyan",
]
securityContext:
runAsUser: 0
volumeMounts:
- name: home
mountPath: /home/jovyan
subPath: "{username}"
- name: home
mountPath: /home/jovyan/shared
subPath: _shared
Copy link
Member

Choose a reason for hiding this comment

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

This part can go after #1591 gets merged, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

@GeorgianaElena yep! I just merged that, will rebase and get rid of this!

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed!

Comment on lines 71 to 73
# Expllicitly unset mem_limit, so it overrides the default memory limit we set in
# basehub/values.yaml
mem_limit: null
Copy link
Member

Choose a reason for hiding this comment

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

So what this means is that there a mem guarantee, but no upper limit, right? Can I ask what's the reasoning behind this? (I'm planning to open an issue about resource allocation best practices and I'm gathering info 😅 )

@yuvipanda
Copy link
Member Author

yuvipanda commented Aug 26, 2022

I'm gonna work on getting this merged! Things to do:

  • Make sure the variable names for the RDS make sense, particularly around things that are DB agnostic & things that are mysql specific
  • Document how to setup a central RDS db for the hub
  • Make sure the documentation for the generator setup is fine
  • Document how the FUSE setup works
  • Document the new 'allowed_orgs' parameter to profiles!

@yuvipanda yuvipanda force-pushed the allen-swdb branch 2 times, most recently from d9718f4 to d922e97 Compare August 29, 2022 20:57
@yuvipanda yuvipanda requested a review from a team August 29, 2022 21:03
Copy link
Member

@sgibson91 sgibson91 left a comment

Choose a reason for hiding this comment

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

I have a small suggestion regarding CLI arguments. Also, the deployer's README should be updated

deployer/cli.py Outdated
Comment on lines 169 to 173
generate_cluster_parser.add_argument(
"--cloud-provider",
choices=["aws"],
help="Which cloud provider to generate a cluster for",
)
Copy link
Member

Choose a reason for hiding this comment

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

I would make this a required argument, rather than optional, because we will always have to specify it and typing out --cloud-provider would get repetitive

docs/howto/features/shared-db.md Outdated Show resolved Hide resolved
docs/howto/features/shared-db.md Outdated Show resolved Hide resolved
docs/howto/features/shared-db.md Outdated Show resolved Hide resolved
docs/howto/features/shared-db.md Outdated Show resolved Hide resolved

```bash
sops --in-place --encrypt eksctl/ssh-keys/<cluster-name>.key
python3 deployer generate-cluster --cloud-provider aws <cluster-name>
Copy link
Member

Choose a reason for hiding this comment

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

See above suggestion to make --cloud-provider a required arg

Copy link
Member Author

Choose a reason for hiding this comment

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

@sgibson91 done!

@damianavila
Copy link
Contributor

@yuvipanda, do you think we can get this one merged soon (once the review comments and the conflict are fixed)?

@yuvipanda
Copy link
Member Author

@damianavila yes i'll try to get that done asap.

@colliand
Copy link
Contributor

Is this PR ready to be merged? I believe this is the last step to close this issue.

@damianavila
Copy link
Contributor

Is this PR ready to be merged? I believe this is the last step to close #1684.

There are still some comments to be addressed and branch conflicts to be resolved before merging it.

@damianavila damianavila mentioned this pull request Sep 20, 2022
17 tasks
@damianavila
Copy link
Contributor

@yuvipanda confirmed to me he is going to take a look at the provided feedback and merge this one soon (most likely early next week).

- Also add a generate-cluster command to our deployer that generates
  the jsonnet & tfvars files from a template

Ref 2i2c-org#1440
Turns out there is literally one thing that's valid JSON
but not YAML - hard tabs. Guess what golang's JSON outputter
loves?!
yuvipanda and others added 3 commits September 30, 2022 16:34
Co-authored-by: Sarah Gibson <44771837+sgibson91@users.noreply.github.com>
@yuvipanda
Copy link
Member Author

I've made all the changes suggested by @sgibson91, so gonna merge this one (and immediately decom it). Apologies everyone that this took so long!

@yuvipanda yuvipanda merged commit 72aa8cb into 2i2c-org:master Sep 30, 2022
@github-actions
Copy link

🎉🎉🎉🎉

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

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.

6 participants