This repo is a Collection of scripts to run after AzureStack ASDK Installations The Idea is to have base components/logins stored in a json template and credentials stored in session variables. The Consistent Approach allws you to "Bootstrap" your Shell session with the 99_bootstrap script(s) The Bootstrap Scripts wll read the user / admin json files having envronment data stored from the Homedirectory
ALL SCRIPTS IN THE REPO NOT MENTIONED HERE ARE STILL IN TRANSITIONING FROM MY YOLD TOOLS AND NOT TESTED
to install the Azuer Stack Kickstart, simply type in
install-script azurestack-kickstart -Scope CurrentUser -Force
Azurestack-Kickstart.ps1
the command will run itsself in elevated Mode and will:
- disable updates
- Install GitSCM, Chrome and Shortcuts for the Portals
- Clone into Azuerstack-Kickstart Distro
Once finished, CD into Azurestack-DSC. create an admin.json file in your Homedirectory ( copy the admin.json.example fro the root of the distro as reference)
{
"Domain": "azurestack",
"VMPassword": "Password123!",
"VMuser": "azureuser",
"TenantName": "contoso.onmicrosoft.com",
"subscriptionID": "8c21cadc-9e41-459e-bf4b-919aa2fad975",
"SubscriptionOwner": "Administrator@contoso.com.com",
"PrivilegedEndpoint": "azs-ercs01.azurestack.local",
"serviceuser": "masadmin",
"cloudadmin": "cloudadmin",
"AZSTools_Location": "D:\\AzureStack-Tools",
"AzureRMProfile": "2017-03-09-profile",
"AzureSTackModuleVersion": "1.2.11",
"KeyvaultDnsSuffix": "adminvault.local.azurestack.external",
"ArmEndpoint": "https://adminmanagement.local.azurestack.external",
"location": "local",
"SQLRPadmin": "SQLRPadmin",
"MySQLRPadmin": "MySQLRPadmin",
"ISOpath": "D:\\ISO",
"Updatepath": "D:\\Updates"
}
To set the initial stack configuration and install Powershell Modules run:
D:\azurestack-dsc\admin\03_initial_stack.ps1
The Command will run itself in elevated Mode ![image]
this task can be repeated at any time to update the AzureStack Powershell environment
D:\azurestack-dsc\admin\06_register_stack.ps1
this will use your setiings from admin.json to register your azurestack
we have to load now our admin environment
D:\azurestack-dsc\admin\99_bootstrap.ps1
D:\azurestack-dsc\admin\10_deploy_base_plans_and_quotas.ps1
this needs to run in an Admin Session ...
D:\azurestack-dsc\admin\99_bootstrap.ps1
D:\azurestack-dsc\admin\11_deploy_windows_marketplace_image.ps1
you can create Bulk Marketplace Images by using:
$KB = (get-content D:\azurestack-dsc\admin\windowsupdate.json | ConvertFrom-Json) | Sort-Object -Property Date | Select-Object KB | Where-Object KB -ne ""
$KB | D:\azurestack-dsc\admin\11_deploy_windows_marketplace_image.ps1 -ISOPath 'D:\updates\' -UpdatePath D:\updates\
this will batch create Marketplace Items for All Windows Server 2016 KB´s listed in the included windowsupdate.json
the process is
- checking if SKU and Version already in Marketplace
- eval the Steps
- download updates if not available
- clean up orphan vhd / cab files
the msu files remain in the $updatepath
{
"Domain": "azurestack",
"VMuser": "azureuser",
"VMPassword": "Password123!",
"TenantName": "contoso.onmicrosoft.com",
"azsuser": "azsuser1",
"cloudadmin": "cloudadmin",
"AZSTools_Location": "D:\\AzureStack-Tools",
"AzureRMProfile": "2017-03-09-profile",
"AzureSTackModuleVersion": "1.2.11",
"KeyvaultDnsSuffix": "adminvault.local.azurestack.external",
"ArmEndpoint": "https://management.local.azurestack.external",
"StackIP": "10.204.16.82"
}
once the use has created his config file, he can bootstrap from his powershell to get permanent variables in the session.
.\user\99_bootstrap_user.ps1
If the Cloudadmin has provided differnt osImageSKU´s from above, we can
PS C:\Users\bottk\Azurestack-dsc> .\user\60_new-azsserver2016vmss.ps1 -vmssName myssdemo -osImageSkuVersion 14393.729.20170130
This creates a new vmscaleset with the os image version 14393.729.20170130
we can verify the properties of the scaleset :