instack-undercloud/scripts/instack-install-undercloud-packages
2014-08-22 08:30:26 -04:00

56 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
set -eu
mkdir -p ~/.instack
LOGFILE=~/.instack/install-undercloud.log
exec > >(tee $LOGFILE)
exec 2>&1
echo "Running $0"
export JSONFILE=${JSONFILE:-/usr/share/instack-undercloud/json-files/fedora-20-undercloud-packages.json}
export ELEMENTS_PATH=${ELEMENTS_PATH:-"/usr/share/diskimage-builder/elements/ \
/usr/share/tripleo-image-elements/ \
/usr/share/instack-undercloud/"}
echo "Sourcing answers file from instack.answers..."
source ~/instack.answers
export LOCAL_IP
export DNSMASQ_START
export DNSMASQ_END
export LOCAL_INTERFACE
export MASQUERADE_NETWORK
export POWER_DRIVER
export VIRTUAL_POWER_USER
export VIRTUAL_POWER_HOST
export DHCP_START
export DHCP_END
export NETWORK_CIDR
export NETWORK_GATEWAY
export SSH_KEY
export UNDERCLOUD_DB_PASSWORD=${UNDERCLOUD_DB_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_ADMIN_TOKEN=${UNDERCLOUD_ADMIN_TOKEN:-$(tripleo os-make-password)}
export UNDERCLOUD_ADMIN_PASSWORD=${UNDERCLOUD_ADMIN_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_GLANCE_PASSWORD=${UNDERCLOUD_GLANCE_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_HEAT_PASSWORD=${UNDERCLOUD_HEAT_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_NEUTRON_PASSWORD=${UNDERCLOUD_NEUTRON_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_NOVA_PASSWORD=${UNDERCLOUD_NOVA_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_IRONIC_PASSWORD=${UNDERCLOUD_IRONIC_PASSWORD:-$(tripleo os-make-password)}
export UNDERCLOUD_TUSKAR_PASSWORD=${UNDERCLOUD_TUSKAR_PASSWORD:-$(tripleo os-make-password)}
sudo -E instack \
-p $ELEMENTS_PATH \
-j $JSONFILE
RUN_ORC=${RUN_ORC:-"1"}
if [ "$RUN_ORC" = "1" ]; then
sudo os-refresh-config
fi
echo "$0 complete!"