Adding example packer config file and kick-starter file. (Note: currently the xs-tools RPMs are a dependency).
Signed-off-by: Rob Dobson <rob.dobson@citrix.com>
This commit is contained in:
parent
4093b3d8a0
commit
dd6494b9e8
26
examples/centos-6.4.conf
Normal file
26
examples/centos-6.4.conf
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"builders": [{
|
||||
"type": "xenserver",
|
||||
"username": "root",
|
||||
"password": "hostpassword",
|
||||
"host_ip": "10.81.2.105",
|
||||
"instance_name": "packer-centos-6-4",
|
||||
"root_disk_size": "5000000000",
|
||||
"clone_template": "b31a4a3a-a44f-68df-bb53-33529a9db3b7",
|
||||
"iso_uuid": "3079a3f4-a49b-4f65-8afd-c2351b2c3399",
|
||||
"sr_uuid": "88328079-d58d-2b43-1f28-982e0e60ec23",
|
||||
"network_uuid": "02021c25-34b8-2a32-3f55-1d6338e869e2",
|
||||
"iso_url": "http://mirrors.usc.edu/pub/linux/distributions/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso",
|
||||
"iso_checksum_type": "md5",
|
||||
"iso_checksum": "4a5fa01c81cc300f4729136e28ebe600",
|
||||
"http_directory": "http",
|
||||
"local_ip": "10.80.3.223",
|
||||
"ssh_username": "root",
|
||||
"ssh_password": "vmpassword",
|
||||
"boot_command":
|
||||
[
|
||||
"<tab><wait>",
|
||||
" ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/centos6-ks.cfg<enter>"
|
||||
]
|
||||
}]
|
||||
}
|
53
examples/http/centos6-ks.cfg
Normal file
53
examples/http/centos6-ks.cfg
Normal file
@ -0,0 +1,53 @@
|
||||
install
|
||||
cdrom
|
||||
lang en_US.UTF-8
|
||||
keyboard us
|
||||
unsupported_hardware
|
||||
network --bootproto=dhcp
|
||||
rootpw --iscrypted $1$wwD0QIub$WNz1RShXh1UapQzmpF4/c1
|
||||
firewall --disabled
|
||||
authconfig --enableshadow --passalgo=sha512
|
||||
selinux --permissive
|
||||
timezone UTC
|
||||
bootloader --location=mbr
|
||||
text
|
||||
skipx
|
||||
zerombr
|
||||
clearpart --all --initlabel
|
||||
autopart
|
||||
auth --useshadow --enablemd5
|
||||
firstboot --disabled
|
||||
#reboot
|
||||
poweroff
|
||||
|
||||
%packages --ignoremissing
|
||||
@Base
|
||||
@Core
|
||||
@Development Tools
|
||||
openssl-devel
|
||||
readline-devel
|
||||
zlib-devel
|
||||
kernel-devel
|
||||
vim
|
||||
wget
|
||||
%end
|
||||
|
||||
%post
|
||||
yum -y update
|
||||
|
||||
# update root certs
|
||||
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
|
||||
|
||||
# xe-guest-utilities
|
||||
rpm -Uhv http://cam-st05.uk.xensource.com/xe-guest-utilities-xenstore-6.4.93-1292.x86_64.rpm
|
||||
rpm -Uvh http://cam-st05.uk.xensource.com/xe-guest-utilities-6.4.93-1292.x86_64.rpm
|
||||
|
||||
# vagrant
|
||||
groupadd vagrant -g 999
|
||||
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
|
||||
echo "vagrant" | passwd --stdin vagrant
|
||||
|
||||
# sudo
|
||||
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
|
||||
%end
|
Loading…
Reference in New Issue
Block a user