stemcell_builder 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. data/.gitignore +20 -0
  2. data/.rvmrc +1 -0
  3. data/.travis.yml +1 -0
  4. data/Gemfile +14 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +123 -0
  7. data/Rakefile +10 -0
  8. data/assets/box.ovf.erb +81 -0
  9. data/assets/stemcell_mf_schema.yaml +30 -0
  10. data/bin/stemcell_builder +138 -0
  11. data/lib/stemcell.rb +3 -0
  12. data/lib/stemcell/builder.rb +445 -0
  13. data/lib/stemcell/builders/centos.rb +33 -0
  14. data/lib/stemcell/builders/redhat.rb +34 -0
  15. data/lib/stemcell/builders/ubuntu.rb +36 -0
  16. data/lib/stemcell/const.rb +12 -0
  17. data/lib/stemcell/version.rb +10 -0
  18. data/spec/spec_helper.rb +10 -0
  19. data/spec/stemcell_builder/builder_spec.rb +186 -0
  20. data/spec/stemcell_builder/centos_spec.rb +39 -0
  21. data/spec/stemcell_builder/redhat_spec.rb +53 -0
  22. data/spec/stemcell_builder/ubuntu_spec.rb +38 -0
  23. data/stemcell_builder.gemspec +42 -0
  24. data/templates/centos/_60-bosh-sysctl.conf +5 -0
  25. data/templates/centos/_empty_state.yml +9 -0
  26. data/templates/centos/_monitrc +8 -0
  27. data/templates/centos/_ntpdate +10 -0
  28. data/templates/centos/_runonce +46 -0
  29. data/templates/centos/_sysstat +18 -0
  30. data/templates/centos/_variables.sh.erb +31 -0
  31. data/templates/centos/base.sh +23 -0
  32. data/templates/centos/bosh_agent.sh +39 -0
  33. data/templates/centos/cleanup.sh +28 -0
  34. data/templates/centos/definition.rb.erb +37 -0
  35. data/templates/centos/harden.sh +8 -0
  36. data/templates/centos/ks.cfg +43 -0
  37. data/templates/centos/micro.sh +57 -0
  38. data/templates/centos/monit.sh +21 -0
  39. data/templates/centos/postinstall.sh +27 -0
  40. data/templates/centos/ruby.sh +42 -0
  41. data/templates/centos/setup-bosh.sh +20 -0
  42. data/templates/centos/sudo.sh +13 -0
  43. data/templates/centos/timestamp.sh +15 -0
  44. data/templates/centos/vmware-tools.sh +17 -0
  45. data/templates/centos/zerodisk.sh +9 -0
  46. data/templates/noop/erbtest.txt.erb +1 -0
  47. data/templates/noop/test.txt +1 -0
  48. data/templates/redhat/_60-bosh-sysctl.conf +5 -0
  49. data/templates/redhat/_empty_state.yml +9 -0
  50. data/templates/redhat/_monitrc +8 -0
  51. data/templates/redhat/_ntpdate +10 -0
  52. data/templates/redhat/_runonce +46 -0
  53. data/templates/redhat/_sysstat +18 -0
  54. data/templates/redhat/_variables.sh.erb +31 -0
  55. data/templates/redhat/base.sh +41 -0
  56. data/templates/redhat/bosh_agent.sh +37 -0
  57. data/templates/redhat/cleanup.sh +30 -0
  58. data/templates/redhat/definition.rb.erb +38 -0
  59. data/templates/redhat/harden.sh +8 -0
  60. data/templates/redhat/ks.cfg +86 -0
  61. data/templates/redhat/micro.sh +57 -0
  62. data/templates/redhat/monit.sh +21 -0
  63. data/templates/redhat/postinstall.sh +27 -0
  64. data/templates/redhat/rhnreg.sh.erb +15 -0
  65. data/templates/redhat/ruby.sh +42 -0
  66. data/templates/redhat/setup-bosh.sh +20 -0
  67. data/templates/redhat/sudo.sh +13 -0
  68. data/templates/redhat/timestamp.sh +15 -0
  69. data/templates/redhat/vmware-tools.sh +17 -0
  70. data/templates/redhat/zerodisk.sh +9 -0
  71. data/templates/ubuntu/_60-bosh-sysctl.conf +5 -0
  72. data/templates/ubuntu/_empty_state.yml +9 -0
  73. data/templates/ubuntu/_helpers.sh +40 -0
  74. data/templates/ubuntu/_monitrc +8 -0
  75. data/templates/ubuntu/_ntpdate +10 -0
  76. data/templates/ubuntu/_runonce +46 -0
  77. data/templates/ubuntu/_sysstat +18 -0
  78. data/templates/ubuntu/_variables.sh.erb +30 -0
  79. data/templates/ubuntu/apt-upgrade.sh +19 -0
  80. data/templates/ubuntu/base-stemcell.sh +95 -0
  81. data/templates/ubuntu/bosh_agent.sh +39 -0
  82. data/templates/ubuntu/definition.rb.erb +63 -0
  83. data/templates/ubuntu/harden.sh +9 -0
  84. data/templates/ubuntu/micro.sh +57 -0
  85. data/templates/ubuntu/monit.sh +22 -0
  86. data/templates/ubuntu/network-cleanup.sh +17 -0
  87. data/templates/ubuntu/postinstall.sh +45 -0
  88. data/templates/ubuntu/preseed.cfg +87 -0
  89. data/templates/ubuntu/ruby.sh +54 -0
  90. data/templates/ubuntu/setup-bosh.sh +14 -0
  91. data/templates/ubuntu/sudo.sh +14 -0
  92. data/templates/ubuntu/timestamp.sh +13 -0
  93. data/templates/ubuntu/vmware-tools.sh +22 -0
  94. data/templates/ubuntu/zero-disk.sh +10 -0
  95. metadata +375 -0
