Skip to content

Commit

Permalink
Merge pull request #76 from Azure/migration-fixes
Browse files Browse the repository at this point in the history
Migration fixes
  • Loading branch information
utkarshayachit authored Oct 10, 2023
2 parents 6a6af69 + 42c9e62 commit 99eed18
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 258 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# bacc: Batch Accelerator

[![ci-cli](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-cli.yaml/badge.svg?branch=main&event=push)](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-cli.yaml)
[![ci-validate-configs](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-validate.yaml/badge.svg?branch=main&event=push)](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-validate.yaml)
[![ci-deploy-n-test](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-deploy-n-test.yaml/badge.svg?branch=main)](https://github.com/utkarshayachit/azbatch-starter/actions/workflows/ci-deploy-n-test.yaml)
![GitHub](https://img.shields.io/github/license/utkarshayachit/azbatch-starter)
[![ci-cli](https://github.com/Azure/bacc/actions/workflows/ci-cli.yaml/badge.svg?branch=main&event=push)](https://github.com/Azure/bacc/actions/workflows/ci-cli.yaml)
[![ci-validate-configs](https://github.com/Azure/bacc/actions/workflows/ci-validate.yaml/badge.svg?branch=main&event=push)](https://github.com/Azure/bacc/actions/workflows/ci-validate.yaml)
[![ci-deploy-n-test](https://github.com/Azure/bacc/actions/workflows/ci-deploy-n-test.yaml/badge.svg?branch=main)](https://github.com/Azure/bacc/actions/workflows/ci-deploy-n-test.yaml)
![GitHub](https://img.shields.io/github/license/Azure/bacc)

[Azure Batch](https://learn.microsoft.com/en-us/azure/batch/batch-technical-overview)
is a service for running compute intensive workloads on Azure. It is a managed service for running
Expand All @@ -29,7 +29,7 @@ can be used by itself.

## Documentation

Latest documentation is hosted on [Github Pages](https://utkarshayachit.github.io/azbatch-starter/).
Latest documentation is hosted on [Github Pages](https://azure.github.io/bacc/).

## License

Expand Down
2 changes: 1 addition & 1 deletion cli/src/bacc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def validate_resource_group(credentials, subscription_id, resource_group_name):
rclient = ResourceManagementClient(credentials, subscription_id)
if rclient.resource_groups.check_existence(resource_group_name):
rg = rclient.resource_groups.get(resource_group_name)
if rg.tags is not None and rg.tags.get("codebase") == "azbatch-starter":
if rg.tags is not None and rg.tags.get("codebase") == "azure/bacc":
log.debug("rg '%s' has expected tags; rg is valid", resource_group_name)
return True
log.debug(
Expand Down
210 changes: 0 additions & 210 deletions docs/aac-draft.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ create a virtual environment and install the CLI in it.
# if you haven't already, obtain the source code
# here, we use GitHub to clone the repository however you can also download the source code as a zip file and extract it
# instead of cloning the repository.
git clone https://github.com/utkarshayachit/azbatch-starter.git
git clone https://github.com/Azure/bacc.git

# change directory to azbatch-starter (or where you cloned/downloaded the repository)
cd azbatch-starter
# change directory to bacc (or where you cloned/downloaded the repository)
cd bacc

# create a virtual environment
python3 -m venv env0
Expand All @@ -44,8 +44,8 @@ If you don't want to use a virtual environment, you can install the CLI tool glo
```sh
#!/bin/bash

# change directory to azbatch-starter (or where you cloned/downloaded the repository)
cd azbatch-starter
# change directory to bacc (or where you cloned/downloaded the repository)
cd bacc

# install the CLI tools
pip install ./cli
Expand Down
11 changes: 3 additions & 8 deletions docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,6 @@ follow this practice.
This module comes with a default library of imges that you can use. See [images.jsonc] for a list of images. The above
is only intended for adding new images or unsupported images.

[config/]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config
[schemas/]: https://github.com/utkarshayachit/azbatch-starter/tree/main/schemas
[infrastructure.bicep]: https://github.com/utkarshayachit/azbatch-starter/blob/main/modules/infrastructure.bicep
[spoke.jsonc]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config/spoke.jsonc
[batch.jsonc]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config/batch.jsonc
[storage.jsonc]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config/storage.jsonc
[images.jsonc]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config/images.jsonc
[hub.jsonc]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config/hub.jsonc
[schemas/]: https://github.com/Azure/bacc/tree/main/schemas
[infrastructure.bicep]: https://github.com/Azure/bacc/blob/main/modules/infrastructure.bicep
[images.jsonc]: https://github.com/Azure/bacc/tree/main/modules/images.jsonc
4 changes: 2 additions & 2 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ how to setup a start task for a pool.
The config is also setup to run the AzFinSim demo on Windows pool in 'package' mode. Instead of using a container image,
the application is installed on the pool in the start task. The application is then run in the task command line.

[azfinsim-linux]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples/azfinsim-linux
[azfinsim-windows]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples/azfinsim-windows
[azfinsim-linux]: https://github.com/Azure/bacc/tree/main/examples/azfinsim-linux
[azfinsim-windows]: https://github.com/Azure/bacc/tree/main/examples/azfinsim-windows
5 changes: 2 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,5 @@ Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the [MIT License](./LICENSE)

[cli]: https://github.com/utkarshayachit/azbatch-starter/tree/main/cli
[config]: https://github.com/utkarshayachit/azbatch-starter/tree/main/config
[`examples`]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples
[cli]: https://github.com/Azure/bacc/tree/main/cli
[`examples`]: https://github.com/Azure/bacc/tree/main/examples
9 changes: 4 additions & 5 deletions docs/tutorials/azfinsim-in-secured-batch.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ The deployment deploys a hub using the `connectivity.bicep` template from the [a
repository. The hub is deployed in a separate resource group. The hub contains a firewall and a virtual network
gateway. The firewall is used to route all traffic from the compute nodes through a single point of egress.
The virtual network gateway is used to connect the hub to the spoke network. The spoke network is deployed
using the `deployment.bicep` template from the `azbatch-starter` repository. The spoke network contains
using the `deployment.bicep` template from the `bacc` repository. The spoke network contains
a virtual network and a batch account.


## Design Considerations

* **Private endpoints**: All resources deployed by bacc are accessible only via private endpoints. Network security
Expand Down Expand Up @@ -53,7 +52,7 @@ requirements and steps described in that document for the same.
For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can
simply click the following link to deploy using Azure Portal.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Futkarshayachit%2Fazbatch-starter%2Fmain%2Ftemplates%2Fsecured-batch_deploy.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fbacc%2Fmain%2Ftemplates%2Fsecured-batch_deploy.json)

To deploy using the CLI, use the following steps:

Expand Down Expand Up @@ -109,7 +108,7 @@ is the password you provided during the hub deployment.

Once connected to the Linux Jumpbox, you can now run the demo from there. The steps are same as the
[With Containers](./azfinsim.md) tutorial. Simply follow the steps after the deployment step
i.e. [`Step 4: Install CLI`](./azfinsim.md#step-4-install-cli) onwards.
i.e. [`Step 3: Install CLI`](./azfinsim-linux.md#step-3-install-cli) onwards.
The only differences being the following:

* instead of using your local machine, you will execute the commands on the Linux jumpbox.
Expand All @@ -132,5 +131,5 @@ The only differences being the following:
This is only necessary for the few commands we execute in the tutorial steps viz. obtaining the subscription ID.
You can skip these CLI login steps and instead manually provide the subscription ID in the `bacc ...` commands.

[examples/secured-batch]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples/secured-batch
[examples/secured-batch]: https://github.com/Azure/bacc/tree/main/examples/secured-batch
[azbatch-starter-connectivity]: https://github.com/mocelj/azbatch-starter-connectivity
8 changes: 4 additions & 4 deletions docs/tutorials/azfinsim-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ requirements and steps described in that document.
For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can
simply click the following link to deploy using Azure Portal.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Futkarshayachit%2Fazbatch-starter%2Fmain%2Ftemplates%2Fazfinsim-linux_deploy.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fbacc%2Fmain%2Ftemplates%2Fazfinsim-linux_deploy.json)

Use the following steps to deploy using Azure CLI.

Expand All @@ -41,8 +41,8 @@ AZ_LOCATION=eastus2
AZ_DEPLOYMENT_NAME=azfinsim0
AZ_RESOURCE_GROUP=azfinsim0

# change directory to azbatch-starter (or where you cloned/downloaded the repository)
cd azbatch-starter
# change directory to bacc (or where you cloned/downloaded the repository)
cd bacc

az deployment sub create \
--name $AZ_DEPLOYMENT_NAME \
Expand Down Expand Up @@ -224,4 +224,4 @@ bacc azfinsim -s $AZ_SUBSCRIPTION_ID -g $AZ_RESOURCE_GROUP \
}
```

[examples/azfinsim-linux]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples/azfinsim-linux
[examples/azfinsim-linux]: https://github.com/Azure/bacc/tree/main/examples/azfinsim-linux
8 changes: 4 additions & 4 deletions docs/tutorials/azfinsim-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ requirements and steps described in that document.
For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can
simply click the following link to deploy using Azure Portal.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Futkarshayachit%2Fazbatch-starter%2Fmain%2Ftemplates%2Fazfinsim-windows_deploy.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fbacc%2Fmain%2Ftemplates%2Fazfinsim-windows_deploy.json)

Use the following steps to deploy using Azure CLI.

Expand All @@ -37,8 +37,8 @@ AZ_LOCATION=eastus2
AZ_DEPLOYMENT_NAME=azfinsim-win
AZ_RESOURCE_GROUP=azfinsim-win

# change directory to azbatch-starter (or where you cloned/downloaded the repository)
cd azbatch-starter
# change directory to bacc (or where you cloned/downloaded the repository)
cd bacc

az deployment sub create \
--name $AZ_DEPLOYMENT_NAME \
Expand Down Expand Up @@ -136,4 +136,4 @@ Azure Batch Explorer.
To understand how to monitor the AzFinSim demo using various tools available and inspect the results, please refer to the
[understanding AzFinSim](../understanding-azfinsim.md) document.

[examples/azfinsim-windows]: https://github.com/utkarshayachit/azbatch-starter/tree/main/examples/azfinsim-windows
[examples/azfinsim-windows]: https://github.com/Azure/bacc/tree/main/examples/azfinsim-windows
6 changes: 3 additions & 3 deletions docs/tutorials/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ Typical steps to setup your environment are as follows:
for your operating system.
2. Install Python 3.10 or higher. Follow the instructions [here](https://www.python.org/downloads/).
3. Download source code from [GitHub](https://github.com/utkarshayachit/azbatch-starter). Since the repository uses
3. Download source code from [GitHub](https://github.com/Azure/bacc). Since the repository uses
submodules, it's easiest to clone the repository using `Git` as follows:

```bash
cd [work-dir] # directory where you want to download the source code
# clone the repository
git clone --recursive https://github.com/utkarshayachit/azbatch-starter
git clone --recursive https://github.com/Azure/bacc
```

This fetches the code and all the submodules. If you have already cloned the repository, you can fetch the submodules
using the following command:

```bash
cd [work-dir]/azbatch-starter # directory where you downloaded the source code
cd [work-dir]/bacc # directory where you downloaded the source code
# fetch the submodules
git submodule update --init --recursive
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/mpi-benchmarks-rhel.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ this tutorial uses **User Subscription** pool allocation mode, you will need to
For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can
simply click the following link to deploy using Azure Portal.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Futkarshayachit%2Fazbatch-starter%2Fmain%2Ftemplates%2Fmpi-benchmarks_deploy.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fbacc%2Fmain%2Ftemplates%2Fmpi-benchmarks_deploy.json)

Use the following steps to deploy using Azure CLI.

Expand All @@ -40,8 +40,8 @@ AZ_DEPLOYMENT_NAME=mpi-benchmarks0
AZ_RESOURCE_GROUP=mpi-benchmarks0
BATCH_SERVICE_OBJECT_ID= .... # should be set to the id obtained in prerequisites step

# change directory to azbatch-starter (or where you cloned/downloaded the repository)
cd azbatch-starter
# change directory to bacc (or where you cloned/downloaded the repository)
cd bacc

az deployment sub create \
--name $AZ_DEPLOYMENT_NAME \
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/vizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ from a public network. If you want to let the deployment create a new storage ac
For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can
simply click the following link to deploy using Azure Portal.

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Futkarshayachit%2Fazbatch-starter%2Fmain%2Ftemplates%2Fvizer_deploy.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fbacc%2Fmain%2Ftemplates%2Fvizer_deploy.json)

To create deployment using Azure CLI for these steps. Since in this example we are using an existing storage account, we need to
provide the storage account name, container name and the account access key or SAS token to access it.
Expand Down
2 changes: 1 addition & 1 deletion examples/azfinsim-windows/config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"startTask": {
"commands": [
"curl https://raw.githubusercontent.com/utkarshayachit/azbatch-starter/main/examples/azfinsim-windows/start_task.ps1 -o start_task.ps1",
"curl https://raw.githubusercontent.com/Azure/bacc/main/examples/azfinsim-windows/start_task.ps1 -o start_task.ps1",
"powershell.exe -ExecutionPolicy Bypass -File start_task.ps1"
]
}
Expand Down
2 changes: 1 addition & 1 deletion examples/mpi-benchmarks/config.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"interNodeCommunication": true,
"startTask": {
"commands": [
"curl -O -L https://raw.githubusercontent.com/utkarshayachit/azbatch-starter/main/examples/mpi-benchmarks/start_task.sh",
"curl -O -L https://raw.githubusercontent.com/Azure/bacc/main/examples/mpi-benchmarks/start_task.sh",
"chmod +x start_task.sh",
"bash start_task.sh"
]
Expand Down
2 changes: 1 addition & 1 deletion modules/infrastructure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var dplSuffix = uniqueString(deployment().name, location, resourceGroupName)
@description('tags for all resources')
var allTags = union(tags, {
'last deployed': timestamp
codebase: 'azbatch-starter'
codebase: 'azure/bacc'
version: '0.1.0'
})

Expand Down
2 changes: 1 addition & 1 deletion tests/cmake/jumpbox_script.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ CMAKE=/tmp/workspace/cmake/bin/cmake
CTEST=/tmp/workspace/cmake/bin/ctest

# download the source code
git clone -q --depth 1 https://github.com/utkarshayachit/azbatch-starter.git -b main src
git clone -q --depth 1 https://github.com/Azure/bacc.git -b main src

# install package in a virtual environment
cd /tmp/workspace/src
Expand Down

0 comments on commit 99eed18

Please sign in to comment.