-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
226 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ build { | |
} | ||
|
||
provisioner "shell" { | ||
only = ["nutanix.centos"] | ||
environment_vars = [ | ||
"FOO=hello world", | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
build { | ||
source "nutanix.centos" { | ||
name = "centos" | ||
} | ||
|
||
provisioner "shell" { | ||
environment_vars = [ | ||
"FOO=hello world", | ||
] | ||
inline = [ | ||
"echo \"FOO is $FOO\" > example.txt", | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Author: Tomasz Filipiec <[email protected]> | ||
# Desc.: Simple kickstart file for automated installation | ||
# OS: CentOS 7 Minimal (core) | ||
# Version: 1.0 | ||
|
||
# Turning on text-mode installation (little quicker than GUI) | ||
text | ||
|
||
# Setting up authentication and keyboard | ||
auth --enableshadow --passalgo=sha512 | ||
keyboard --vckeymap=us --xlayouts='us' | ||
|
||
# Installation files source (CentOS-7.0-1406-x86_64-Minimal.iso) | ||
cdrom | ||
|
||
# Using only primary disk, ignoring others | ||
ignoredisk --only-use=sda | ||
|
||
# Setting up language to English | ||
lang en-US.UTF-8 | ||
|
||
# Setting up network interface to DHCP | ||
network --bootproto=dhcp --ipv6=auto --hostname=centos-ks.local --activate | ||
|
||
# Root password (remember that plaintext only for information purposes) | ||
rootpw --plaintext packer | ||
|
||
# Setting up firewall and enabling SSH for remote management | ||
firewall --enabled --service=ssh | ||
|
||
# Setting timezone | ||
timezone Europe/Berlin --isUtc | ||
|
||
# Setting up Security-Enhanced Linux into enforcing | ||
selinux --enforcing | ||
|
||
# Setting up MBR | ||
bootloader --location=mbr --boot-drive=sda | ||
|
||
# Setting up Logical Volume Manager and autopartitioning | ||
clearpart --all --drives=sda --initlabel | ||
autopart --type=lvm | ||
|
||
# Eject cdrom and reboot | ||
reboot --eject | ||
|
||
# Installing only packages for minimal install | ||
%packages | ||
@Core | ||
chrony | ||
%end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
source "nutanix" "centos" { | ||
nutanix_username = var.nutanix_username | ||
nutanix_password = var.nutanix_password | ||
nutanix_endpoint = var.nutanix_endpoint | ||
nutanix_port = var.nutanix_port | ||
nutanix_insecure = var.nutanix_insecure | ||
cluster_name = var.nutanix_cluster | ||
os_type = "Linux" | ||
|
||
vm_disks { | ||
image_type = "ISO_IMAGE" | ||
source_image_uri = "http://fr2.rpmfind.net/linux/centos/7.9.2009/isos/x86_64/CentOS-7-x86_64-Minimal-2009.iso" | ||
} | ||
|
||
vm_disks { | ||
image_type = "DISK" | ||
disk_size_gb = 40 | ||
} | ||
|
||
vm_nics { | ||
subnet_name = var.nutanix_subnet | ||
} | ||
|
||
cd_files = ["scripts/ks.cfg"] | ||
cd_label = "OEMDRV" | ||
|
||
vm_name = "e2e-packer-${var.test}-${formatdate("MDYYhms", timestamp())}" | ||
|
||
image_name = "e2e-packer-${var.test}-${formatdate("MDYYhms", timestamp())}" | ||
image_delete = true | ||
image_category_key = "Environment" | ||
image_category_value = "Testing" | ||
|
||
force_deregister = true | ||
|
||
shutdown_command = "echo 'packer' | sudo -S shutdown -P now" | ||
shutdown_timeout = "2m" | ||
ssh_password = "packer" | ||
ssh_username = "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
variable "nutanix_username" { | ||
type = string | ||
} | ||
|
||
variable "nutanix_password" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
variable "nutanix_endpoint" { | ||
type = string | ||
} | ||
|
||
variable "nutanix_port" { | ||
type = number | ||
} | ||
|
||
variable "nutanix_insecure" { | ||
type = bool | ||
default = true | ||
} | ||
|
||
variable "nutanix_subnet" { | ||
type = string | ||
} | ||
|
||
variable "nutanix_cluster" { | ||
type = string | ||
} | ||
|
||
variable "test" { | ||
type = string | ||
} |
This file was deleted.
Oops, something went wrong.