No local Software Update Script on Debian based images.
Packer scripts to take a vendor provided image and add simple scripts for post install changes (see below). Naming is done by major version so users can use the major version name (eg. CentOS 7, Ubuntu 14.04) as their image name and get the latest version. Feel free to adapt the scripts to your needs.
Description:
images/
script pulls down images using wget to here (cache)logs/
packer errors are logged herepacker_files/
contains the files that are being included in the image to be built, including scripts packer runs (UbuntuBootstrap.sh and RedHatBootstrap.sh) to move those files and set permissionsdisableFirewall.sh
to prevent conflicts between local firewall and Openstack security groupsenableAutoUpdate.sh
enables auto apt or yum, depending on the distributioninstallOpenStackTools.sh
similar toManualToolsInstall.sh
below, this installs only python, pip, the required dependencies and the Openstack python scriptslocalSUS.sh
sets apt-cache-ng server. Please set this server here or consult therac
branch for a multi region example.
rc_files/
place the rc file used for access to RAC here (racrc
is the file referenced by the scripts)scripts/
packer scripts: *.json files read by packer to do what packer does, and distro-specific scripts to start the image building processvagrant/
creates an instance in RAC to build the images from, instead of installing packer etc. locallyManualToolsInstall.sh
simple script installs packer and OpenStack python scriptsUpdateAllImages.sh
runs all update scripts inscripts/
How to Use:
- Stand up the Packer box using Vagrant (see the vagrant folder) or use the
ManualToolsInstall
script to install packer and other tools locally. - Install rc files into
rc_files/
for the environment(s). Modify scripts as necessary for environments. - Include any files you want built into the image in
packer_files/
. Also include any scripts you want packer to execute. - Modify the appropriate
*.json
file inscripts/
, and possibly the*Bootstrap.sh
post-packer script. - Run
UpdateAllImages.sh
orcd
to thescripts
folder and run the particular script/image updater you want. The scripts need to be run from withinscripts/
or breakage occurs.
Branches:
- Master is a generic example
- rac is used for our Rapid Access Cloud
- dair is used for the Digital Accelerator for Innovation and Research cloud
Caveats:
The Fedora, Ubuntu, and Debian images are require a flavour of at least 2-3 GB. The CentOS images require 8+ GB. Since the OpenStack builder uses the local IPv4 address by default - the packer instance needs to be on the same tenant and region as what is defined in the racrc file.
Debian images need extra testing as occasionally the image won't build correctly reporting a 'MBR 1FA:' when you boot the temporary image (before Packer runs). If this is the case try restarting the packer VM/machine and create the Debian image again.
Distros that can be built:
- Ubuntu 12.04
- Ubuntu 14.04
- CentOS 7
- CentOS 6.6
- Fedora 21
- Fedora 22
- Debian 7
- Debian 8.1