Skip to content

Commit 72b9e6a

Browse files
authored
Merge pull request #410 from MicrosoftDocs/main
9/25 OOB Publish
2 parents bbb0f21 + 44d3d68 commit 72b9e6a

37 files changed

+627
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: How to clean up roles using the CLI
3+
description: How to clean up roles built in a Azure CycleCloud Workspace for Slurm environment using the Azure CLI
4+
author: xpillons
5+
ms.date: 08/29/2024
6+
ms.author: xpillons
7+
---
8+
9+
# Cleaning up roles
10+
11+
Deleting a deployment's resource group will delete all of the resources created by Azure Azure CycleCloud Workspace for Slurm but fail to remove its role assignments. To fix this, we provide `util/delete_roles.sh` to delete these role assignments for all resource groups, including those that were deleted or had their resources manually deleted.
12+
13+
```bash
14+
./util/delete_roles.sh --location my-location --resource-group my-ccws-rg [--delete-resource-group]
15+
```
16+
17+
> [!NOTE]
18+
> It is required to temporarily recreate a deleted resource group in a simple deployment that outputs the GUIDs produced for the given resource group name and location. Passing in `--delete-resource-group` will clean up this resource group irrespective of whether it is a byproduct of this utility or created by the user.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: How to connect to a Login Node through Bastion
3+
description: How to securily connect using SSH to a Login Node through Bastion
4+
author: xpillons
5+
ms.date: 08/30/2024
6+
ms.author: xpillons
7+
---
8+
9+
# How to connect to a Login Node through Bastion
10+
There is no SSH route open from your local environment to Virtual Machines running in an Azure CycleCloud Workspace for Slurm by default for security reasons. However, an Azure Bastion can be deployed and used to SSH through to your Virtual Machines. Below are the instructions on how to do based on this documentation: [Connect to a VM using Bastion](/azure/bastion/connect-vm-native-client-linux).
11+
12+
## Step 1 – Identify the SSH private key locally
13+
Locate the private SSH key file associated with the public key provided during the deployment. If it is not accessible locally, then download it.
14+
15+
## Step 2 – Retrieve the Resource ID of the Login Node
16+
From the CycleCloud UI, select the Login node to which you want to connect and double click on that line to open the detail view of the node. Select the VM tab to display the resource details below and copy the `ResourceId`.
17+
18+
![Login Node properties](../../images/ccws/login-node-resource-id.png)
19+
20+
## Step 3 – Create a connect script
21+
Create a login script using the template below. Paste the login node `resourceID` retrieved above and specify the resource group and the private SSH key file to use.
22+
23+
```bash
24+
#!/bin/bash
25+
resourceId=<paste_your_loginnode_id>
26+
resourceGroup=$(echo $resourceId | cut -d'/' -f5)
27+
28+
az network bastion ssh --name bastion --resource-group $resourceGroup --target-resource-id $resourceId --auth-type ssh-key --username hpcadmin --ssh-key hpcadmin_id_rsa
29+
```
30+
31+
> Note: The github repository https://github.com/Azure/cyclecloud-slurm-workspace.git contains the utility script `./util/ssh_thru_bastion.sh` to help connecting.
32+
33+
## Step 4 - Connect
34+
Run the script created/updated above to SSH on the login node.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: How to deploy a CycleCloud Workspace for Slurm environment using the CLI
3+
description: How to deploy a CycleCloud Workspace for Slurm environment using the Azure CLI and the Azure Portal UI Sandbox
4+
author: xpillons
5+
ms.date: 08/22/2024
6+
ms.author: xpillons
7+
---
8+
9+
# How to deploy a CycleCloud Workspace for Slurm environment using the CLI
10+
11+
Prerequisites: Users will need to install the Azure CLI and Git. They will then need to sign into or set their Azure subscription.
12+
13+
- Clone the Azure CycleCloud Workspace for Slurm on the latest stable release
14+
15+
```bash
16+
git clone https://github.com/Azure/cyclecloud-slurm-workspace.git --branch <release>
17+
```
18+
19+
- Copy the content of the UI definition file `./uidefinitions/createUiDefinition.json`
20+
21+
- Browse to the UI Definition Sandbox:
22+
- For Azure Public Cloud [Azure Public Portal](https://portal.azure.com/#view/Microsoft_Azure_CreateUIDef/SandboxBlade)
23+
- For Azure US Gov [Azure US Gov Portal](https://portal.azure.us/#view/Microsoft_Azure_CreateUIDef/SandboxBlade)
24+
25+
- Paste the content of the UI Definition file into the multiline text box in the right,
26+
- Click `Preview >>` in the bottom-left corner. This will bring up a UI experience.
27+
- Proceed through each page of the UI flow to ensure that necessary values populate in the output payload described in the next step,
28+
- Proceed with the UI flow to the `Review + create` page and then click the link labeled `View outputs payload` adjacent to the `Create` button. This will generate a pane with JSON-formatted text in its body on the right-hand side of the browser window,
29+
- Copy the JSON-formatted text into a local JSON file,
30+
- Save it as `parameters.json` and make note of the path to it. This is what we call the Parameters File for the deployment,
31+
- Open the shell of choice and navigate to the folder/directory that contains the `cyclecloud-slurm-workspace` repository cloned above,
32+
- Accept the terms of the Cycle image plan:
33+
34+
```bash
35+
az vm image terms accept --urn azurecyclecloud:azure-cyclecloud:cyclecloud8-gen2:latest
36+
```
37+
- Run the following deployment command in shell. Substitutions should be made for fields with square brackets (be sure to delete brackets). The instructions below assume that the current directory is as described in the previous step,
38+
39+
```bash
40+
az deployment sub create --template-file ./cyclecloud-slurm-workspace/bicep/mainTemplate.bicep --parameters parameters.json --location [ANY AZURE LOCATION E.G. eastus] --name [OPTIONAL BUT HELPFUL, DELETE IF UNUSED]
41+
```
42+
43+
- Wait until the shell indicates that the deployment was successful. One can also track the progress of the deployment in the Azure Portal by navigating to the resource group indicated in the UI, selecting `Deployments` from the Settings dropdown menu on the left-hand side menu, and checking the Status of the Deployment Name that begins with “pid-” at the bottom of the displayed list.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: Plan your CycleCloud Workspace for Slurm Deployment
3+
description: A checklist to help plan for your CycleCloud Workspace for Slurm deployment
4+
author: xpillons
5+
ms.date: 08/22/2024
6+
ms.author: xpillons
7+
---
8+
9+
# Plan your CycleCloud Workspace for Slurm Deployment
10+
You can deploy either a greenfield environment in which all resources needed for Azure CycleCloud Workspace for Slurm will be provisioned for you or a brownfield deployment for which you will provide existing resources.
11+
12+
When doing a deployment, the Azure user account used need to be granted the following roles:
13+
- `Contributor` on the Subscription
14+
- `User Access Administrator` on the Subscription
15+
16+
## Greenfield Deployment
17+
18+
In a greenfield deployment, the following resources and role assignments will be created:
19+
- Resource Group
20+
- The Virtual Network, its subnets `ccw-cyclecloud-subnet`, and `ccw-compute-subnet`
21+
- The Virtual Machine `ccw-cyclecloud-vm`, NIC, OS, Data Disks, and a System Managed Identity
22+
- A uniquely named storage account for CycleCloud projects
23+
- Network Security Group named `nsg-ccw-common`
24+
- `Contributor`, `Storage Account Contributor`, and `Storage Blob Data Contributor` roles at the subscription level for the CycleCloud VM System Managed Identity
25+
- Optionally a Bastion, subnet `AzureBastionSubnet`, and public IP `bastion-pip`
26+
- Optionally a NAT gateway named `ccw-nat-gateway` and public IP `pip-ccw-nat-gateway`
27+
- Optionally an Azure NetApp Files account, pool, and volume with subnet `hpc-anf-subnet`
28+
- Optionally an Azure Managed Lustre Filesystem with subnet `ccw-lustre-subnet`
29+
- Optionally a VNET Peering
30+
- Optionally a Private Endpoint to an existing Azure Database for MySQL flexible server instance
31+
32+
## Brownfield Deployment
33+
You will be able to provide existing resources for:
34+
- The VNET and subnets in which the environment will be deployed
35+
- Filesystem Storage for the users's home directories and/or additional filers, as external NFS mount points or Azure Managed Lustre Filesystem
36+
- an Azure Database for MySQL flexible server instance for Slurm Job Accounting
37+
38+
If you bring your own VNET you have to follow these pre-requisistes:
39+
- a /29 **cyclecloud** subnet for the CycleCloud VM, with `Microsoft.Storage` Service Endpoint assigned,
40+
- a **compute** subnet for the nodes, with `Microsoft.Storage` Service Endpoint assigned. This is where the scheduler, login, and compute nodes will be created
41+
- when using Azure NetApp Files, a dedicated **netapp** subnet with the `Microsoft.NetApp/volumes` delegation as documented here [Azure NetApp Files](/azure/azure-netapp-files/azure-netapp-files-introduction).
42+
- when using Azure Managed Lustre Filesystem, a dedicated **lustre** subnet with a CIDR based on the storage capacity to provision as documented here [Azure Managed Lustre](/azure/azure-managed-lustre/amlfs-overview)
43+
- if deploying a Bastion, a dedicated **BastionSubnet** as documented [here](/azure/bastion/configuration-settings#subnet)
44+
- Your NSGs should allow communications between subnets as defined in the [bicep/network-new.bicep](https://github.com/Azure/cyclecloud-slurm-workspace/blob/main/bicep/network-new.bicep) file.
45+
46+
## Quotas
47+
Before deploying, ensure that your subscription has the required quota for the Virtual Machine types desired for CycleCloud nodes.

articles/cyclecloud/how-to/create-app-registration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,15 @@ ms.author: aevdokimova
5353

5454
At a minimum, add the following roles:
5555
![Basic roles required for CycleCloud](../images/entra_setup/entra21.png)
56-
56+
1. By default, the app registration issues access tokens v2.0, which are currently not supported by CycleCloud. To configure the issuing of tokens v1.0, you should select **Manifest**, locate the property **accessTokenAcceptedVersion** in the manifest, and change the value of that property to **null**. Once you changed the token version, select **Save**.
57+
![Manifest menu](../images/entra_setup/entra24.png)
5758
## Permissioning Users for CycleCloud
5859

5960
1. After you have create the required CycleCloud roles, you may add users and assign roles to them. To do this, navigate to the app’s **Enterprise Application** page. The easiest way to do it is via a helper link located on your App roles page
6061
![A shortcut to get to the Enterprise Application's role assignment window](../images/entra_setup/entra10.png)
6162
1. To add a user and assign a role, navigate to **Users and groups** page of the Enterprise Application and select **Add user/group**
6263
![Add a user/group menu](../images/entra_setup/entra11.png)
63-
1. On the **Add Assignment** page, select one or more users and the role (or roles) to be assigned to them. You can use a search bar to filter users (since only one app role was created in the screenshot, it is selected automatically – you might need to select a list of roles to assign in the same way you did users)
64+
1. On the **Add Assignment** page, select one or more users and the role to be assigned to them. You can use a search bar to filter users (since only one app role was created in the screenshot, it is selected automatically, but the menu for selecting it is similar to how you select users). Only one role can be assigned at a time, so, to add multiple roles to the same user, you will need to go through this process several times.
6465
![Add a role assignment selection](../images/entra_setup/entra12.png)
6566
![Add a role assignment completion](../images/entra_setup/entra13.png)
6667
1. After the role is assigned, the user should show up on the **User and groups** page – please note that assigning multiple roles to a single user will result in several entries for that user - one entry per role.

articles/cyclecloud/how-to/managed-identities.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ A sufficient policy for most CycleCloud features is posted below.
5656
"Microsoft.Compute/virtualMachineScaleSets/virtualMachines/*",
5757
"Microsoft.ManagedIdentity/userAssignedIdentities/*/assign/action",
5858
"Microsoft.MarketplaceOrdering/offertypes/publishers/offers/plans/agreements/read",
59+
"Microsoft.MarketplaceOrdering/offertypes/publishers/offers/plans/agreements/write",
5960
"Microsoft.Network/*/read",
6061
"Microsoft.Network/locations/*/read",
6162
"Microsoft.Network/networkInterfaces/read",

0 commit comments

Comments
 (0)