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>
99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
## APT Cache Options
|
|
cache_timeout: 600
|
|
|
|
_lxc_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.4-base-{{ lxc_cache_map.arch }}.tar.gz"
|
|
|
|
# Required apt packages.
|
|
lxc_hosts_distro_packages:
|
|
- apparmor
|
|
- apparmor-profiles
|
|
- apparmor-utils
|
|
- aria2
|
|
- bridge-utils
|
|
- btrfs-tools
|
|
- cgmanager
|
|
- cgroup-lite
|
|
- dbus
|
|
- debootstrap
|
|
- dnsmasq-base
|
|
- git
|
|
- iptables
|
|
- irqbalance
|
|
- language-pack-en
|
|
- liblxc1
|
|
- lxc
|
|
- lxc-dev
|
|
- lxc-templates
|
|
- python-dev
|
|
- python3-lxc
|
|
- systemd-container
|
|
- pxz
|
|
|
|
# Package to remove from the host
|
|
lxc_hosts_remove_distro_packages:
|
|
- dnsmasq
|
|
|
|
lxc_xz_bin: pxz
|
|
|
|
system_config_dir: "/etc/default"
|
|
systemd_utils_prefix: "/lib/systemd"
|
|
lxc_cache_map:
|
|
distro: ubuntu
|
|
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
|
|
release: xenial
|
|
copy_from_host:
|
|
- /etc/apt/sources.list
|
|
- /etc/apt/apt.conf.d/
|
|
- /etc/apt/preferences.d/
|
|
- /etc/environment
|
|
- /etc/localtime
|
|
- /root/repo.keys
|
|
|
|
# This forces any modified configurations to remain, and any unmodified configs to be replaced
|
|
# ref: http://serverfault.com/questions/259226/automatically-keep-current-version-of-config-files-when-apt-get-install
|
|
lxc_cache_install_debconf: '-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" --force-yes'
|
|
|
|
_lxc_cache_prep_template: "prep-scripts/ubuntu_16_prep.sh.j2"
|
|
|
|
_lxc_cache_distro_packages:
|
|
- apt-transport-https
|
|
- ca-certificates
|
|
- cron # xenial doesn't have cronie
|
|
- dbus
|
|
- gcc
|
|
- iproute2
|
|
- iputils-ping
|
|
- libffi-dev
|
|
- libssl-dev
|
|
- openssh-server
|
|
- openssl
|
|
- python2.7
|
|
- python-dev
|
|
- python3-dev
|
|
- rsync
|
|
- sudo
|
|
- systemd
|
|
- systemd-sysv
|
|
- tar
|
|
- wget
|
|
- debianutils # for 'which' executable
|
|
|
|
lxc_cached_network_interfaces:
|
|
- src: "lxc-net-bridge.cfg.j2"
|
|
dest: "/etc/network/interfaces.d/lxc-net-bridge.cfg"
|