Last active
May 17, 2018 11:10
-
-
Save jfrancoa/33dc1c392c0477b27ad841dbe5ee4df1 to your computer and use it in GitHub Desktop.
Script to install quickstart in an automated way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
su - toor | |
sudo yum groupinstall "Virtualization Host" -y | |
sudo yum install git -y | |
# Disable requiretty otherwise the deployment will fail... | |
sudo sed -i -e 's/Defaults[ \t]*requiretty/#Defaults requiretty/g' /etc/sudoers | |
cd | |
mkdir -p .ssh | |
ssh-keygen -t rsa -N "" -f .ssh/id_rsa | |
cat .ssh/id_rsa.pub >> .ssh/authorized_keys | |
sudo bash -c "cat .ssh/id_rsa.pub >> /root/.ssh/authorized_keys" | |
sudo bash -c "echo '127.0.0.1 127.0.0.2' >> /etc/hosts" | |
if [ ! -d tripleo-quickstart ]; then | |
git clone https://github.com/openstack/tripleo-quickstart | |
chmod u+x ./tripleo-quickstart/quickstart.sh | |
fi | |
bash ./tripleo-quickstart/quickstart.sh --install-deps | |
export VIRTHOST=127.0.0.2 | |
export CONFIG=~/deploy-config.yaml | |
cat > $CONFIG << EOF | |
custom_nameserver: ['10.16.36.29'] | |
undercloud_undercloud_nameservers: ['10.16.36.29'] | |
overcloud_dns_servers: ['10.16.36.29'] | |
extra_args: >- | |
--libvirt-type qemu | |
EOF | |
# We disable SELINUX as it breaks the deployment | |
# You will get some permission denied when running | |
# the Ansible playbooks | |
sudo setenforce 0 | |
bash ./tripleo-quickstart/quickstart.sh \ | |
--clean \ | |
--release master \ | |
--teardown all \ | |
--config tripleo-quickstart/config/general_config/pacemaker.yml \ | |
--tags "untagged,provision,environment,libvirt,undercloud-scripts,undercloud-inventory,overcloud-scripts,undercloud-install,undercloud-post-install,tripleo-validations,overcloud-scripts,overcloud-prep-config,overcloud-prep-containers,overcloud-deploy,overcloud-upgrade,overcloud-validate" \ | |
--nodes tripleo-quickstart/config/nodes/1ctlr_1comp.yml \ | |
-e @$CONFIG \ | |
$VIRTHOST | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment