Skip to content

Commit

Permalink
Merge pull request #2587 from sebassem/arcbox_3.0
Browse files Browse the repository at this point in the history
Arcbox 3.0 updates
  • Loading branch information
janegilring authored Jul 1, 2024
2 parents 6b83add + d1450e8 commit 9263783
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 18 deletions.
4 changes: 2 additions & 2 deletions azure_jumpstart_arcbox/artifacts/ArcServersLogonScript.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$Env:ArcBoxDir = "C:\ArcBox"
$Env:ArcBoxLogsDir = "$Env:ArcBoxDir\Logs"
$Env:ArcBoxVMDir = "$Env:ArcBoxDir\Virtual Machines"
$Env:ArcBoxVMDir = "F:\Virtual Machines"
$Env:ArcBoxIconDir = "$Env:ArcBoxDir\Icons"
$Env:ArcBoxTestsDir = "$Env:ArcBoxDir\Tests"
$agentScript = "$Env:ArcBoxDir\agentScript"
Expand Down Expand Up @@ -156,7 +156,7 @@ if ($Env:flavor -ne "DevOps") {
$Env:AZCOPY_BUFFER_GB = 4
# Other ArcBox flavors does not have an azcopy network throughput capping
Write-Output "Downloading nested VMs VHDX file for SQL. This can take some time, hold tight..."
azcopy cp $vhdSourceFolder --include-pattern "${SQLvmName}.vhdx" $Env:ArcBoxVMDir --check-length=false --cap-mbps 1200 --log-level=ERROR
azcopy cp $vhdSourceFolder --include-pattern "${SQLvmName}.vhdx" $Env:ArcBoxVMDir --check-length=false --log-level=ERROR
}

