Skip to content

Commit

Permalink
Merge projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ned1313 committed Feb 8, 2018
1 parent 4bd515b commit f3f9e38
Show file tree
Hide file tree
Showing 16 changed files with 584 additions and 157 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Compiled files
*.tfstate
*.tfstate.backup
*.tfplan

# Module directory
.terraform/

#tfvars files
*.tfvars

102 changes: 102 additions & 0 deletions DSC/AzureStackonAzure.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
Configuration AzureStackonAzure {
Import-DscResource -ModuleName PsDesiredStateConfiguration

Node 'localhost' {

WindowsFeature HyperV {
Ensure = "Present"
Name = "Hyper-V"
}

WindowsFeature HyperVTools {
Ensure = "Present"
Name = "RSAT-Hyper-V-Tools"
IncludeAllSubFeature = $true
}

WindowsFeature ADPowershellTools {
Ensure = "Present"
Name = "RSAT-AD-PowerShell"
IncludeAllSubFeature = $true
}

WindowsFeature ADDSTools {
Ensure = "Present"
Name = "RSAT-ADDS"
IncludeAllSubFeature = $true
}

WindowsFeature Failover-Clustering {
Ensure = "Present"
Name = "Failover-Clustering"
}

WindowsFeature Web-Server {
Ensure = "Present"
Name = "Web-Server"
}

WindowsFeature RSAT-Clustering {
Ensure = "Present"
Name = "RSAT-Clustering"
IncludeAllSubFeature = $true
}

WindowsFeature FS-FileServer {
Ensure = "Present"
Name = "FS-FileServer"
}

WindowsFeature Storage-Services {
Ensure = "Present"
Name = "Storage-Services"
}

WindowsFeature Web-Mgmt-Console {
Ensure = "Present"
Name = "Web-Mgmt-Console"
}

WindowsFeature Web-Scripting-Tools {
Ensure = "Present"
Name = "Web-Scripting-Tools"
}

WindowsFeature GPMC {
Ensure = "Present"
Name = "GPMC"
}

File DefaultLocalPath {
Ensure = "Present"
Type = "Directory"
DestinationPath = "C:\AzureStackOnAzureVM"
}

File Install-ADSK {
Ensure = "Present"
SourcePath = "https://raw.githubusercontent.com/ned1313/AzureStack-VM-PoC/master/scripts/Install-ASDK.ps1"
DestinationPath = "C:\AzureStackOnAzureVM\Install-ASDK.ps1"
}

File ASDKCompanionService {
Ensure = "Present"
SourcePath = "https://raw.githubusercontent.com/ned1313/AzureStack-VM-PoC/master/scripts/ASDKCompanionService.ps1"
DestinationPath = "C:\AzureStackOnAzureVM\ASDKCompanionService.ps1"
}

}
}

[DSCLocalConfigurationManager()]
configuration LCMConfig
{
Node localhost
{
Settings
{
ActionAfterReboot = 'ContinueConfiguration'
RebootNodeIfNeeded = $true
}
}
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Ned Bellavance

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
57 changes: 57 additions & 0 deletions RPs/MSSQL/MSSQLDeploy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
param(
$VMName = "MSSQL01",
$AdminUserName = "mssqladmin",
$ResourceGroupName = "MSSQL",
$ArmEndpoint = "https://adminmanagement.local.azurestack.external",
[Parameter(Mandatory=$true)]
[System.Management.Automation.PSCredential] $AzureStackAdmin,
[Parameter(Mandatory=$true)]
[System.Management.Automation.PSCredential] $cloudAdminCreds
)

$MSSQLCredentials = Get-Credential -UserName $AdminUserName -Message "Credentials for MSSQL admin user"

Add-AzureRMEnvironment `
-Name "AzureStackAdmin" `
-ArmEndpoint $ArmEndpoint

Add-AzureRmAccount -Environment "AzureStackAdmin" -Credential $AzureStackAdmin

New-AzureRmResourceGroup -Name $ResourceGroupName -Location local -Force

$deployment = New-AzureRmResourceGroupDeployment -Name $ResourceGroupName `
-ResourceGroupName $ResourceGroupName -Mode Incremental `
-TemplateFile .\azuredeploy.json `
-TemplateParameterObject @{"vmName"=$VMName;"adminUsername"=$AdminUserName;"adminPassword"=$MSSQLCredentials.Password;"sqlAuthenticationLogin"=$AdminUserName;"sqlAuthenticationPassword"=$MSSQLCredentials.Password}

Invoke-WebRequest -Uri https://aka.ms/azurestacksqlrp1712 -OutFile C:\AzureStackOnAzureVM\QuickStart\MSSQL\AzureStack.MSSQL.RP.zip

Expand-Archive -Path C:\AzureStackOnAzureVM\QuickStart\MSSQL\AzureStack.MSSQL.RP.zip

# Use the NetBIOS name for the Azure Stack domain. On the Azure Stack SDK, the default is AzureStack and the default prefix is AzS.
# For integrated systems, the domain and the prefix are the same.
$domain = "AzureStack"
$prefix = "AzS"
$privilegedEndpoint = "$prefix-ERCS01"

# Point to the directory where the resource provider installation files were extracted.
$tempDir = 'C:\AzureStackOnAzureVM\QuickStart\MSSQL\AzureStack.MSSQL.RP'

# Set credentials for the new Resource Provider VM.
$vmLocalAdminPass = ConvertTo-SecureString "P@ssw0rd1" -AsPlainText -Force
$vmLocalAdminCreds = New-Object System.Management.Automation.PSCredential ("sqlrpadmin", $vmLocalAdminPass)

# Change the following as appropriate.
$PfxPass = ConvertTo-SecureString "P@ssw0rd1" -AsPlainText -Force

# Change directory to the folder where you extracted the installation files.
# Then adjust the endpoints.
. $tempDir\DeploySQLProvider.ps1 -AzCredential $AzureStackAdmin `
-VMLocalCredential $vmLocalAdminCreds `
-CloudAdminCredential $cloudAdminCreds `
-PrivilegedEndpoint $privilegedEndpoint `
-DefaultSSLCertificatePassword $PfxPass `
-DependencyFilesLocalPath $tempDir\cert



Loading

0 comments on commit f3f9e38

Please sign in to comment.