Skip to content

Commit

Permalink
Rename cd to data (#64)
Browse files Browse the repository at this point in the history
* Rename `cd` to `data`

Rename the directory `cd` to `data` for Windows to align with Linux directory structure.

* Update README.md

Update to include context for #57 and #59.
  • Loading branch information
tenthirtyam committed Sep 29, 2021
1 parent ec40253 commit f344284
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 216 deletions.
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ The directory structure of the repository.
```
├── build.sh
├── config.sh
├── LICENSE
├── NOTICE
├── README.md
Expand All @@ -102,13 +103,13 @@ The directory structure of the repository.
│ │ └── distribution-version
│ │ ├── *.pkr.hcl
│ │ ├── *.auto.pkrvars.hcl
│ │ └── http
│ │ └── data
│ │ └── ks.pkrtpl.hcl
│ └── windows
│ └── version
│ ├── *.pkr.hcl
│ ├── *.auto.pkrvars.hcl
│ └── cd
│ └── data
│ └── autounattend.pkrtpl.hcl
├── certificates
│ ├── root-ca.crt
Expand Down Expand Up @@ -271,6 +272,7 @@ ansible_key = "<public_key>"

Edit the `/config/common.pkvars.hcl` file to configure the following:

* Common Data Source
* Common Virtual Machine Settings
* Common Template and Content Library Settings
* Common Removable Media Settings
Expand All @@ -279,12 +281,21 @@ Edit the `/config/common.pkvars.hcl` file to configure the following:
Example: `/config/common.pkvars.hcl`

```
common_data_source = "http"
common_template_conversion = false
common_content_library_name = "sfo-w01-lib01"
common_content_library_ovf = true
common_content_library_destroy = true
```

`http` is the default provisioning data source for Linux machine image builds.

You change the `common_data_source` from `http` to `disk` to build supported Linux machine images without the need to user Packer's HTTP server. This is useful for environments that may not be able to route back to the system from which Packer is running. Currently, the only `cd_content` is used when selecting `disk`.

> Note: The following Linux distributions do not support kickstart from a secondary CD-ROM.
> - VMware PhotonOS 4
> - Ubuntu Server 18.04 LTS
#### **Proxy Variables**

Edit the `/config/proxy.pkvars.hcl` file to configure the following:
Expand Down
202 changes: 0 additions & 202 deletions builds/windows/windows-server-2016/cd/autounattend.pkrtpl.hcl

This file was deleted.

8 changes: 4 additions & 4 deletions builds/windows/windows-server-2016/windows-server.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ source "vsphere-iso" "windows-server-standard-core" {
"../../../certificates/"
]
cd_content = {
"autounattend.xml" = templatefile("${path.cwd}/cd/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERSTANDARDCORE", kms_key = "WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
"autounattend.xml" = templatefile("${path.cwd}/data/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERSTANDARDCORE", kms_key = "WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
}

// Boot and Provisioning Settings
Expand Down Expand Up @@ -156,7 +156,7 @@ source "vsphere-iso" "windows-server-standard-dexp" {
"../../../certificates/"
]
cd_content = {
"autounattend.xml" = templatefile("${path.cwd}/cd/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERSTANDARD", kms_key = "WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
"autounattend.xml" = templatefile("${path.cwd}/data/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERSTANDARD", kms_key = "WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
}

// Boot and Provisioning Settings
Expand Down Expand Up @@ -235,7 +235,7 @@ source "vsphere-iso" "windows-server-datacenter-core" {
"../../../certificates/"
]
cd_content = {
"autounattend.xml" = templatefile("${path.cwd}/cd/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERDATACENTERCORE", kms_key = "CB7KF-BWN84-R7R2Y-793K2-8XDDG", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
"autounattend.xml" = templatefile("${path.cwd}/data/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERDATACENTERCORE", kms_key = "CB7KF-BWN84-R7R2Y-793K2-8XDDG", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
}

// Boot and Provisioning Settings
Expand Down Expand Up @@ -314,7 +314,7 @@ source "vsphere-iso" "windows-server-datacenter-dexp" {
"../../../certificates/"
]
cd_content = {
"autounattend.xml" = templatefile("${path.cwd}/cd/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERDATACENTER", kms_key = "CB7KF-BWN84-R7R2Y-793K2-8XDDG", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
"autounattend.xml" = templatefile("${path.cwd}/data/autounattend.pkrtpl.hcl", { os_image = "Windows Server 2016 SERVERDATACENTER", kms_key = "CB7KF-BWN84-R7R2Y-793K2-8XDDG", build_username = var.build_username, build_password = var.build_password, vm_guest_os_language = var.vm_guest_os_language, vm_guest_os_keyboard = var.vm_guest_os_keyboard, vm_guest_os_timezone = var.vm_guest_os_timezone })
}

// Boot and Provisioning Settings
Expand Down
Loading

0 comments on commit f344284

Please sign in to comment.