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

PXP-8779 HP-347 Feat/ecs #38

Merged
merged 169 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
61148d4
Decouple workspaces
jawadqur Jun 22, 2021
c58f042
Add paymodel to config, and dynamic status check
jawadqur Jun 23, 2021
6731f58
Updates
jawadqur Jun 23, 2021
5422030
Generalize local and external k8s functions
jawadqur Jun 23, 2021
4f3aa95
Wait for stuff to be deleted before returning anything.
jawadqur Jun 23, 2021
4e1873f
Add manual node scaling logic
jawadqur Jun 23, 2021
be5111b
Add envvar,wait for service termination in status
jawadqur Jun 23, 2021
f01afa4
Route traffic to external pod
jawadqur Jun 23, 2021
c9b5d0d
Service fix
jawadqur Jun 23, 2021
24f4486
Add /paymodels endpoint
jawadqur Jun 24, 2021
5879323
Remove excess logging
jawadqur Jun 29, 2021
1db3c80
Update .gitignore
jawadqur Jul 12, 2021
3ed1eda
test
mfshao Jul 13, 2021
913725c
test
mfshao Jul 13, 2021
c97d99f
test
mfshao Jul 13, 2021
cc8514c
fix
mfshao Jul 13, 2021
841cfda
fix
mfshao Jul 13, 2021
c5da616
Merge pull request #15 from uc-cdis/fix/decoupled
mfshao Jul 13, 2021
9c89ef1
wait for lb
jawadqur Jul 15, 2021
37689b5
Update
jawadqur Jul 15, 2021
5582b09
Wait for lb
jawadqur Jul 15, 2021
fd82ea2
wait for lb
jawadqur Jul 15, 2021
e8e437a
Route traffic over VPC peering, since squid doesn't support WSS
jawadqur Jul 19, 2021
7076437
feat: rebase decoupled w master
mfshao Aug 3, 2021
84d9f8c
Route traffic over VPC peering, since squid doesn't support WSS
jawadqur Aug 3, 2021
9e441bc
Merge remote-tracking branch 'origin/feat/decouple_workspaces_proxy' …
mfshao Aug 3, 2021
5d1130b
sum
mfshao Aug 3, 2021
21e639a
Remove load balancer wait
jawadqur Aug 3, 2021
4ee1c62
Make port a base10 digit
jawadqur Aug 3, 2021
6d7c1a9
Remove ASG scaling from hatchery
jawadqur Aug 3, 2021
188551d
Merge pull request #19 from uc-cdis/feat/ws-rebase
mfshao Aug 3, 2021
14a52a3
add profiler
mfshao Aug 3, 2021
62731dc
Merge pull request #20 from uc-cdis/feat/decouple_workspaces_proxy
jawadqur Aug 4, 2021
2119fda
fix: trace more
mfshao Aug 4, 2021
fb1c4d2
Revert "fix: trace more"
mfshao Aug 4, 2021
a616247
Merge branch 'feat/decouple_workspaces' into fix/dd-profile
mfshao Aug 4, 2021
288c080
test
mfshao Aug 4, 2021
8b945d5
fix: more trace
mfshao Aug 4, 2021
7ac55db
initial ECS functions
jawadqur Aug 4, 2021
218bcd7
Updates
jawadqur Aug 5, 2021
94925b1
Updates
jawadqur Aug 5, 2021
2f9551e
fix: more context
mfshao Aug 5, 2021
ebcbbe4
fix: more context
mfshao Aug 6, 2021
28c5e18
Updates, still not working 100% missing a few pieces
jawadqur Aug 9, 2021
5c92b18
Updates
jawadqur Aug 10, 2021
b0f1712
Optimized session caching using receivers
jawadqur Aug 10, 2021
9df970e
Fix loggroup
jawadqur Aug 10, 2021
67a75ba
Launch ECS service
jawadqur Aug 11, 2021
a61bcf7
Add status and teminate endpoint for ECS
jawadqur Aug 11, 2021
a6269ea
Merge pull request #21 from uc-cdis/fix/dd-profile
mfshao Aug 17, 2021
6f45798
feat: mount api key
mfshao Aug 18, 2021
cefa880
feat: delete api key
mfshao Aug 18, 2021
e76f1d7
feat: reorg code
mfshao Aug 19, 2021
689b44f
fix: body
mfshao Aug 19, 2021
fea3678
fix: nil body
mfshao Aug 19, 2021
02173bf
chore: update log
mfshao Aug 19, 2021
a05b832
test
mfshao Aug 19, 2021
6bbd90e
Revert "test"
mfshao Aug 19, 2021
2c6c849
logs
mfshao Aug 19, 2021
0aae38c
chore: token (bkwd comp)
mfshao Aug 19, 2021
e1fcdb1
comment
mfshao Aug 19, 2021
bf5f5c0
Merge pull request #22 from uc-cdis/feat/eks-api-key
mfshao Aug 20, 2021
ec32848
Updates, add alb + other stuff
jawadqur Aug 23, 2021
37309f7
Updates
jawadqur Aug 24, 2021
69a0b9d
Create security group from hatchery
jawadqur Aug 24, 2021
54a83c7
Status return WorkspaceStatus struct.
jawadqur Aug 24, 2021
1c90608
Status return WorkspaceStatus struct.
jawadqur Aug 24, 2021
667ec4a
Status return WorkspaceStatus struct.
jawadqur Aug 24, 2021
1930456
Create local service for routing.
jawadqur Aug 24, 2021
7734821
configurable to launch/terminate/status on eks/ecs
jawadqur Aug 24, 2021
77b5a96
Updates
jawadqur Aug 24, 2021
a97d28a
rebase
mfshao Aug 24, 2021
da760aa
Updates
jawadqur Aug 24, 2021
32e1a14
Fix error
jawadqur Aug 24, 2021
7b527e8
feat: api key handling for ecs
mfshao Aug 24, 2021
c267207
Merge branch 'feat/ecs' into feat/ecs-api-key
mfshao Aug 24, 2021
bc1bfe3
Merge pull request #23 from uc-cdis/feat/ecs-api-key
mfshao Aug 25, 2021
077ff1b
use BASE_URL instead of protected HOSTNAME env var (ECS)
jawadqur Aug 25, 2021
3796b44
Add data volume populated with placeholder files
jawadqur Aug 25, 2021
d54d26b
Testing with no stopTimeout
jawadqur Aug 31, 2021
56173a4
Testing with no stopTimeout
jawadqur Aug 31, 2021
e54a3aa
Set deregistration timeout from 300 to 0
jawadqur Aug 31, 2021
b8c430f
EFS (Not working 100%, still need to fix POSIX permissions)
jawadqur Sep 2, 2021
d7faea1
use accessPoint for POSIX permissions
jawadqur Sep 2, 2021
cf91918
Fix accessPoint
jawadqur Sep 2, 2021
e46f40f
Updates
jawadqur Sep 2, 2021
9632953
feat: add IdleTimeLimit to options
mfshao Sep 9, 2021
1e77d41
Merge branch 'feat/ecs' into feat/kernel-shutdown-time
mfshao Sep 10, 2021
dc3137c
feat: idle time limit and last act time
mfshao Sep 11, 2021
fc3ae21
fix: typo
mfshao Sep 13, 2021
f4e8a6e
fix: status
mfshao Sep 13, 2021
dae0dec
fix up
mfshao Sep 14, 2021
810ec16
fix: check time when running
mfshao Sep 14, 2021
034aad5
feat: go 1.17 and milli time
mfshao Sep 14, 2021
8ea8a0d
chore: all milli sec
mfshao Sep 14, 2021
2f6843f
update
jawadqur Sep 15, 2021
c5731e6
Update policy name
jawadqur Sep 15, 2021
5e8cc1f
Merge branch 'feat/ecs' into feat/kernel-shutdown-time
mfshao Sep 16, 2021
82e63f9
stay with go 1.14 for now
mfshao Sep 16, 2021
de62002
fix: try create ECS cluster if not found
mfshao Sep 16, 2021
24879b8
fix: logic
mfshao Sep 16, 2021
f7a43c7
Merge pull request #26 from uc-cdis/feat/kernel-shutdown-time
mfshao Sep 21, 2021
4734785
sidecar from config
jawadqur Sep 22, 2021
fd4f12f
change to GEN3_API_KEY
mfshao Sep 22, 2021
3460e5a
Merge pull request #27 from uc-cdis/feat/ecs_sidecar_fix
mfshao Sep 22, 2021
9c78202
fix mount
mfshao Sep 23, 2021
255c45c
fix mount
mfshao Sep 23, 2021
2240d7f
fix mount
mfshao Sep 23, 2021
f1ef864
fix env var
mfshao Sep 23, 2021
23d4974
BASE_URL to GEN3_ENDPOINT
mfshao Sep 23, 2021
4b15ae0
BASE_URL to GEN3_ENDPOINT
mfshao Sep 23, 2021
6a8447c
Merge pull request #28 from uc-cdis/fix/ecs
mfshao Sep 23, 2021
7ebed4a
fix: env var name
mfshao Oct 1, 2021
c370d70
Fix nodeport issue
jawadqur Oct 1, 2021
f1a4e74
update
jawadqur Oct 1, 2021
08ae745
Merge pull request #32 from uc-cdis/feat/ecs_fix
jawadqur Oct 1, 2021
2dcb165
First iteration of transitgateway (WIP)
jawadqur Sep 22, 2021
8a516c2
Updates
jawadqur Sep 22, 2021
30e58d9
Updates
jawadqur Sep 22, 2021
4d514bf
Updates
jawadqur Sep 23, 2021
8fef3b8
Updates
jawadqur Sep 23, 2021
26769c1
Updates
jawadqur Sep 24, 2021
5476579
updates
jawadqur Sep 28, 2021
70410d6
Updates
jawadqur Sep 28, 2021
2f09cb1
Updates
jawadqur Sep 29, 2021
cfd5021
Updates
jawadqur Sep 29, 2021
fa534ed
Test functions
jawadqur Sep 30, 2021
c4b2d42
updates
jawadqur Sep 30, 2021
be06948
Updates
jawadqur Sep 30, 2021
19c8306
Updates
jawadqur Oct 1, 2021
251529e
Updates
jawadqur Oct 1, 2021
c76b54a
remove unused logs
jawadqur Oct 1, 2021
b2efc95
Updates
jawadqur Oct 1, 2021
f6af613
Updates
jawadqur Oct 1, 2021
7b92119
Updates
jawadqur Oct 1, 2021
144bd33
Add check for existing accessPoint
jawadqur Oct 4, 2021
8cb9946
Create accessPoint if it doesn't exist
jawadqur Oct 4, 2021
3634aad
Updates
jawadqur Oct 4, 2021
f2fdd91
read VPCID from env var
jawadqur Oct 5, 2021
a34f84b
Merge pull request #31 from uc-cdis/fix/env_var
mfshao Oct 6, 2021
b55998c
Merge branch 'master' into feat/decouple_workspaces
mfshao Oct 6, 2021
35be42a
rebase
mfshao Oct 6, 2021
5ee523e
Merge branch 'feat/ecs' into feat/ecs_transitgw
mfshao Oct 6, 2021
79308e3
Make IGW idempotent
jawadqur Oct 6, 2021
01935ce
Updates
jawadqur Oct 6, 2021
43dc17a
eks mount fix
mfshao Oct 7, 2021
5113594
eks mount fix configurable
mfshao Oct 7, 2021
26a28cc
eks mount fix path
mfshao Oct 7, 2021
e7e3587
eks mount fix path
mfshao Oct 7, 2021
249c2df
Merge pull request #33 from uc-cdis/fix/eks_mount
mfshao Oct 8, 2021
b1776f6
fix: non exiting sidecar
mfshao Oct 15, 2021
692303a
Revert "fix: non exiting sidecar"
mfshao Oct 15, 2021
5ac4e00
PXP-8341 Fetch pay models from DynamoDB (#35)
paulineribeyre Oct 21, 2021
d2b7c5e
Merge branch 'feat/ecs' into feat/ecs_transitgw
mfshao Oct 22, 2021
00ab649
fix for backward compatibility
mfshao Oct 22, 2021
c36d459
Merge pull request #36 from uc-cdis/fix/ecs-dynamodb
mfshao Oct 22, 2021
d088bdc
Merge branch 'feat/ecs' into feat/ecs_transitgw
mfshao Oct 22, 2021
b520452
clean up
mfshao Oct 22, 2021
cf98d4a
cleanup
mfshao Oct 25, 2021
6981d33
Merge pull request #30 from uc-cdis/feat/ecs_transitgw
mfshao Oct 25, 2021
73c785b
cleanup
mfshao Oct 26, 2021
41e8f23
fix comment
mfshao Oct 26, 2021
3ad7813
fix: reduce redundent code and db calls
mfshao Oct 29, 2021
db1d92b
chore: reorg codes to helper
mfshao Oct 29, 2021
5928b91
Revert "fix: reduce redundent code and db calls"
mfshao Oct 29, 2021
a674bd9
Revert "chore: reorg codes to helper"
mfshao Oct 29, 2021
7c10a3b
test
mfshao Oct 29, 2021
e36b173
fix logic
mfshao Oct 29, 2021
479ad5f
Merge branch 'fix/ecs' into feat/ecs
mfshao Oct 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@

Hatchery creates Kubernetes Pods for workspace services. Workspace services must expose HTTP servers. Ambassador is used to proxy user traffic through to their container workspace once it is launched by Hatchery.

## Documentation TOC

See [this bLog](https://www.divio.com/blog/documentation/) for an introduction to the different types of documentation (explanation, how-to, tutorial, reference).
## Documentation

### Explanation
* [hatchery overview](doc/explanation/hatcheryOverview.md)
* [api](doc/explanation/hatcheryApi.md)
* [dockstore apps](doc/explanation/dockstore.md)
* [Hatchery overview](doc/explanation/hatcheryOverview.md)
* [API documentation](doc/explanation/hatcheryApi.md)
* [Configuring Dockstore apps](doc/explanation/dockstore.md)

### How-to
* [dev-test](doc/howto/devTest.md)
* [gen3-fuse](doc/howto/fuseSidecar.md)
* [Jupyter Notebook](doc/howto/jupyterNotebook.md)
* [R Studio](doc/howto/rStudio.md)
* [Galaxy](doc/howto/galaxy.md)
* [Hatchery configuration](doc/howto/configuration.md)
* [Quick start for local development](doc/howto/quick_start.md)
* [Run the tests locally](doc/howto/devTest.md)
* [Configuring gen3-fuse](doc/howto/fuseSidecar.md)
* Configuring workspaces:
* [Jupyter](doc/howto/jupyterNotebook.md)
* [RStudio](doc/howto/rStudio.md)
* [Galaxy](doc/howto/galaxy.md)
* [noNVC Firefox](doc/howto/noVNCFirefox.md)

### Tutorials

Expand Down
4 changes: 3 additions & 1 deletion doc/howto/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ An example manifest entry may look like
"user-uid": 1000,
"fs-gid": 100,
"user-volume-location": "/home/jovyan/pd",
"gen3-volume-location": "/home/jovyan/.gen3"
"friends": []
}]
}
Expand Down Expand Up @@ -66,7 +67,8 @@ An example manifest entry may look like
* `ready-probe` the path to use for the Kubernetes readiness probe.
* `user-uid` the UID for the user in this container.
* `fs-gid` the GID for the filesystem mounts.
* `user-volume-location` the location where the user persistant storage should be mounted in this container.
* `user-volume-location` the location where the user persistent storage should be mounted in this container.
* `gen3-volume-location` the location where the user's API key file will be put into
* `lifecycle-pre-stop` a string array as the container prestop command.
* `lifecycle-post-start` a string array as the container poststart command.
* `friends` is a list of kubernetes containers to deploy alongside the main container and the sidecar in the kubernetes pod
3 changes: 2 additions & 1 deletion doc/howto/jupyterNotebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Jupyter lab is the successor to jupyter notebook.
"lifecycle-post-start": ["/bin/sh","-c","export IAM=`whoami`; rm -rf /home/$IAM/pd/dockerHome; ln -s $(pwd) /home/$IAM/pd/dockerHome; mkdir -p /home/$IAM/.jupyter/custom; echo \"define(['base/js/namespace'], function(Jupyter){Jupyter._target = '_self';})\" >/home/$IAM/.jupyter/custom/custom.js; ln -s /data /home/$IAM/pd/; true"],
"user-uid": 1000,
"fs-gid": 100,
"user-volume-location": "/home/jovyan/pd"
"user-volume-location": "/home/jovyan/pd",
"gen3-volume-location": "/home/jovyan/.gen3"
},
```
1 change: 1 addition & 0 deletions doc/howto/noVNCFirefox.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ In the main container's manifest, specify
"export IAM=`whoami`; rm -rf /home/$IAM/pd/dockerHome; ln -s $(pwd) /home/$IAM/pd/dockerHome; mkdir -p /home/$IAM/.jupyter/custom; echo \"define(['base/js/namespace'], function(Jupyter){Jupyter._target = '_self';})\" >/home/$IAM/.jupyter/custom/custom.js; ln -s /data /home/$IAM/pd/; true"
],
"user-volume-location": "/home/jovyan/pd",
"gen3-volume-location": "/home/jovyan/.gen3"
"use-shared-memory": "true",
"friends": [
{
Expand Down
19 changes: 19 additions & 0 deletions doc/howto/quick_start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Quick start for local development

- Create a configuration file at `./hatchery.json` with basic configuration:

```
{
"user-namespace": "jupyter-pods",
"sub-dir": "/lw-workspace",
"user-volume-size": "10Gi"
}
```

- Install [nodemon](https://nodemon.io/)

- Run Hatchery:

`export GEN3_ENDPOINT=qa-heal.planx-pla.net; export GEN3_VPCID=qaplanetv1; nodemon --exec go run main.go -config ./hatchery.json --signal SIGTERM`

The API is exposed at http://0.0.0.0:8000.
1 change: 1 addition & 0 deletions doc/howto/rStudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ to disable authentication as this is a single user container when run with Hatch
"use-tls": "false",
"ready-probe": "/",
"user-volume-location": "/home/rstudio/pd",
"gen3-volume-location": "/home/jovyan/.gen3"
"fs-gid": 100
}
```
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ require (
github.com/DataDog/datadog-go v4.8.1+incompatible // indirect
github.com/DataDog/sketches-go v1.1.0 // indirect
github.com/Microsoft/go-winio v0.5.0 // indirect
github.com/apparentlymart/go-cidr v1.1.0
github.com/aws/aws-sdk-go v1.40.15
github.com/go-logr/logr v1.0.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/pprof v0.0.0-20210804190019-f964ff605595 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 // indirect
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 // indirect
Expand All @@ -29,6 +34,7 @@ require (
k8s.io/client-go v1.5.2
k8s.io/klog/v2 v2.10.0 // indirect
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
sigs.k8s.io/aws-iam-authenticator v0.5.3
)

replace (
Expand Down
Loading