Jump to: navigation, search


Trove-Integration/redstack setup

Requirements on ubuntu 14.04 before running ./redstack install

  • sudo apt-get install python-pip
  • sudo apt-get install python-dev
  • sudo apt-get install mysql-server (set mysql server root password to e1a2c042c828d3566d0a which is the same password as in devstack/localrc)
  • clone Trove-integration git clone https://github.com/openstack/trove-integration.git
  • Now run ./redstack install
  • If redstack install was successful you can now run ./redstack kick-start mysql to add the ubuntu-mysql image
  • To confirm redstack kick-start mysql built the image run the command "nova image-list" (make sure to run the command "source devstack/openrc admin admin" for credentials for nova and trove commands), it should output a table that looks like this:
ID | Name | Status | Server
e5000bf0-f835-4bb0-aba9-59fa75fdddea | Fedora-x86_64-20-20140618-sda | ACTIVE |
f772bb58-d67a-49a2-9aae-86aed749b7f2 | cirros-0.3.2-x86_64-uec | ACTIVE |
03ae7b12-a05b-4882-b809-e3544a0e612f | cirros-0.3.2-x86_64-uec-kernel | ACTIVE | 
65e856b0-82bb-4cde-a025-2ab02acb858f | cirros-0.3.2-x86_64-uec-ramdisk | ACTIVE |
f0fa6de7-d3da-459d-8908-00ed724c325e | mysql | ACTIVE |
d0881709-15b8-4c41-bc0a-d9357670d1ec | ubuntu_mysql | ACTIVE |

If ubuntu_mysql is not in the list it means there was an error when building the image with ./redstack kick-start mysql and you will need to run ./redstack kick-start mysql again.

After redstack runs it automatically generates the devstack/localrc file and enables the trove services


Enable Neutron support on Trove-Integration/redstack

  • Set ENABLE_NEUTRON=true on redstack.rc which will set the neutron enabled services and disable the nova network
  • When enabling neutron on redstack the devstack/localrc will now contain the following:
 disable_service n-net

Adding TripleO-Image-Elements to Trove-Integration/redstack images

When you run ./redstack kick-start mysql it creates an image under ~/images/ubuntu-mysql from Trove-Integration/scripts/elements/ubuntu-mysql. If you want to add an element to ubuntu-mysql such as os-apply-config (https://github.com/openstack/tripleo-image-elements/tree/master/elements/os-apply-config) you need to add the variable EXTRA_ELEMENTS to the trove-integration/scripts/redstack.rc file. By default redstack kick-start should be able to find os-apply-config because it clones all of the tripleo-image-elements. The Elements path redstack kick-start uses is ELEMENTS_PATH=$REDSTACK_SCRIPTS/files/elements:$PATH_TRIPLEO_ELEMENTS/elements

  • Ex: EXTRA_ELEMENTS="os-apply-config" # adding single element
  • Ex: EXTRA_ELEMENTS="os-apply-config os-refresh-config" # adding multiple elements is space delimited

Now when running ./redstack kick-start mysql it will add the os-apply-config element to the ubuntu-mysql image.

  • Now you can add the folder os-apply-config to the Trove-Integration/scripts/elements/ubuntu-mysql image to add custom configuration files etc.
  • Adding the file (foo.conf) and folders (os-apply-config/etc/init) to the element ubuntu-mysql (ubuntu-mysql/os-apply-config/etc/init/foo.conf) will add the file foo.conf to /etc/init when doing a trove create with the new image ./redstack kick-start mysql built.

Rebuilding image

Once an image is created you will need to do nova image-delete and delete the ~/images/ubuntu-mysql file in order to have ./redstack kick-start mysql build the image again. If you do not, the existing image ubuntu-mysql will be used again.

Common Errors

  • trove-api (tr-api from screen) fails to start with error:
 2015-01-15 10:29:07.214 TRACE root RuntimeError: Could not bind to after trying for 30 seconds
 2015-01-15 10:29:07.214 TRACE root

This typically means there are multiple trove-api processes running and a previous unstack didn't clean up everything. To fix this:

  1. Kill the tr-api process from screen -x stack by pressing ctrl-c
  2. Exit out of screen and run ps afx | grep trove-api
  3. If there any trove-api processes then kill all the trove-api proceses (kill <process-id>)
  4. Go back to screen -x stack, navigate to tr-api process and restart process (press up arrow to get last run command which will be the command to restart tr-api)

  • Trove instance shows ERROR state and task manager shows PollTimeOut exception after running "trove create"

There are a couple causes for this error:
1. The guest image "ubuntu-mysql" didn't properly build when running ./redstack kick-start mysql which causes trove to use the default "mysql" image which doesn't have a trove guest agent running.

Run nova image-list and confirm "ubuntu-mysql" is in the list. If not, you will need to run ./redstack kick-start mysql again

2. The trove guest agent didn't properly start or doesn't have connectivity to pull down the trove source.

To diagnose this you will need to do a "nova list" and ssh into the instance that your trove instance with ERROR state is using. After you ssh into the instance you will need to run "sudo cat /var/log/upstart/trove-guest.log" which will show you logging information for what the error is.