Skip to content

Commit

Permalink
Update docs and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Oct 27, 2023
1 parent 0d67971 commit 1a38086
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
22 changes: 18 additions & 4 deletions deployer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ The `deployer.py` file is the main file, that contains all of the commands regis
│   │   │   ├── dedicate_cluster_app.py
│   │   │   └── gcp.py
│   │   └── helm_upgrade
│   │   ├── decision.py
│   │   └── jobs.py
│   │   | ├── decision.py
│   │   | └── jobs.py
| | └── resource_allocation
│   │   ├── generate_choices.py
│   │   ├── node-capacity-info.json
│   │   ├── resource_allocation_app.py
│   │   └── update_nodeinfo.py
│   ├── grafana
│   │   ├── central_grafana.py
│   │   ├── deploy_dashboards.py
Expand Down Expand Up @@ -139,8 +144,8 @@ This section descripts some of the subcommands the `deployer` can carry out.
│ deploy-support Deploy support components to a cluster │
│ exec Execute a shell in various parts of the infra. It can be used for poking around, or │
│ debugging issues. │
│ generate Generate various types of assets. It currently supports generating files related to billing
or new, dedicated clusters.
│ generate Generate various types of assets. It currently supports generating files related to
billing, new dedicated clusters, helm upgrade strategies and resource allocation.
│ grafana Manages Grafana related workflows. │
│ run-hub-health-check Run a health check on a given hub on a given cluster. Optionally check scaling of dask │
│ workers if the hub is a daskhub. │
Expand Down Expand Up @@ -252,6 +257,15 @@ These defaults are described in each file template.
The cluster configuration directory is generated based on the templates in:
- (`config/clusters/templates/gcp`)[https://github.com/2i2c-org/infrastructure/blob/master/config/clusters/templates/gcp]

#### `generate resource-allocation`

This sub-command can be used to generate the resource allocation choices for given instance type and a given optimization strategy.

##### `generate resource-allocation choices`
This generates a custom number of resource allocation choices for a certain instance type, depending on a certain chosen strategy that can be used in the profile list of a hub.

##### `generate resource-allocation node-info-update`
This updates the json file `node-capacity-info.json` with info about the capacity of a node of a certain type. This file is then used for generating the resource choices.

### The `grafana` sub-command
This deployer sub-command manages all of the available functions related to Grafana.
Expand Down
3 changes: 2 additions & 1 deletion deployer/cli_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
app.add_typer(
generate_app,
name="generate",
help="Generate various types of assets. It currently supports generating files related to billing or new, dedicated clusters.",
help="Generate various types of assets. It currently supports generating files related to billing, "
"new dedicated clusters, helm upgrade strategies and resource allocation.",
)
app.add_typer(
cilogon_client_app,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def node_info_update(
):
"""
Generates a new entry holding info about the capacity of a node of a certain instance type
or updates existing one in a json file called `node-capacity-info.json`.
or updates an existing one that is then used to update a json file called `node-capacity-info.json`.
This file is then used for generating the resource choices.
"""
try:
with open(HERE / "node-capacity-info.json") as f:
Expand Down

0 comments on commit 1a38086

Please sign in to comment.