Cloud computing

Installing TripleO Quickstart

This is a brief recipe about how to manually install TripleO Quickstart in a remote 32GB RAM box and not dying trying it.

Now instack-virt-setup is deprecated :( :( :( so the manual process needs to evolve and use OOOQ (TripleO Quickstart).

This post is a brief recipe about how to provision the Hypervisor node and deploy an end-to-end development environment based on TripleO-Quickstart.

From the hypervisor run:

# In this dev. env. /var is only 50GB, so I will create
# a sym link to another location with more capacity.
# It will take easily more tan 50GB deploying a 3+1 overcloud
sudo mkdir -p /home/libvirt/
sudo ln -sf /home/libvirt/ /var/lib/libvirt
# Add default toor user
sudo useradd toor
echo "toor:toor" | chpasswd
echo "toor ALL=(root) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/toor
sudo chmod 0440 /etc/sudoers.d/toor
sudo yum install -y lvm2 lvm2-devel
su - toor
whoami

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 .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"
export VIRTHOST=127.0.0.2

ssh root@$VIRTHOST uname -a

Now, we can start deploying TripleO Quickstart by following:

# Source: http://rdo-ci-doc.usersys.redhat.com/docs/tripleo-environments/en/latest/oooq-downstream.html
# Downstream bits for OSP8 ...
# cd
# sudo yum -y install /usr/bin/c_rehash ca-certificates
# sudo update-ca-trust check
# sudo update-ca-trust force-enable
# sudo update-ca-trust enable
# wget cert.pem
# sudo cp cert.pem /etc/pki/tls/certs/
# sudo cp cert.pem /etc/pki/ca-trust/source/anchors/
# sudo c_rehash
# sudo update-ca-trust extract
# git clone https://github.com/openstack/tripleo-quickstart
# cd tripleo-quickstart
# wget http://rhos-release.virt.bos.redhat.com/ci-images/internal-requirements-new.txt
# cd
# chmod u+x ./tripleo-quickstart/quickstart.sh
# bash ./tripleo-quickstart/quickstart.sh --install-deps
# bash ./tripleo-quickstart/quickstart.sh -v --release rhos-8-baseos-undercloud --clean --teardown all --requirements "/home/toor/tripleo-quickstart/internal-requirements-new.txt" $VIRTHOST

git clone https://github.com/openstack/tripleo-quickstart
chmod u+x ./tripleo-quickstart/quickstart.sh
printf "\n\nSee:\n./tripleo-quickstart/quickstart.sh --help for a full list of options\n\n"
bash ./tripleo-quickstart/quickstart.sh --install-deps

export VIRTHOST=127.0.0.2
export CONFIG=~/deploy-config.yaml

cat > $CONFIG << EOF

# undercloud_undercloud_hostname: undercloud.ratata-domain

# control_memory: 8192
# compute_memory: 6120

# undercloud_memory: 10240
# undercloud_vcpu: 4
# undercloud_workers: 3

# default_vcpu: 1

custom_nameserver: '10.16.36.29'
undercloud_undercloud_nameservers: '10.16.36.29'              
overcloud_dns_servers: '10.16.36.29'

# node_count: 4

# overcloud_nodes:
#   - name: control_0
#     flavor: control
#     virtualbmc_port: 6230
#   - name: control_1
#     flavor: control
#     virtualbmc_port: 6231
#   - name: control_2
#     flavor: control
#     virtualbmc_port: 6232
#   - name: compute_0
#     flavor: compute
#     virtualbmc_port: 6233

# topology: >-
#   --control-scale 3
#   --compute-scale 1

extra_args: >-
  --libvirt-type qemu
  --ntp-server pool.ntp.org
#   -e /usr/share/openstack-tripleo-heat-templates/environments/puppet-pacemaker.yaml

run_tempest: false
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 \
                --tags all \
                -e @$CONFIG \
                $VIRTHOST

In the hypervisor run the following command to log-in in the Undercloud:

ssh -F /home/toor/.quickstart/ssh.config.ansible undercloud

# Add the TRIPLEO_ROOT var to stackrc
# to use with tripleo-ci
echo "export TRIPLEO_ROOT=~" >> stackrc

source stackrc

At this point you should have your development environment deployed correctly.

Clone the tripleo-ci repo:

git clone https://github.com/openstack-infra/tripleo-ci

And, run the Overcloud pingtest:

~/tripleo-ci/scripts/tripleo.sh --overcloud-pingtest

Enjoy TripleOing (~˘▾˘)~

Note: I had to execute the deployment command 3/4 times to have an OK deployment, sometimes it just fails (i.e. timeout getting the images).

Note: From the host, virsh list --all will work only as the stack user.

Note: Each time you run the quickstart.sh command from the hypervisor the UC and OC will be nuked (--teardown all), you will see tasks like ‘PLAY [Tear down undercloud and overcloud vms] **’.

Note: If you delete the Overcloud i.e. using heat stack-delete overcloud you can re-deploy what you had by running the dynamically generated overcloud-deploy.sh script in the stack home folder from the UC.

Note: There are several options for TripleO Quickstart besides the basic virthost deployment, check them here: https://docs.openstack.org/developer/tripleo-quickstart/working-with-extras.html

Updated 2017/03/17: Bleh, had to execute several times the deployment command to have it working.. :/ I miss you instack-virt-setup

Updated 2017/03/16: The --config option seems to be broken, using instead -e @~/deploy-config.yaml.

Updated 2017/03/14: New workflow added.

Updated 2017/02/27: Working fine.

Updated 2017/02/23: Seems to work.

Updated 2017/02/23: instack-virt-setup is deprecatred :( moving to tripleo-quickstart.


2 Responses

Want to leave a comment? Visit this post's issue page on GitHub (you'll need a GitHub account. What? Like you already don't have one?!).

dbaxps
2017-03-25T21:03:58Z

KSM Performance on TripleO QS is much more efficient than the one which was provided by instack-virt-setup ( even activated before deployment ). I guess explanation might be found here 👎
http://blog.oddbit.com/2016/05/19/connecting-another-vm-to-your-tripleo-qu/
TripleO QS works pretty stable for me via 👎
$ bash quickstart.sh -R master --config config/general_config/pacemaker.yml
--nodes config/nodes/3ctl_1comp_2ceph.yml $VIRTHOST

dbaxps
2017-03-26T08:35:58Z

Addressing complain "Updated 2017/03/16: The --config option seems to be broken, using instead -e @~/deploy-config.yaml.". See README.rst 👎
Feature Configuration and Nodes

In previous versions of triple-quickstart a config file was used to determine
not only the features that would be enabled in tripleo and openstack but also
the number of nodes to be used. For instance "config/general_config/ha.yml" would
configure pacemaker and ensure three controller nodes were provisioned. This type
of configuration is now deprecated but will still work through the Queens release.

The feature and node configuration have been seperated into two distinct
configuration files to allow users to explicity select the configuration known as
"feature sets" and the nodes to be provisioned. The feature set configuration
can be found under tripleo-quickstart/config/general_config/ and the node
configuration can be found under tripleo-quickstart/config/nodes/

Your $CONFIG doesn't look quite correct for me, please, see 👎
http://dbaxps.blogspot.com/2017/03/tripleo-quickstart-master-branch.html
"--tags all" is skipped due to hack /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-mon.yaml to update "ceph::profile::params::osd_pool_default_size: 2" after logging into undercloud.
Only 32 GB on VIRTHOST - it doesn't allow to deploy Ceph Cluster as needed.