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

Update/azure automation state configuration #242

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 23 additions & 5 deletions solutions/azure-automation-state-configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,29 @@ These Azure Resource Manager (ARM) template samples deploy an Azure Automation a

## Deploy sample

Set environment

```bash
export LOCATION=eastus
export RESOURCEGROUP_BASE_NAME=rg-state-configuration
export RESOURCEGROUP=${RESOURCEGROUP_BASE_NAME}-${LOCATION}
```

Create a resource group for the deployment.

```azurecli-interactive
az group create --name state-configuration --location eastus
```bash
az group create --name ${RESOURCEGROUP} --location ${LOCATION}
```

Run the following command to initiate the deployment. If you would like to adjust the number of virtual machines deployed, update the *windowsVMCount* and *linuxVMCount* values.

```azurecli
az deployment group create --resource-group state-configuration \
--template-uri https://raw.githubusercontent.com/mspnp/samples/main/solutions/azure-automation-state-configuration/azuredeploy.json
```bash
curl -o azuredeploy.bicep https://raw.githubusercontent.com/mspnp/samples/main/solutions/azure-automation-state-configuration/azuredeploy.bicep

# Generate ssh key and get public data.
ssh-keygen -t rsa -b 2048

az deployment group create --resource-group ${RESOURCEGROUP} -f ./azuredeploy.bicep --parameters sshKey="$(cat ~/.ssh/id_rsa.pub)"
```

Once complete, click on the **Automation Account** resource and then **State configuration (DSC)** and notice that all virtual machines have been added to the system and are compliant. These machines have all had the PowerShell DSC configuration applied, which has installed a web server on each.
Expand Down Expand Up @@ -51,6 +63,12 @@ Browse to the public IP address of any virtual machine to verify that a web serv
| subnetName | string | Name for the subnet. | subnet |
| location | string | Deployment location. | resourceGroup().location |

## Clean Up

```bash
az group delete -n ${RESOURCEGROUP} -y
```

## Microsoft Open Source Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
Expand Down
Loading