Skip to content

working with a deployed cloud

Adam Spiers edited this page Dec 7, 2017 · 4 revisions

Working with a deployed cloud

This page assumes you already have a cloud deployed, and some (but not all) of it also assumes that you deployed that cloud via astack.sh - if not, please first see the getting started page.

Contents

Choosing the right Vagrant model

When you run astack.sh, and either specify a cloud or use the default one which is deployerincloud-lite, this means you will use the Vagrant "model" as specified in the ardana-dev-tools/ardana-vagrant-models/${cloud}-vagrant directory.

ssh to the deployer node

Once you have deployed your cloud you will need to log in to the deployer node. In the case of some Vagrant models, the deployer doubles as a controller node. For example, with deployerincloud-lite, it is called ccn-0001:

ssh -F ardana-dev-tools/ardana-vagrant-models/deployerincloud-lite-vagrant/astack-ssh-config ccn-0001

Using the OpenStack CLI

In the home directory on the deployer you will find the basic admin credentials, e.g. service.osrc or keystone.osrc, which can be used to manipulate the OpenStack environment via the standard CLI tools.

Using Horizon dashboard

Additionally if you search in the service.osrc for the OS_AUTH_URL and OS_PASSWORD, you will see the IP address and password at which the Horizon UI can be accessed, from the host system.

Depending on where you run your browser, you may need to use ssh port forwarding to reach the dashboard, e.g.

  1. On your local host create a tunnel:

    ssh -N -L 8443:HORIZON_IP:443 ardana@HOST_IP
    
  2. Point your browser to https://localhost:8443

  3. Use the triplet (default / admin / OS_PASSWORD) to login

NOTE: You may need to retrieve the ardana cert from the deployer, and install it on the system where you are running your web browser, similarly to the documented Debian/Ubuntu instructions here in the README.md.

Updating ansible source in a deployed developer cloud

A utility script has been provided to allow you to update the ansible sources in a deployed developer cloud, and can be used as followed:

  1. Update your ansible sources appropriately, e.g. clone & edit appropriate sources repo such as nova-ansible.
  2. Change to the ardana-dev-tools/ardana-vagrant-models/${cloud}-vagrant directory
  3. Run ../../bin/update-ansible.sh ${ansible_repo_name}
    • If you want to run a specific playbook to deploy the updating the ansible sources, you can specify it on the end of the command line, e.g. ../../bin/update-ansible.sh nova-ansible nova-deploy.yml

Updating a venv in a deployed developer cloud

A utility script has been provided to allow you to update a venv in a deployed developer cloud, and can be used as followed:

  1. Update your venv sources appropriately, e.g. clone & edit appropriate sources repos
  2. Change to the ardana-dev-tools/ardana-vagrant-models/${cloud}-vagrant directory
  3. Run ../../bin/update-venv.sh ${venv}
    • If you want to run a specific playbook to deploy the updated venv, you can specify it on the end of the command line, e.g. ../../bin/update-venv.sh nova nova-deploy.yml
    • If you want to update the venv for a platform other than the default hlinux, i.e. update nova venv used on SLES computes, remember to include the --sles option when running update-venv.sh.

Recovering from crashed services

Due to deployerincloud-lite running with a minimal RAM profile, you may find that services on your controller get killed by the kernel OOM-killer if running for a long time. You can restart them with something like:

cd ~/scratch/ansible/next/ardana/ansible
ansible-playbook -i hosts/verb_hosts keystone-start.yml

However, if mysqld crashed, it might be trickier to recover. In this case, do:

cd ~/scratch/ansible/next/ardana/ansible
ansible-playbook -i hosts/verb_hosts percona-bootstrap.yml

and carefully follow the instructions. Usually this translates to needing to do:

sudo service mysql stop
sudo /etc/init.d/mysql bootstrap-pxc
sudo service mysql restart
cd ~/scratch/ansible/next/ardana/ansible
ansible-playbook -i hosts/verb_hosts percona-start.yml

You should also ensure that rabbitmq, haproxy and keepalived (controlled by FND-CLU-* roles which refer to the cluster foundation), apache, and keystone are all running, since without them nothing else will work:

cd ~/scratch/ansible/next/ardana/ansible
ansible-playbook -i hosts/verb_hosts \
    rabbitmq-start.yml \
    FND-CLU-start.yml \
    FND-AP2-start.yml \
    keystone-start.yml

You can see the full ordered list of services in ~/scratch/ansible/next/ardana/ansible/ardana-start.yml which is dynamically generated from ardana-start.yml.j2 in the ardana-ansible repo.

Clone this wiki locally