Helm charts for supporting clustering in ODL
[integration/packaging.git] / packer / provision / centos_kickstart.cfg
1 # Kickstart output config
2 text
3
4 # General system config
5 lang en_US.UTF-8
6 keyboard us
7 timezone UTC
8
9 # Security config
10 authconfig --enableshadow --passalgo=sha512
11 rootpw vagrant
12 # Just have SELinux warn by default, to avoid breaking dev efforts
13 selinux --permissive
14 # To enable SELinux, use:
15 #   selinux --enforcing
16 # Disable the firewall by default, to avoid breaking dev efforts
17 firewall --disabled
18 # To enable the firewall and (required) open the SSH port, use:
19 #   firewall --enable --ssh
20
21 # Delete all existing partitions and create the default ones
22 clearpart --all --initlabel
23 # For unencrypted partitions (default):
24 autopart
25 # For encrypted paritions, use:
26 #   autopart --encrypted --passphrase=<your_password>
27
28 # Default bootloader config
29 bootloader
30 # For a GRUB password, use:
31 #   bootloader --password=<your_password>
32
33 # Don't insall the X Window System
34 skipx
35
36 # Reboot, and don't launch setup wizard after boot
37 firstboot --disabled
38 reboot
39
40 %packages
41   # Install minimal set of packages here, let provisioners (Ansible) handle them
42 %end
43
44 %post
45   # In the VM output, this is the "Running post-installation scripts" section.
46   # Unfortunately, it produces no output. The `yum update` step may give the
47   # appearance that the build is hung, as it's slow, uses little CPU and
48   # doesn't transfer much data during the package index building step.
49
50   # Update all packages
51   yum update -y
52
53   # Clear yum cache to save space
54   yum clean all
55
56   # Create vagrant user and group, give them correct permissions
57   # This needs to happen before Packer tries to SSH in and poweroff the VM,
58   # (at the end of the builder step), so it must be done here (in the
59   # builder step), not in an external script called by a Packer shell
60   # provisioner (after the builder step).
61   groupadd vagrant
62   useradd vagrant -g vagrant -G wheel
63   echo "vagrant" | passwd --stdin vagrant
64   echo "vagrant        ALL=(ALL)       NOPASSWD: ALL" >> /etc/sudoers.d/vagrant
65
66   # Everything requires the ability to run sudo without a tty
67   # Else, may see errors like "sorry, you must have a tty to run sudo"
68   # Need to do this here, before Packer reboots the VM and runs scripts,
69   # because `sudo` in the scripts fails without it. Docker also needs this
70   # (for Ansible to run `sudo`), but it doesn't run this kickstart, so it the
71   # logic must be duplicated in Docker's config script and here.
72   sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
73 %end