ASDK에 대한 배포 후 구성

ASDK(Azure Stack Development Kit)를 설치한 후 ASDK 호스트 컴퓨터에서 AzureStack\AzureStackAdmin으로 로그인하는 동안 몇 가지 권장 배포 후 구성을 변경해야 합니다.

Azure Stack PowerShell 설치

Azure Stack을 사용하려면 Azure Stack 호환 Azure PowerShell 모듈이 필요합니다.

Azure Stack에 대한 PowerShell 명령은 PowerShell 갤러리 통해 설치됩니다. PSGallery 리포지토리를 등록하려면 관리자 권한 PowerShell 세션을 열고 다음 명령을 실행합니다.

Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted

API 버전 프로필을 사용하여 Azure Stack 호환 Az 모듈을 지정합니다. API 버전 프로필은 Azure와 Azure Stack 간의 버전 차이를 관리하는 방법을 제공합니다. API 버전 프로필은 특정 API 버전이 있는 Az PowerShell 모듈 집합입니다. PowerShell 갤러리 통해 사용할 수 있는 Az.BootStrapper 모듈은 API 버전 프로필을 사용하는 데 필요한 PowerShell cmdlet을 제공합니다.

ASDK 호스트 컴퓨터에 대한 인터넷 연결 여부에 관계없이 최신 Azure Stack PowerShell 모듈을 설치할 수 있습니다.

  1. Windows 컴퓨터에서 필수 구성 요소의 유효성을 검사합니다. 지침은 Windows의 필수 구성 요소를 참조하세요.
  2. 필요한 PowerShell 버전을 설치하기 전에 기존 Azure PowerShell 모듈을 제거해야 합니다.
  • ASDK 호스트 컴퓨터에서 인터넷 연결 사용: 다음 PowerShell 스크립트를 실행하여 ASDK 설치에 이러한 모듈을 설치합니다.
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

  Install-Module -Name Az.BootStrapper -Force
  Install-AzProfile -Profile 2020-09-01-hybrid -Force
  Install-Module -Name AzureStack -RequiredVersion 2.1.0

  Get-Module -Name "Az*" -ListAvailable
  Get-Module -Name "Azs*" -ListAvailable

설치에 성공하면 Az 및 AzureStack 모듈이 출력에 표시됩니다.

  • ASDK 호스트 컴퓨터에서 인터넷 연결이 없으면: 연결이 끊긴 시나리오에서는 먼저 다음 PowerShell 명령을 사용하여 인터넷에 연결된 컴퓨터에 PowerShell 모듈을 다운로드해야 합니다.
$Path = "<Path that is used to save the packages>"

Save-Package `
  -ProviderName NuGet -Source https://www.powershellgallery.com/api/v2 -Name Az -Path $Path -Force -RequiredVersion 1.10.0

Save-Package `
  -ProviderName NuGet -Source https://www.powershellgallery.com/api/v2 -Name AzureStack -Path $Path -Force -RequiredVersion 2.1.0

다음으로, 다운로드한 패키지를 ASDK 컴퓨터에 복사하고 위치를 기본 리포지토리로 등록하고 이 리포지토리에서 Az 및 AzureStack 모듈을 설치합니다.

$SourceLocation = "<Location on the development kit that contains the PowerShell packages>"
$RepoName = "MyNuGetSource"

Register-PSRepository -Name $RepoName -SourceLocation $SourceLocation -InstallationPolicy Trusted

Install-Module Az -Repository $RepoName

Install-Module AzureStack -Repository $RepoName

Azure Stack 도구 다운로드

AzureStack-Tools 는 리소스를 관리하고 Azure Stack에 배포하기 위한 PowerShell 모듈을 호스트하는 GitHub 리포지토리입니다. Az PowerShell 모듈 또는 AzureRM 모듈을 사용하여 도구를 사용합니다.

이러한 도구를 가져오려면 분기에서 GitHub 리포지토리를 az 복제하거나 다음 스크립트를 실행하여 AzureStack-Tools 폴더를 다운로드합니다.

# Change directory to the root directory.
cd \

# Download the tools archive.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
invoke-webrequest `
  https://github.com/Azure/AzureStack-Tools/archive/az.zip `
  -OutFile az.zip

# Expand the downloaded files.
expand-archive az.zip `
  -DestinationPath . `
  -Force

# Change to the tools directory.
cd AzureStack-Tools-az

ASDK 설치 유효성 검사

ASDK 배포가 성공했는지 확인하려면 다음 단계에 따라 Test-AzureStack cmdlet을 사용합니다.

  1. ASDK 호스트 컴퓨터에서 AzureStack\AzureStackAdmin으로 로그인합니다.
  2. 관리자 권한으로 PowerShell을 엽니다(PowerShell ISE 아님).
  3. Enter-PSSession -ComputerName AzS-ERCS01 -ConfigurationName PrivilegedEndpoint를 실행합니다.
  4. Test-AzureStack를 실행합니다.

테스트를 완료하는 데 몇 분 정도 걸립니다. 설치에 성공한 경우 출력은 다음과 같습니다.

Azure Stack 테스트 - 설치 성공

오류가 발생한 경우 문제 해결 단계에 따라 도움을 받으세요.

다중 테넌트 사용

Microsoft Entra ID를 사용하는 배포의 경우 ASDK 설치에 다중 테넌시를 사용하도록 설정해야 합니다.

참고

Azure Stack을 등록하는 데 사용되는 도메인 이외의 도메인의 관리자 또는 사용자 계정을 사용하여 Azure Stack 포털에 로그인하는 경우 Azure Stack을 등록하는 데 사용되는 도메인 이름을 포털 URL에 추가해야 합니다. 예를 들어 Azure Stack이 fabrikam.onmicrosoft.com 등록되어 있고 사용자 계정 로그인이 admin@contoso.com인 경우 사용자 포털에 로그인하는 데 사용할 URL은 다음과 같습니다. https://portal.local.azurestack.external/fabrikam.onmicrosoft.com.

다음 단계

Azure에 ASDK 등록