Skip to content

Commit

Permalink
Added documentation for setting up containers
Browse files Browse the repository at this point in the history
  • Loading branch information
xop5 committed Oct 31, 2024
1 parent fdaa8e9 commit bb072b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ client.set_pool_info(
client = AzureClient("./configuration.toml")
client.create_pool("My Test Pool")
```
- set_container: configures the Azure batch job to use generic Docker container that may be hosted in any public or private repository (e.g. Docker Hub, Github Container Registry, etc.). The repository must be accessible from the virtual network and subnet where the batch pool is deployed at runtime.
Example:
```
client = AzureClient("./configuration.toml")
client.set_container(
container_image_name="cdcgov/prime-simplereport/frontend-lighthouse:pr-8212", # Replace with image name and tag
registry_url="ghcr.io/cdcgov/prime-simplereport/", # Replace with URL of container registry
container_registry_server="ghcr.io", # Server where registry is hosted
access_token="SOME_TOKEN_OR_PASSWORD" # Optional password or personal token (Otherwise omit this argument)
)
client.create_pool(pool_name)
```
- update_scale_settings: modifies the scaling mode (fixed or autoscale) for an existing pool
Example:
```
Expand Down
1 change: 0 additions & 1 deletion cfa_azure/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,6 @@ def get_batch_pool_json(
"containerImageNames": [container_image_name],
"containerRegistries": [container_registry]
}
print(container_configuration)
deployment_config['virtualMachineConfiguration']['containerConfiguration'] = container_configuration
logger.debug("VM and container configurations prepared.")

Expand Down

0 comments on commit bb072b5

Please sign in to comment.