From e607da2c40972e4f550e17575079da2e751b7281 Mon Sep 17 00:00:00 2001 From: 4censord Date: Thu, 22 Apr 2021 15:32:03 +0200 Subject: [PATCH] Removed centos-example deleted: docs/builders/iso/Commented-Example.md deleted: examples/centos/centos8-example.pkr.hcl deleted: examples/http/centos8/ks-centos8-example.cfg --- docs/builders/iso/Commented-Example.md | 36 --------- examples/centos/centos8-example.pkr.hcl | 77 -------------------- examples/http/centos8/ks-centos8-example.cfg | 52 ------------- 3 files changed, 165 deletions(-) delete mode 100644 docs/builders/iso/Commented-Example.md delete mode 100644 examples/centos/centos8-example.pkr.hcl delete mode 100644 examples/http/centos8/ks-centos8-example.cfg diff --git a/docs/builders/iso/Commented-Example.md b/docs/builders/iso/Commented-Example.md deleted file mode 100644 index d06b7a1..0000000 --- a/docs/builders/iso/Commented-Example.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -layout: "docs" -page_title: "XenServer-iso Commented Example" -description: |- - This is a Commented example for how to use the xenserver-iso Packer Builder. - This Example is written in hcl ---- - -# What's this -This Example builds a vanilla Centos 8 Template. No Provisioning or Post-Processing will be done. - - -If you want to run this example, you have to replace the following variables with your own values. -```hcl - remote_host = "xenserver.example.org" - remote_username = "root" - remote_password = "very-secret-password" - - sr_iso_name = "Local-ISO" - sr_name = "Local-SR" - tools_iso_name = "guest-tools.iso" -``` -After changing those, run -`packer init examples/http/centos/centos8-example.pkr.hcl` to download the xenserver plugin -and -`packer build examples/http/centos/centos8-example.pkr.hcl` to create the vm - -## Parts of this example -This examples composes the following files from the examples folder - -* [centos8-example.pkr.hcl](../../examples/http/centos/centos8-example.pkr.hcl) -* [ks-centos8-example.cfg](../../examples/http/centos/ks-centos8-example.cfg) - -Both file contain comments explaining what they do - - diff --git a/examples/centos/centos8-example.pkr.hcl b/examples/centos/centos8-example.pkr.hcl deleted file mode 100644 index 8451d5e..0000000 --- a/examples/centos/centos8-example.pkr.hcl +++ /dev/null @@ -1,77 +0,0 @@ - -#this tells packer that it needs the `xenserver` plugin to run this script. -packer { - required_plugins { - xenserver= { - # specifically a version higher than 0.3.2 - version = ">= v0.3.2" - # which can be found on github - source = "github.com/ddelnano/xenserver" - } - } -} - - -# packer configures an Artifact named "example" using the "xenserver-iso" builder -source "xenserver-iso" "example" { - # - # Where to get the iso - # - iso_url = "http://mirrors.ocf.berkeley.edu/centos/8.3.2011/isos/x86_64/CentOS-8.3.2011-x86_64-dvd1.iso" - iso_checksum_type = "sha1" - iso_checksum = "aaf9d4b3071c16dbbda01dfe06085e5d0fdac76df323e3bbe87cce4318052247" - # - # Where to store the ISO, vm-disk and where to find the xentools iso - # - sr_iso_name = "Local-ISO" # store the iso used during install on the ISO-SR named `Local-ISO` - sr_name = "Local-SR" # store the vmdisk used during install on the SR named `Local-SR` - tools_iso_name = "guest-tools.iso" # mount the guest-tools iso with the name `guest-tools.iso` - # - # How to communicate with the xenserver - # - remote_host = "xenserver.example.org" # the ipadress or fqdn of the xenserver. This should be the pool primary - remote_username = "root" # the user with which to connect. - remote_password = "very-secret-password" # the password for the user. - # - # Basic info for the vm - # - vm_name = "packer-centos8-example" # how packer will name the vm. - vm_description = "This is an example." # the description field of the vm - vm_memory = 4096 # the Amount of RAM, in MB - disk_size = 4096 # the Amount of RAM, in MB - # - # For the installation - # - http_directory = "examples/http/centos8" # Packer will spin up a http-server for serving files to the installing vm. the kickstart file `ks-centos8-examples.cfg` is in this directory - boot_wait = "10s" # Wait for 10s after starting the VM before typeing the `boot_command` - boot_command = [" text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks-centos8-examples.cfg"] - # The command to type into the installing vm. - # `` a tab Character `\t` - # `text ks=http://` character literals - # `{{ .HTTPIP }}` will be replaced by the local ip-address. - # `:` character literal - # `{{ .HTTPPort }}` will be replaced by the local port. Will be randomly selectet between 8000 and 9000 - # `/ks-centos8-examples.cfg` character literals - # `` an enter character - # `` wait for 1s - - # - # how packer contacts the vm - # - ssh_username = "root" # The ssh user packer uses to connect to the VM - ssh_password = "centos" # The ssh password packer uses to connect to the VM - ssh_wait_timeout = "10m" # consider install failed if unable to connect via ssh 10m into the build - # - # What to do with the resulting VM - # - output_directory = "packer-centos8-local" # Store the resulting xva file in this directory - keep_vm = "on_success" # Create a template with the vm after a successfull build -composes -} -# -# Operations to do while building. -# Any provisioning would be done here -# -build { - sources = ["xenserver-iso.example"] -} diff --git a/examples/http/centos8/ks-centos8-example.cfg b/examples/http/centos8/ks-centos8-example.cfg deleted file mode 100644 index a920fec..0000000 --- a/examples/http/centos8/ks-centos8-example.cfg +++ /dev/null @@ -1,52 +0,0 @@ -eula --agreed -# agree to the eula of centos - -lang en-US.UTF-8 -# set the system-locale to en-US.UTF-8 - -timezone Europe/Berlin -# set the timezone to Europe/Berlin - -url --url="http://mirror.centos.org/centos/8.3.2011/BaseOS/x86_64/os/" -# Primary installation mirror - -text -skipx -# Install in textmode, do not configure X11 - -firstboot --disable -# Dont do any configuration on first boot - -rootpw --plaintext centos -# set the reboot to "centos" - -firewall --enabled --ssh -# enable the firewall, allow ssh - -selinux --enforcing -# ensure selinux is in enforcing mode - -logging --level=info -# Installation logging level - -network --bootproto=dhcp --device=eth0 --onboot=on -# configure the network with dhcp on install - -clearpart --all -zerombr -bootloader --location=mbr -# Clear all partitioning on all disk -# Zero the MBR section -# Install the bootloader into the MBR - -part / --asprimary --fstype="ext4" --size=1024 --grow -# / shall the a primary partition with ext4 -# with a mimimul size of 1024 MB, but growing to the actual size of the disk - -%packages -@base -%end -# install all packages of the core group - -reboot --eject -# After finishing eject all CD-Disk and reboot \ No newline at end of file