Merge branch 'vnext' into master

This commit is contained in:
Krishna Nithin 2018-01-06 16:34:09 -08:00 коммит произвёл GitHub
Родитель 291d069870 654c8f6548
Коммит 42574e9f37
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 53 добавлений и 8 удалений

Просмотреть файл

@ -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 "<Tenant Admin username>", (ConvertTo-SecureString "<Tenant Admin password>" -AsPlainText -Force)
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Service Admin username>", (ConvertTo-SecureString "<Service Admin password>" -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 "<Tenant Admin password>" -AsPlainText -Force)
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "serviceadmin@contoso.com", (ConvertTo-SecureString "<Service Admin password>" -AsPlainText -Force)
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds
```
@ -30,11 +31,30 @@ $ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Ser
# 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 "<Tenant Admin username>", (ConvertTo-SecureString "<Tenant Admin password>" -AsPlainText -Force)
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Service Admin username>", (ConvertTo-SecureString "<Service Admin password>" -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 "<Tenant Admin password>" -AsPlainText -Force)
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "serviceadmin@contoso.com", (ConvertTo-SecureString "<Service Admin password>" -AsPlainText -Force)
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds -WindowsISOPath "<path where the WS2016 ISO is present>"
```
## 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 = "<Tenant Admin password>"
$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 "<Service Admin password>" -AsPlainText -Force)
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -TenantAdminObjectID $tenantAdminObjectId -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds
```
## NOTE:
While running Canary make sure to pass the usernames in the format: user@domain.com
## To list the usecases in Canary

Просмотреть файл

@ -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(

Просмотреть файл

@ -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

Просмотреть файл

@ -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.

Просмотреть файл

@ -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.