# Create the nested VMs if not already created
Expand Down
10 changes: 9 additions & 1 deletion azure_jumpstart_arcbox/artifacts/Bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,20 @@ param (

[System.Environment]::SetEnvironmentVariable('ArcBoxDir', "C:\ArcBox", [System.EnvironmentVariableTarget]::Machine)

# Formatting VMs disk
$disk = (Get-Disk | Where-Object partitionstyle -eq 'raw')[0]
$driveLetter = "F"
$label = "VMsDisk"
$disk | Initialize-Disk -PartitionStyle MBR -PassThru | `
New-Partition -UseMaximumSize -DriveLetter $driveLetter | `
Format-Volume -FileSystem NTFS -NewFileSystemLabel $label -Confirm:$false -Force

# Creating ArcBox path
Write-Output "Creating ArcBox path"
$Env:ArcBoxDir = "C:\ArcBox"
$Env:ArcBoxDscDir = "$Env:ArcBoxDir\DSC"
$Env:ArcBoxLogsDir = "$Env:ArcBoxDir\Logs"
$Env:ArcBoxVMDir = "$Env:ArcBoxDir\Virtual Machines"
$Env:ArcBoxVMDir = "F:\Virtual Machines"
$Env:ArcBoxKVDir = "$Env:ArcBoxDir\KeyVault"
$Env:ArcBoxGitOpsDir = "$Env:ArcBoxDir\GitOps"
$Env:ArcBoxIconDir = "$Env:ArcBoxDir\Icons"
Expand Down
2 changes: 1 addition & 1 deletion azure_jumpstart_arcbox/artifacts/DataOpsLogonScript.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$Env:ArcBoxDir = "C:\ArcBox"
$Env:ArcBoxLogsDir = "C:\ArcBox\Logs"
$Env:ArcBoxVMDir = "$Env:ArcBoxDir\Virtual Machines"
$Env:ArcBoxVMDir = "F:\Virtual Machines"
$Env:ArcBoxIconDir = "C:\ArcBox\Icons"
$Env:ArcBoxTestsDir = "$Env:ArcBoxDir\Tests"

Expand Down
6 changes: 3 additions & 3 deletions azure_jumpstart_arcbox/artifacts/dsc/itpro.dsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ properties:

resources:
- resource: Microsoft.WinGet.DSC/WinGetPackage
id: terraform
id: 7zip
directives:
description: Install Terraform
description: Install 7zip
settings:
id: Hashicorp.Terraform
id: 7zip.7zip
source: winget
configurationVersion: 0.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ properties:
settings:
Name: ArcBox-Win2K19
SwitchName: 'InternalNATSwitch'
VhdPath: C:\ArcBox\Virtual Machines\ArcBox-Win2K19.vhdx
VhdPath: F:\Virtual Machines\ArcBox-Win2K19.vhdx
ProcessorCount: 2
StartupMemory: '12GB'
RestartIfNeeded: true
State: Running
Generation: 2
Path: C:\ArcBox\Virtual Machines
Path: F:\Virtual Machines
EnableGuestService: true
SecureBoot: true
- resource: HyperVDsc/VMHyperV
Expand All @@ -25,13 +25,13 @@ properties:
settings:
Name: ArcBox-Win2K22
SwitchName: 'InternalNATSwitch'
VhdPath: C:\ArcBox\Virtual Machines\ArcBox-Win2K22.vhdx
VhdPath: F:\Virtual Machines\ArcBox-Win2K22.vhdx
ProcessorCount: 2
StartupMemory: '12GB'
RestartIfNeeded: true
State: Running
Generation: 2
Path: C:\ArcBox\Virtual Machines
Path: F:\Virtual Machines
EnableGuestService: true
SecureBoot: true
- resource: HyperVDsc/VMHyperV
Expand All @@ -41,13 +41,13 @@ properties:
settings:
Name: ArcBox-Ubuntu-01
SwitchName: 'InternalNATSwitch'
VhdPath: C:\ArcBox\Virtual Machines\ArcBox-Ubuntu-01.vhdx
VhdPath: F:\Virtual Machines\ArcBox-Ubuntu-01.vhdx
ProcessorCount: 2
StartupMemory: '4GB'
RestartIfNeeded: true
State: Running
Generation: 2
Path: C:\ArcBox\Virtual Machines
Path: F:\Virtual Machines
EnableGuestService: true
SecureBoot: false
- resource: HyperVDsc/VMHyperV
Expand All @@ -57,13 +57,13 @@ properties:
settings:
Name: ArcBox-Ubuntu-02
SwitchName: 'InternalNATSwitch'
VhdPath: C:\ArcBox\Virtual Machines\ArcBox-Ubuntu-02.vhdx
VhdPath: F:\Virtual Machines\ArcBox-Ubuntu-02.vhdx
ProcessorCount: 2
StartupMemory: '4GB'
RestartIfNeeded: true
State: Running
Generation: 2
Path: C:\ArcBox\Virtual Machines
Path: F:\Virtual Machines
EnableGuestService: true
SecureBoot: false
configurationVersion: 0.2.0
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ properties:
settings:
Name: ArcBox-SQL
SwitchName: 'InternalNATSwitch'
VhdPath: C:\ArcBox\Virtual Machines\ArcBox-SQL.vhdx
VhdPath: F:\Virtual Machines\ArcBox-SQL.vhdx
ProcessorCount: 2
StartupMemory: '12GB'
RestartIfNeeded: true
State: Running
Generation: 2
Path: C:\ArcBox\Virtual Machines
Path: F:\Virtual Machines
EnableGuestService: true
SecureBoot: true
configurationVersion: 0.2.0
26 changes: 26 additions & 0 deletions azure_jumpstart_arcbox/bicep/clientVm/clientVm.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ param addsDomainName string = 'jumpstart.local'
@description('The custom location RPO ID')
param customLocationRPOID string

@description('The SKU of the VMs disk')
param vmsDiskSku string = 'Premium_LRS'

var bastionName = 'ArcBox-Bastion'
var publicIpAddressName = deployBastion == false ? '${vmName}-PIP' : '${bastionName}-PIP'
Expand Down Expand Up @@ -146,6 +148,21 @@ resource publicIpAddress 'Microsoft.Network/publicIpAddresses@2022-01-01' = if (
}
}

resource vmDisk 'Microsoft.Compute/disks@2023-04-02' = {
location: location
name: '${vmName}-VMsDisk'
sku: {
name: vmsDiskSku
}
properties: {
creationData: {
createOption: 'Empty'
}
diskSizeGB: 1024
burstingEnabled: true
}
}

resource vm 'Microsoft.Compute/virtualMachines@2022-03-01' = {
name: vmName
location: location
Expand Down Expand Up @@ -173,6 +190,15 @@ resource vm 'Microsoft.Compute/virtualMachines@2022-03-01' = {
sku: windowsOSVersion
version: 'latest'
}
dataDisks: [
{
createOption: 'Attach'
lun: 0
managedDisk: {
id: vmDisk.id
}
}
]
}
networkProfile: {
networkInterfaces: [
Expand Down
2 changes: 1 addition & 1 deletion azure_jumpstart_arcbox/bicep/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module ubuntuRancherK3sDataSvcNodesDeployment 'kubernetes/ubuntuRancherNodes.bic
subnetId: mgmtArtifactsAndPolicyDeployment.outputs.subnetId
azureLocation: location
flavor: flavor
vmName : '${k3sArcDataClusterName}-Node-0${i}'
vmName : '${k3sArcDataClusterName}-Node-0${i}'
storageContainerName: toLower(k3sArcDataClusterName)
}
dependsOn: [
Expand Down

0 comments on commit 9263783

Please sign in to comment.