7e98da3d0f
For a very long time we've been parsing and using the lxc images as provided by upstream lxc. While these images are functional there are by no means optimal. In general they're quite a bit larger than they need to be and contian a lot of little sharp edges that have cut us over the years. This change removes all of the lxc image cache parsing and meta-data linking and simply downloads the rootfs a given url. To maintain compatibility with the legacy images a script has been created to parse the image index and return the legacy image url. The result of this change: * Access to smaller more optimal base image which is well known by the corresponding communities. * Deployers now have the ability to set and forget the download url for an internal image instead of having to create a cache infrastructure compatible with the lxc download template. * Any rootfs tarball will work as an image. * Fewer tasks are executed and less memory is consumed resulting in faster deployment times. * The base cache has a uniform meta-data setup giving all container types the same access to config, devices, and templating. Change-Id: I1775e775bbb7fe86bdffdd8296c2cff5ebc5bac8 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
22 lines
604 B
Django/Jinja
22 lines
604 B
Django/Jinja
|
|
# System containers will require mount points for the following
|
|
mkdir -p /dev
|
|
mkdir -p /proc
|
|
mkdir -p /sys/fs/cgroup
|
|
|
|
# In order for the package manager to function /dev/null must exist. This is
|
|
# is being run here because some images do not create /dev/null by default.
|
|
if [[ ! -e /dev/null ]]; then
|
|
mknod /dev/null c 1 3
|
|
chmod 0666 /dev/null
|
|
fi
|
|
|
|
# Create the directory where local facts will be stored
|
|
mkdir -p /etc/ansible/facts.d
|
|
|
|
# Create the cache resolvers
|
|
rm /etc/resolv.conf || true
|
|
{% for resolver in lxc_cache_prep_dns %}
|
|
echo "nameserver {{ resolver }}" >> /etc/resolv.conf
|
|
{% endfor %}
|