Updates and bug fixes
Several minor issues/annoyances fixed * Changed the http_proxy tests to [ ! -z ] rather than [ -n ] * Added http_proxy tests to no-cobbler-configure-vms.sh * Added additional packages that are missing when a trusty OnMetal is upgraded to Xenial * The isc-dhcp-server and atftpd services were not coming up so I have added specific restarts for both services to ensure that they come up * Updated variables.sh to respect user set overrides, defaults have not been altered Change-Id: I23ee641c2b6a36b18f4486f62af569d1ad28d5dc
This commit is contained in:
parent
33da8fc8eb
commit
e398389342
@ -107,7 +107,7 @@ if [[ "${PRE_CONFIG_OSA}" = true ]]; then
|
||||
osa_user_var_add glance_default_store 'glance_default_store: swift'
|
||||
|
||||
# Propagate host proxy settings (if set) into /etc/environment in the targets
|
||||
if [ -n "$http_proxy" ]; then
|
||||
if [ ! -z ${http_proxy+x} ]; then
|
||||
osa_user_var_add proxy_env_url 'proxy_env_url: '${http_proxy}
|
||||
osa_user_var_add no_proxy_env 'no_proxy_env: "localhost,127.0.0.1,{{ internal_lb_vip_address }},{{ external_lb_vip_address }},{% for host in groups['\''all_containers'\''] %}{{ hostvars[host]['\''container_address'\''] }}{% if not loop.last %},{% endif %}{% endfor %}"'
|
||||
osa_user_var_add global_environment_variables 'global_environment_variables:'
|
||||
|
@ -34,12 +34,15 @@ done
|
||||
# Ensure that all running VMs have an updated apt-cache with keys
|
||||
# and copy our http proxy settings into each VM (in the environment and apt.conf)
|
||||
for node in $(get_all_hosts); do
|
||||
if [ ! -z ${http_proxy+x} ]; then
|
||||
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys; \
|
||||
echo \"http_proxy=$http_proxy\" >> /etc/environment; \
|
||||
echo \"https_proxy=$https_proxy\" >> /etc/environment; \
|
||||
echo \"no_proxy=localhost,127.0.0.1,10.0.0.200\" >> /etc/environment; \
|
||||
echo \"Acquire::http::Proxy \\\"$http_proxy\\\";\" >> /etc/apt/apt.conf"
|
||||
|
||||
else
|
||||
ssh -q -n -f -o StrictHostKeyChecking=no 10.0.0.${node#*":"} "mkdir -p /tmp/keys"
|
||||
fi
|
||||
for i in /etc/apt/apt.conf.d/00-nokey /etc/apt/sources.list /etc/apt/sources.list.d/* /tmp/keys/*; do
|
||||
if [[ -f "$i" ]]; then
|
||||
scp "$i" "10.0.0.${node#*":"}:$i"
|
||||
|
@ -42,7 +42,7 @@ fi
|
||||
|
||||
# Install basic packages known to be needed
|
||||
apt-get update && apt-get install -y bridge-utils ifenslave libvirt-bin lvm2 openssh-server python2.7 qemu-kvm ansible virtinst virt-manager \
|
||||
vlan software-properties-common python-software-properties python-netaddr
|
||||
vlan software-properties-common python-software-properties python-netaddr ntp qemu-utils lxc1 virtualenv
|
||||
|
||||
if ! grep "^source.*cfg$" /etc/network/interfaces; then
|
||||
echo 'source /etc/network/interfaces.d/*.cfg' | tee -a /etc/network/interfaces
|
||||
|
@ -25,5 +25,10 @@ source functions.rc
|
||||
ansible-playbook -v -i inventory create_pxeboot_server.yml --extra-vars \
|
||||
"vm_disk_device=${DEVICE_NAME} ssh_key=\"${SSHKEY}\" vm_net_iface=${DEFAULT_NETWORK}"
|
||||
sed -i 's/^INTERFACES.*/INTERFACES="br-dhcp"/g' /etc/default/isc-dhcp-server
|
||||
|
||||
# Ensure the services are (re)started
|
||||
service isc-dhcp-server restart
|
||||
service atftpd restart
|
||||
|
||||
# Create a xenial sources file for the VMs to download
|
||||
cp -v templates/xenial-sources.list /var/www/html/xenial-sources.list
|
||||
|
@ -1,67 +1,67 @@
|
||||
# Variables used by multi-node-aio
|
||||
# Network subnet used for all the virtual machines
|
||||
NETWORK_BASE=10.29
|
||||
NETWORK_BASE="${NETWORK_BASE:-10.29}"
|
||||
# DNS used throughout the deploy
|
||||
DNS_NAMESERVER=$(cat /etc/resolv.conf | grep -m 1 "nameserver" | sed "s/nameserver //")
|
||||
#DNS_NAMESERVER=8.8.8.8
|
||||
#DNS_NAMESERVER="${DNS_NAMESERVER:-8.8.8.8}"
|
||||
|
||||
# By default AIO deploy overrides apt-sources, if things like a local mirror are already
|
||||
# set up then this script will override these. This option allows for the override to be
|
||||
# disabled.
|
||||
OVERRIDE_SOURCES=false
|
||||
OVERRIDE_SOURCES="${OVERRIDE_SOURCES:-false}"
|
||||
|
||||
# What branch of Openstack-Ansible are we deploying from
|
||||
OSA_BRANCH=stable/newton
|
||||
OSA_BRANCH="${OSA_BRANCH:-stable/newton}"
|
||||
|
||||
# What is the default disk device name
|
||||
DEVICE_NAME=vda
|
||||
DEVICE_NAME="${DEVICE_NAME:-vda}"
|
||||
|
||||
# What default network device should we use
|
||||
DEFAULT_NETWORK=ens3
|
||||
DEFAULT_NETWORK="${DEFAULT_NETWORK:-ens3}"
|
||||
|
||||
# What is the default virtual machine disk size in GB
|
||||
VM_DISK_SIZE=252
|
||||
VM_DISK_SIZE="${VM_DISK_SIZE:-252}"
|
||||
|
||||
# Do we want to do all the required host setup
|
||||
SETUP_HOST=true
|
||||
SETUP_HOST="${SETUP_HOST:-true}"
|
||||
|
||||
# What fisk shall we use for the default data
|
||||
DATA_DISK_DEVICE=sdb
|
||||
DATA_DISK_DEVICE="${DATA_DISK_DEVICE:-sdb}"
|
||||
|
||||
# Do we want to do disk partitioning or is there a partition ready to use
|
||||
PARTITION_HOST=true
|
||||
PARTITION_HOST="${PARTITION_HOST:-true}"
|
||||
|
||||
# Force partition - If the above variable is set to -F then we will use the force
|
||||
# option of MKFS so there is no confirm
|
||||
FORCE_PARTITION="-F"
|
||||
|
||||
# Do we want to set up networking on the host for Virsh
|
||||
SETUP_VIRSH_NET=true
|
||||
SETUP_VIRSH_NET="${SETUP_VIRSH_NET:-true}"
|
||||
|
||||
# When the virtual machines are re-kicked do we format them
|
||||
VM_IMAGE_CREATE=true
|
||||
VM_IMAGE_CREATE="${VM_IMAGE_CREATE:-true}"
|
||||
|
||||
# Should we run the deploy Openstack-Ansible script at the end of the build script
|
||||
DEPLOY_OSA=true
|
||||
DEPLOY_OSA="${DEPLOY_OSA:-true}"
|
||||
|
||||
# Should we pre-configure the environment before we deploy OpenStack-Ansible
|
||||
PRE_CONFIG_OSA=true
|
||||
PRE_CONFIG_OSA="${PRE_CONFIG_OSA:-true}"
|
||||
|
||||
# Should we run the final deploy of OpenStack-Ansible
|
||||
RUN_OSA=true
|
||||
RUN_OSA="${RUN_OSA:-true}"
|
||||
|
||||
# Should we use PXEboot
|
||||
SETUP_PXEBOOT=true
|
||||
SETUP_PXEBOOT="${SETUP_PXEBOOT:-true}"
|
||||
|
||||
# Should we create the virtual machines
|
||||
CREATE_VMS=true
|
||||
CREATE_VMS="${CREATE_VMS:-true}"
|
||||
|
||||
# Should we configure the virtual machines
|
||||
CONFIGURE_VMS=true
|
||||
CONFIGURE_VMS="${CONFIGURE_VMS:-true}"
|
||||
|
||||
# Container vms - override the container virtual machines with xenial
|
||||
CONTAINER_VMS=xenial
|
||||
CONTAINER_VMS="${CONTAINER_VMS:-xenial}"
|
||||
|
||||
# Ethernet type, this needs to be ens for Xenial and is for
|
||||
# templates/network-interfaces/vm.openstackci.local-bonded-bridges.cfg file
|
||||
ETH_TYPE=ens
|
||||
ETH_TYPE="${ETH_TYPE:-ens}"
|
||||
|
Loading…
Reference in New Issue
Block a user