diff --git a/CanaryValidator/README.md b/CanaryValidator/README.md index dcd340d..1b7da47 100644 --- a/CanaryValidator/README.md +++ b/CanaryValidator/README.md @@ -18,8 +18,9 @@ Set-Location -Path ".\AzureStack-Tools-master\CanaryValidator" -PassThru # Install-Module -Name 'AzureRm.Bootstrapper' # Install-AzureRmProfile -profile '2017-03-09-profile' -Force # Install-Module -Name AzureStack -RequiredVersion 1.2.11 -$TenantAdminCreds = New-Object System.Management.Automation.PSCredential "", (ConvertTo-SecureString "" -AsPlainText -Force) -$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "", (ConvertTo-SecureString "" -AsPlainText -Force) +# $TenantID = To retrieve the TenantID if not available already, you can use Get-AzureStackStampInformation cmdlet Using the privileged endpoint in Azure Stack. https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-privileged-endpoint +$TenantAdminCreds = New-Object System.Management.Automation.PSCredential "tenantadminuser@contoso.com", (ConvertTo-SecureString "" -AsPlainText -Force) +$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "serviceadmin@contoso.com", (ConvertTo-SecureString "" -AsPlainText -Force) .\Canary.Tests.ps1 -TenantID "" -AdminArmEndpoint "" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "" -TenantAdminCredentials $TenantAdminCreds ``` @@ -30,11 +31,30 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "", (ConvertTo-SecureString "" -AsPlainText -Force) -$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "", (ConvertTo-SecureString "" -AsPlainText -Force) +# $TenantID = To retrieve the TenantID if not available already, you can use Get-AzureStackStampInformation cmdlet Using the privileged endpoint in Azure Stack. https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-privileged-endpoint +$TenantAdminCreds = New-Object System.Management.Automation.PSCredential "tenantadminuser@contoso.com", (ConvertTo-SecureString "" -AsPlainText -Force) +$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "serviceadmin@contoso.com", (ConvertTo-SecureString "" -AsPlainText -Force) .\Canary.Tests.ps1 -TenantID "" -AdminArmEndpoint "" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "" -TenantAdminCredentials $TenantAdminCreds -WindowsISOPath "" ``` -## NOTE: When running Canary against ADFS environment, please make sure to pass in the TenantAdminObjectId parameter +## To execute Canary as Tenant Administrator (In ADFS disconnected scenario) +Install Azure PowerShell - To install Azure PowerShell in a disconnected or a partially connected senario, follow the instructions @ https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-powershell-install?view=azurestackps-1.2.9&toc=%2fpowershell%2fmodule%2ftoc.json%3fview%3dazurestackps-1.2.9&view=azurestackps-1.2.9#install-powershell-in-a-disconnected-or-in-a-partially-connected-scenario +```powershell +# TenantID = To retrieve the TenantID if not available already, you can use Get-AzureStackStampInformation cmdlet Using the privileged endpoint in Azure Stack. https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-privileged-endpoint + +# If there is no tenant user available, you can create one and use it as shown below + +$tenantAdminUserName = "TenantAdminUser" +$tenantAdminPassword = "" +$tenantAdminAccount = New-ADUser -Name $tenantAdminUserName -UserPrincipalName "$tenantAdminUserName@$env:USERDNSDOMAIN" -AccountPassword $tenantAdminPassword -ChangePasswordAtLogin $false -Enabled $true -PasswordNeverExpires $true -PassThru +$tenantAdminUpn = $tenantAdminAccount.UserPrincipalName +$tenantAdminObjectId = $tenantAdminAccount.SID.Value +$TenantAdminCreds = New-Object System.Management.Automation.PSCredential $tenantAdminUpn, (ConvertTo-SecureString $tenantAdminPassword -AsPlainText -Force) +$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "ServiceAdmin@contoso.com", (ConvertTo-SecureString "" -AsPlainText -Force) +.\Canary.Tests.ps1 -TenantID "" -TenantAdminObjectID $tenantAdminObjectId -AdminArmEndpoint "" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "" -TenantAdminCredentials $TenantAdminCreds +``` + +## NOTE: +While running Canary make sure to pass the usernames in the format: user@domain.com ## To list the usecases in Canary diff --git a/Infrastructure/AzureStack.Infra.psm1 b/Infrastructure/AzureStack.Infra.psm1 index 17d6c14..c68d007 100644 --- a/Infrastructure/AzureStack.Infra.psm1 +++ b/Infrastructure/AzureStack.Infra.psm1 @@ -899,6 +899,19 @@ function Set-AzSBackupShare { Export-ModuleMember -Function Set-AzSBackupShare +<# + .SYNOPSIS + Generate encryption key for infrastructure backups +#> +function New-EncryptionKeyBase64 { + $tempEncryptionKeyString = "" + foreach($i in 1..64) { $tempEncryptionKeyString += -join ((65..90) + (97..122) | Get-Random | % {[char]$_}) } + $tempEncryptionKeyBytes = [System.Text.Encoding]::UTF8.GetBytes($tempEncryptionKeyString) + $BackupEncryptionKeyBase64 = [System.Convert]::ToBase64String($tempEncryptionKeyBytes) + $BackupEncryptionKeyBase64 +} + +Export-ModuleMember -Function New-EncryptionKeyBase64 function Invoke-AzsInfrastructureAction { param( diff --git a/Support/AzS_PoSh/ReadMe.md b/Support/AzS_PoSh/ReadMe.md index 1b39cd8..815f9e9 100644 --- a/Support/AzS_PoSh/ReadMe.md +++ b/Support/AzS_PoSh/ReadMe.md @@ -1,6 +1,6 @@ # AzS-PoSh-Environment.ps1 # -![](https://github.com/Azure/AzureStack-Tools/blob/vnext/Support/AzS_PoSh/Media/AzsPoSh.gif?raw=true) +![](https://github.com/Azure/AzureStack-Tools/blob/master/Support/AzS_PoSh/Media/AzsPoSh.gif?raw=true) Script to setup AzureStack PowerShell Enviroment diff --git a/Support/ERCS_Logs/ReadMe.md b/Support/ERCS_Logs/ReadMe.md index e07b9de..e72aeca 100644 --- a/Support/ERCS_Logs/ReadMe.md +++ b/Support/ERCS_Logs/ReadMe.md @@ -2,7 +2,7 @@ ![](https://github.com/Azure/AzureStack-Tools/blob/vnext/Support/ERCS_Logs/Media/ERCS.gif?raw=true) - Built to be run on the HLH or DVM from an administrative powershell session the script uses seven methods to find the privileged endpoint virtual machines. The script connects to selected privileged endpoint and runs Get-AzureStackLog with supplied parameters. If no parameters are supplied the script will default to prompting user via GUI for needed parameters. + Built to be run on the HLH, DVM, or Jumpbox from an administrative powershell session the script uses seven methods to find the privileged endpoint virtual machines. The script connects to selected privileged endpoint and runs Get-AzureStackLog with supplied parameters. If no parameters are supplied the script will default to prompting user via GUI for needed parameters. The script will use one of the below seven methods; Gather requested logs, Transcript, and AzureStackStampInformation.json. The script will also save AzureStackStampInformation.json in %ProgramData% and in created log folder. AzureStackStampInformation.json in %ProgramData% allows future runs to have ERCS IP information populated at beginning of script. diff --git a/Syndication/readme.md b/Syndication/readme.md index 76d6d9c..7829371 100644 --- a/Syndication/readme.md +++ b/Syndication/readme.md @@ -12,8 +12,10 @@ The downloaded needs to transferred to machine with has connectivity to the Azur ## Requirements - Azure Stack RP registered within your Azure Subscription + - Azure Subscription used to register Azure Stack System (Multi Node or ASDK) - AzureRM 1.2.11 PowerShell needs to be installed + (https://docs.microsoft.com/en-us/azure/azure-stack/azure-stack-powershell-configure-quickstart) @@ -26,6 +28,7 @@ Import-Module .\AzureStack.MarketplaceSyndication.psm1 ## Launch the Tool ```powershell Sync-AzSOfflineMarketplaceItem -destination c:\donwloadfolder -AzureTenantID "Value" -AzureSubscriptionID "SubsciptionID" + ``` ## Optional Parameters @@ -34,9 +37,18 @@ Parameter: Cloud Default: AzureCloud -Description: Once Azure Stack RP is available in other Clouds you can specify which one to use +Description: Once Azure Stack RP is available in other Clouds like Azure China you can specify which one to use +Parameter: AzureTenantID + +Description: Specify the Azure Tenant ID for Authentication + + +Parameter: SubscriptionID + +Description: Specify the Azure Subscription ID for Authentication when having multiple subscriptions + ## Importing into Azure Stack Once the download has been transferred to a machine that can access Azure Stack, you need to import the VHD and publish the Gallery Item.