Skip to content
Permalink
Browse files

0.9.5.3

Added random number element to Proxy VM and Machine Name to allow overlapping instances to be run (allowing for future DHCP support) and not have conflicts.
  • Loading branch information...
anthonyspiteri committed Oct 6, 2019
1 parent 1b508c8 commit 97e615e37cc06d1c3c87ee1443c4b6f4040cbedc
@@ -32,7 +32,7 @@ There is a master PowerShell script that executes all the code as does the follo
* Should be run from VBR Server to ensure Console Versions are compatible
* Require Execution Policy set to Bypass - Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

#### Version 0.9.5.2
#### Version 0.9.5.3
> 0.2 - First pre release for testing
> 0.4 - Added support for Linux Server to be added and removed to VBR Inventory in preperation for v10 Proxy PowerShell
@@ -49,6 +49,8 @@ There is a master PowerShell script that executes all the code as does the follo
> 0.9.5.2 - Added error checking for Proxy Server VBR configuration when adding managed server
> 0.9.5.3 - Added random number element to Proxy VM and Machine Name to allow overlapping instances to be run (allowing for future DHCP support) and not have conflicts.
## Getting Started

Ensure all configuration variables are set as per requirements and as per below.
@@ -123,7 +125,6 @@ The following variables can be adjusted dependant on installation vSphere platfo

vsphere_datacenter = "VC03"
vsphere_vm_folder = "TPM03-AS"
vsphere_vm_name = "VBR-PROXY-"
vsphere_vm_resource_pool ="TPM03-AS"
vsphere_vm_template = "TPM03-AS/WIN2K19-TEST"
vsphere_vm_firmware = "efi"
@@ -145,11 +146,10 @@ The following variables can be adjusted dependant on installation vSphere platfo

### VM specifications Windows (proxy_linux)

The following variables can be adjusted dependant on installation vSphere platform. The ones to look out for that could cause issues is the vm_firmware and vm_tags variables. The vm_template and vm_firmware need to be noted depending on Windows or Linux configuration.
The following variables can be adjusted dependant on installation vSphere platform. The ones to look out for that could cause issues is the vm_firmware and vm_tags variables. The vm_firmware need to be noted depending on Windows or Linux configuration.

vsphere_datacenter = "VC03"
vsphere_vm_folder = "TPM03-AS"
vsphere_vm_name = "VBR-PROXY-"
vsphere_vm_resource_pool ="TPM03-AS"
vsphere_vm_firmware = "bios"
vsphere_cluster = "MEGA-03"
@@ -41,3 +41,10 @@ data "vsphere_tag" "tag" {
name = "${var.vsphere_tag_name}"
category_id = "${data.vsphere_tag_category.category.id}"
}
provider "random" {
version="2.0"
}
resource "random_integer" "priority" {
min = 10
max = 99
}
@@ -7,7 +7,7 @@
resource "vsphere_virtual_machine" "VBR-PROXY" {
# VM placement #
count = "${var.vsphere_proxy_number}"
name = "${var.vsphere_vm_name}L${count.index + 1}"
name = "${var.vsphere_vm_name}-L${random_integer.priority.result}-${count.index + 1}"
resource_pool_id = "${data.vsphere_resource_pool.resource_pool.id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
folder = "${var.vsphere_vm_folder}"
@@ -38,7 +38,7 @@ resource "vsphere_virtual_machine" "VBR-PROXY" {

customize {
linux_options {
host_name = "${var.vsphere_vm_name}L${count.index + 1}"
host_name = "${var.vsphere_vm_name}-L${random_integer.priority.result}-${count.index + 1}"
domain = "${var.vsphere_domain}"
#time_zone = "${var.vsphere_time_zone}"
}
@@ -12,7 +12,6 @@ vsphere_ad_password = "password$12"
# VM specifications
vsphere_datacenter = "VC03"
vsphere_vm_folder = "TPM03-AS"
vsphere_vm_name = "VBR-PROXY-"
vsphere_vm_resource_pool ="TPM03-AS"
vsphere_vm_firmware = "bios"
vsphere_cluster = "MEGA-03"
@@ -33,7 +33,8 @@ variable "vsphere_datacenter" {
}

variable "vsphere_vm_name" {
description = "What is the name of the VM"
description = "What is the name of the VM - Should be no more than 7 characters long"
default = "VBR-PRX"
}

variable "vsphere_vm_firmware" {
@@ -41,3 +41,11 @@ data "vsphere_tag" "tag" {
name = "${var.vsphere_tag_name}"
category_id = "${data.vsphere_tag_category.category.id}"
}

provider "random" {
version="2.0"
}
resource "random_integer" "priority" {
min = 10
max = 99
}
@@ -7,7 +7,7 @@
resource "vsphere_virtual_machine" "VBR-PROXY" {
# VM placement #
count = "${var.vsphere_proxy_number}"
name = "${var.vsphere_vm_name}W${count.index + 1}"
name = "${var.vsphere_vm_name}-W${random_integer.priority.result}-${count.index + 1}"
resource_pool_id = "${data.vsphere_resource_pool.resource_pool.id}"
datastore_id = "${data.vsphere_datastore.datastore.id}"
folder = "${var.vsphere_vm_folder}"
@@ -41,7 +41,7 @@ resource "vsphere_virtual_machine" "VBR-PROXY" {

customize {
windows_options {
computer_name = "${var.vsphere_vm_name}W${count.index + 1}"
computer_name = "${var.vsphere_vm_name}-W${random_integer.priority.result}-${count.index + 1}"
join_domain = "${var.vsphere_ad_domain}"
domain_admin_user = "${var.vsphere_ad_username}"
domain_admin_password = "${var.vsphere_ad_password}"
@@ -12,7 +12,6 @@ vsphere_ad_password = "password$12"
# VM specifications
vsphere_datacenter = "VC03"
vsphere_vm_folder = "TPM03-AS"
vsphere_vm_name = "VBR-PROXY-"
vsphere_vm_resource_pool ="TPM03-AS"
vsphere_vm_template = "TPM03-AS/WIN2K19-TEST"
vsphere_vm_firmware = "efi"
@@ -33,7 +33,8 @@ variable "vsphere_datacenter" {
}

variable "vsphere_vm_name" {
description = "What is the name of the VM"
description = "What is the name of the VM - Should be no more than 7 characters long"
default = "VBR-PRX"
}

variable "vsphere_vm_template" {

0 comments on commit 97e615e

Please sign in to comment.
You can’t perform that action at this time.