@@ -0,0 +1,20 @@
1
+ #!/bin/bash
2
+
3
+ source _variables.sh
4
+
5
+ yum -y install glibc-static sg3_utils
6
+
7
+ pushd /usr/bin
8
+ if [ ! -f rescan-scsi-bus.sh ]
9
+ then
10
+ ln -s rescan-scsi-bus rescan-scsi-bus.sh
11
+ fi
12
+ popd
13
+
14
+ pushd /tmp
15
+ yum -y install git rpm-build rpmdevtools gcc glibc-static make
16
+ git clone https://github.com/imeyer/runit-rpm.git
17
+ cd runit-rpm
18
+ ./build.sh
19
+ rpm -i ~/rpmbuild/RPMS/*/*.rpm
20
+ popd
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ cp /etc/sudoers /etc/sudoers.orig
4
+ sed -i -e '/Defaults\s\+env_reset/a Defaults\texempt_group=admin' /etc/sudoers
5
+ sed -i -e 's/%admin ALL=(ALL) ALL/%admin ALL=NOPASSWD:ALL/g' /etc/sudoers
6
+ cp -p /etc/sudoers /etc/sudoers.save
7
+ echo '#includedir /etc/sudoers.d' >> /etc/sudoers
8
+ visudo -c
9
+ if [ $? -ne 0 ]; then
10
+ echo "ERROR: bad sudoers file"
11
+ exit 1
12
+ fi
13
+ rm /etc/sudoers.save
@@ -0,0 +1,15 @@
1
+ #!/bin/bash
2
+
3
+ set -x
4
+
5
+ source _variables.sh
6
+
7
+ # Turn on NTP service
8
+ chkconfig ntpd on
9
+ # Synchronize time with pool.ntp.org
10
+ ntpdate pool.ntp.org
11
+ # Start the NTP service
12
+ /etc/init.d/ntpd start
13
+
14
+ # save build time
15
+ date > /etc/box_build_time
@@ -0,0 +1,17 @@
1
+ #!/bin/bash
2
+
3
+ ### stage system_open_vm_tools
4
+ source _variables.sh
5
+
6
+ cat > /etc/yum.repos.d/vmware-tools.repo << EOM
7
+ [vmware-tools]
8
+ name=VMware Tools
9
+ baseurl=http://packages.vmware.com/tools/esx/5.0/rhel6/x86_64
10
+ enabled=1
11
+ gpgcheck=1
12
+ EOM
13
+
14
+ rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
15
+ rpm --import http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
16
+
17
+ yum -y install vmware-tools-esx-kmods-`uname -r` vmware-tools-esx
@@ -0,0 +1,9 @@
1
+ #!/bin/bash
2
+
3
+ set -x
4
+
5
+ source _variables.sh
6
+
7
+ # Zero out the free space to save space in the final image:
8
+ dd if=/dev/zero of=/EMPTY bs=1M
9
+ rm -f /EMPTY
@@ -0,0 +1 @@
1
+ <%= @name %>
@@ -0,0 +1 @@
1
+ ## This is a test ##
@@ -0,0 +1,5 @@
1
+ # Copyright (c) 2009-2012 VMware, Inc.
2
+
3
+ # Setup rp_filter in loose mode
4
+ net.ipv4.conf.default.rp_filter=2
5
+ net.ipv4.conf.all.rp_filter=2
@@ -0,0 +1,9 @@
1
+ deployment: ""
2
+ job: ""
3
+ index: ""
4
+ networks: {}
5
+ resource_pool: {}
6
+ packages: {}
7
+ persistent_disk: {}
8
+ configuration_hash: {}
9
+ properties: {}
@@ -0,0 +1,8 @@
1
+ set daemon 10
2
+ set logfile /var/vcap/monit/monit.log
3
+
4
+ set httpd port 2822 and use address 127.0.0.1
5
+ allow cleartext /var/vcap/monit/monit.user
6
+
7
+ include /var/vcap/monit/*.monitrc
8
+ include /var/vcap/monit/job/*.monitrc
@@ -0,0 +1,10 @@
1
+ #!/bin/sh
2
+ #
3
+ # Copyright (c) 2009-2012 VMware, Inc.
4
+
5
+ BOSH=/var/vcap/bosh
6
+ NTP_SERVER_FILE=$BOSH/etc/ntpserver
7
+ if [ -f $NTP_SERVER_FILE ]; then
8
+ NTP_SERVER=`cat $NTP_SERVER_FILE`
9
+ /usr/sbin/ntpdate $NTP_SERVER > $BOSH/log/ntpdate.out 2>&1
10
+ fi
@@ -0,0 +1,46 @@
1
+ #!/bin/bash
2
+
3
+ if [[ $# -eq 0 ]]; then
4
+ echo "Schedules a command to be run after the next reboot."
5
+ echo "Usage: $(basename $0) <command>"
6
+ echo " $(basename $0) -p <path> <command>"
7
+ echo " $(basename $0) -r <command>"
8
+ else
9
+ REMOVE=0
10
+ COMMAND=${!#}
11
+ SCRIPTPATH=$PATH
12
+
13
+ while getopts ":r:p:" optionName; do
14
+ case "$optionName" in
15
+ r) REMOVE=1; COMMAND=$OPTARG;;
16
+ p) SCRIPTPATH=$OPTARG;;
17
+ esac
18
+ done
19
+
20
+ SCRIPT="${HOME}/.$(basename $0)_$(echo $COMMAND | sed 's/[^a-zA-Z0-9_]/_/g')"
21
+
22
+ if [[ ! -f $SCRIPT ]]; then
23
+ echo "PATH=$SCRIPTPATH" >> $SCRIPT
24
+ echo "cd $(pwd)" >> $SCRIPT
25
+ echo "logger -t $(basename $0) -p local3.info \"COMMAND=$COMMAND ; USER=\$(whoami) ($(logname)) ; PWD=$(pwd) ; PATH=\$PATH\"" >> $SCRIPT
26
+ echo "$COMMAND | logger -t $(basename $0) -p local3.info" >> $SCRIPT
27
+ echo "$0 -r \"$(echo $COMMAND | sed 's/\"/\\\"/g')\"" >> $SCRIPT
28
+ chmod +x $SCRIPT
29
+ fi
30
+
31
+ CRONTAB="${HOME}/.$(basename $0)_temp_crontab_$RANDOM"
32
+ ENTRY="@reboot $SCRIPT"
33
+
34
+ echo "$(crontab -l 2>/dev/null)" | grep -v "$ENTRY" | grep -v "^# DO NOT EDIT THIS FILE - edit the master and reinstall.$" | grep -v "^# ([^ ]* installed on [^)]*)$" | grep -v "^# (Cron version [^$]*\$[^$]*\$)$" > $CRONTAB
35
+
36
+ if [[ $REMOVE -eq 0 ]]; then
37
+ echo "$ENTRY" >> $CRONTAB
38
+ fi
39
+
40
+ crontab $CRONTAB
41
+ rm $CRONTAB
42
+
43
+ if [[ $REMOVE -ne 0 ]]; then
44
+ rm $SCRIPT
45
+ fi
46
+ fi
@@ -0,0 +1,18 @@
1
+ #
2
+ # Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat
3
+ # and /etc/cron.daily/sysstat files
4
+ #
5
+
6
+ # Should sadc collect system activity informations? Valid values
7
+ # are "true" and "false". Please do not put other values, they
8
+ # will be overwritten by debconf!
9
+ ENABLED="true"
10
+
11
+ # Additional options passed to sa1 by /etc/init.d/sysstat
12
+ # and /etc/cron.d/sysstat
13
+ # By default contains the `-S DISK' option responsible for
14
+ # generating disk statisitcs.
15
+ SA1_OPTIONS="-S DISK"
16
+
17
+ # Additional options passed to sa2 by /etc/cron.daily/sysstat.
18
+ SA2_OPTIONS=""
@@ -0,0 +1,31 @@
1
+ #!/bin/bash
2
+
3
+ bosh_app_dir=/var/vcap
4
+ bosh_dir=$bosh_app_dir/bosh
5
+ bosh_users_password="c1owdc0w"
6
+ infrastructure="vsphere"
7
+ SRC_DIR=`pwd`
8
+
9
+ if [ ! -d "$bosh_dir" ]; then
10
+ # create bosh_dir and add to path
11
+ mkdir -p $bosh_dir
12
+ echo "PATH=$PATH:$bosh_dir/bin
13
+ export PATH
14
+ " >> /etc/profile
15
+
16
+ echo "PATH=$PATH:$bosh_dir/bin
17
+ export PATH
18
+ " >> /root/.bash_profile
19
+
20
+ export PATH=$PATH:$bosh_dir/bin
21
+ fi
22
+
23
+ <% if ENV['HTTP_PROXY'] || ENV['http_proxy'] %>
24
+ export HTTP_PROXY=<%= ENV['HTTP_PROXY'] || ENV['http_proxy'] %>
25
+ export http_proxy=<%= ENV['HTTP_PROXY'] || ENV['http_proxy'] %>
26
+ <% end %>
27
+
28
+ <% if ENV['HTTPS_PROXY'] || ENV['https_proxy'] %>
29
+ export HTTPS_PROXY=<%= ENV['HTTPS_PROXY'] || ENV['https_proxy'] %>
30
+ export https_proxy=<%= ENV['HTTPS_PROXY'] || ENV['https_proxy'] %>
31
+ <% end %>
@@ -0,0 +1,41 @@
1
+ #!/bin/bash
2
+
3
+ set -x
4
+
5
+ source _variables.sh
6
+ echo -n $infrastructure > /etc/infrastructure
7
+
8
+ cat > /etc/yum.repos.d/puppetlabs.repo << EOM
9
+ [puppetlabs]
10
+ name=puppetlabs
11
+ baseurl=http://yum.puppetlabs.com/el/6/products/\$basearch
12
+ enabled=0
13
+ gpgcheck=0
14
+ EOM
15
+
16
+ cat > /etc/yum.repos.d/epel.repo << EOM
17
+ [epel]
18
+ name=epel
19
+ baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch
20
+ enabled=0
21
+ gpgcheck=0
22
+ EOM
23
+
24
+ cat > /etc/yum.repos.d/cfengine.repo << EOM
25
+ [cfengine]
26
+ name=cfengine
27
+ baseurl=http://cfengine.com/pub/yum/
28
+ enabled=0
29
+ gpgcheck=0
30
+ EOM
31
+
32
+ rpm -U --nosignature http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
33
+
34
+ # Base install
35
+ sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
36
+
37
+ #yum -y groupinstall "Development Tools"
38
+ yum -y install sudo gcc make gcc-c++ kernel-devel-`uname -r` zlib-devel openssl-devel \
39
+ readline-devel sqlite-devel perl wget dkms curl ntp crontabs sysstat pam-devel eject dash
40
+ yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel \
41
+ openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git postgresql-devel
@@ -0,0 +1,37 @@
1
+ #!/bin/bash
2
+
3
+ source _variables.sh
4
+
5
+ mkdir -p /tmp/bosh_agent
6
+
7
+ pushd /tmp/bosh_agent
8
+ cp $SRC_DIR/_bosh_agent.tar /tmp/bosh_agent
9
+ tar xmvf _bosh_agent.tar
10
+ $bosh_dir/bin/gem install *.gem --force --no-ri --no-rdoc
11
+ chmod +x $bosh_dir/agent/bin/bosh_agent
12
+
13
+ # configure bosh agent
14
+ mkdir -p /etc/sv/agent/log
15
+ mkdir -p /var/vcap/bosh/log
16
+
17
+ echo '#!/bin/bash
18
+ export PATH=/var/vcap/bosh/bin:$PATH
19
+ exec 2>&1
20
+ exec /var/vcap/bosh/bin/bosh_agent --configure --infrastructure=`cat /etc/infrastructure` --platform=rhel
21
+ ' > /etc/sv/agent/run
22
+
23
+ echo '#!/bin/bash
24
+ svlogd -tt /var/vcap/bosh/log
25
+ ' > /etc/sv/agent/log/run
26
+
27
+ # runit
28
+ chmod +x /etc/sv/agent/run /etc/sv/agent/log/run
29
+
30
+ ln -s /etc/sv/agent /etc/service
31
+
32
+ cp $SRC_DIR/_empty_state.yml $bosh_dir/state.yml
33
+
34
+ # The bosh agent installs a config that rotates on size
35
+ mv /etc/cron.daily/logrotate /etc/cron.hourly/logrotate
36
+
37
+ popd
@@ -0,0 +1,30 @@
1
+ #!/bin/bash
2
+
3
+ set -x
4
+
5
+ source _variables.sh
6
+
7
+ yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts
8
+ yum -y clean all
9
+
10
+ # Cleanup network
11
+ sed -i -e 's/^\(HWADDR=.*\)$//g' /etc/sysconfig/network-scripts/ifcfg-eth*
12
+ rm /etc/udev/rules.d/70-persistent-net.rules
13
+
14
+ # Clean out all the scripts
15
+ rm -f *.iso *.gem *.tar *.tgz
16
+
17
+ sed -i -e 's/^\(timeout=.*\)$/timeout=0/g' /boot/grub/menu.lst
18
+ sed -i -e 's/^\(timeout=.*\)$/timeout=0/g' /boot/grub/grub.conf
19
+
20
+ # Clean out ssh host keys
21
+ # install runonce
22
+ mkdir -p /etc/local/runonce.d/ran
23
+ cp $SRC_DIR/_runonce /usr/local/bin/runonce
24
+ chmod +x /usr/local/bin/runonce
25
+
26
+ # Do some firstboot clean up
27
+ # Regenerate ssh keys
28
+ /usr/local/bin/runonce "rm -f /etc/ssh/ssh_host_*"
29
+ /usr/local/bin/runonce ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
30
+ /usr/local/bin/runonce ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
@@ -0,0 +1,38 @@
1
+ Veewee::Session.declare({
2
+ :cpu_count => '1', :memory_size=> '512',
3
+ :disk_size => '102400', :disk_format => 'VDI', :hostiocache => 'off', :use_sata => false,
4
+ :os_type_id => 'RedHat_64',
5
+ :iso_file => "<%= @iso_filename %>", :iso_src => "<%= @iso %>", :iso_md5 => "<%= @iso_md5 %>",
6
+ :iso_download_timeout => 5000,
7
+ :boot_wait => "5", :boot_cmd_sequence => ['<Tab> text ks=http://%IP%:%PORT%/ks.cfg<Enter>'],
8
+ :kickstart_port => "7122", :kickstart_timeout => 10000, :kickstart_file => "ks.cfg",
9
+ :ssh_login_timeout => "10000", :ssh_user => "vcap", :ssh_password => "c1oudc0w", :ssh_key => "",
10
+ :ssh_host_port => "<%= @ssh_port %>", :ssh_guest_port => "22",
11
+ :sudo_cmd => "echo '%p'|sudo -S /bin/bash '%f'", :shutdown_cmd => "/sbin/halt -h -p",
12
+ :postinstall_files => [
13
+ "_60-bosh-sysctl.conf",
14
+ "_monitrc",
15
+ "_ntpdate",
16
+ "_sysstat",
17
+ "_empty_state.yml",
18
+ "_variables.sh",
19
+ "_monitrc",
20
+ "_runonce",
21
+ "_bosh_agent.tar",
22
+
23
+ "rhnreg.sh",
24
+ "base.sh",
25
+ "timestamp.sh",
26
+ "sudo.sh",
27
+ "setup-bosh.sh",
28
+ "monit.sh",
29
+ "ruby.sh",
30
+ "bosh_agent.sh",
31
+ "vmware-tools.sh",
32
+ "harden.sh",
33
+ "postinstall.sh",
34
+ "zerodisk.sh",
35
+ "cleanup.sh"
36
+ ],
37
+ :postinstall_timeout => 10000
38
+ })
@@ -0,0 +1,8 @@
1
+ #!/bin/bash
2
+
3
+ ### stage bosh_harden
4
+ # remove setuid binaries - except su/sudo (sudoedit is hardlinked)
5
+ find / -xdev -perm +6000 -a -type f \
6
+ -a -not \( -name sudo -o -name su -o -name sudoedit \) \
7
+ -exec chmod ug-s {} \;
8
+
@@ -0,0 +1,86 @@
1
+ install
2
+ cdrom
3
+ #Use the command line interface (instead of GUI or text mode)
4
+ cmdline
5
+ #interactive
6
+
7
+ network --bootproto=dhcp
8
+
9
+ #Ignore all disks except /dev/sda
10
+ ignoredisk --only-use=sda
11
+
12
+ #Any invalid partition tables found on disks are initialized
13
+ zerombr
14
+
15
+ #Remove all paritions
16
+ clearpart --all --initlabel --drives=sda
17
+
18
+ #Create partition structure
19
+ autopart
20
+
21
+ #Install GRUB
22
+ bootloader --location=mbr
23
+
24
+ #Authconfig
25
+ authconfig --enableshadow --passalgo=sha512
26
+ auth --useshadow --enablemd5
27
+
28
+ #The root password
29
+ rootpw c1oudc0w
30
+
31
+ #Disable iptables
32
+ firewall --disable
33
+
34
+ #Disable selinux
35
+ selinux --disabled
36
+
37
+ #Don't run firstboot
38
+ firstboot --disable
39
+
40
+ #Do not configure X
41
+ skipx
42
+
43
+ #Set the keyboard layout
44
+ keyboard us
45
+
46
+ #Set the language
47
+ lang en_US.utf8
48
+
49
+ #Set the timezone
50
+ timezone UTC
51
+
52
+ #Reboot
53
+ reboot
54
+
55
+ ##### Begin packages section
56
+ %packages --ignoremissing
57
+ # Base System:
58
+ @Core
59
+ @Base
60
+
61
+ #Other packages we want
62
+ ntp
63
+ gcc
64
+ strace
65
+ kernel-devel
66
+ libacl
67
+ libacl.i686
68
+ lsof
69
+ lsscsi
70
+ glibc.i686
71
+ iotop
72
+ nc
73
+ sudo
74
+ # packages to exclude
75
+ -ipw2100-firmware
76
+ -ipw2200-firmware
77
+ -ivtv-firmware
78
+
79
+ %post
80
+ /usr/sbin/groupadd vcap
81
+ /usr/sbin/groupadd admin
82
+ /usr/sbin/useradd vcap -g vcap -G wheel
83
+ echo "c1oudc0w" | passwd --stdin vcap
84
+ echo "vcap ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vcap
85
+ chmod 0440 /etc/sudoers.d/vcap
86
+ %end