Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello OpenStack starter, There are actually two books you can follow, one by Amrith (from Tesora) - titled "OpenStack Trove" or another book by me, "OpenStack Trove Essentials". In my book, this is detailed in Chapter 4. I do recommend you read one of these books for a better understanding of Trove.

However for your question. You are using Disk Image Builder, so here you need a system where you would build the images. For testing purposes let it be the Trove server itself.

So, before you start to build the images, you would have done the following

  1. You would have installed the Trove server components (and also the Guest agent would be copied down on the Server, while its not used from the server perspective)
  2. You should have created a SSH keypair on the Trove server. This key pair will be used to copy down the Guest agent to the image. Normally, after the creation of the SSH keypair, you would have updated the Authorized Keys file under a user account.

Now assume this

The Trove Server has a hostname of "tserver", and this is where you have cloned the guest agent respository and also creating the images using the DIB. You have logged in to the "tserver", with a username of "user1".

It is under this username that you have created the SSH Keys and the authorized_keys file, by using the following commands

cd ~user1/.ssh
ssh-keygen -t rsa -b 4096
cat ~user1/.ssh/id_rsa.pub >> ~user1/.ssh/authorized_keys
chmod 755 ~user1/.ssh
chmod 644 ~user1/.ssh/authorized_keys

While, I am sure you know, ~user1 just simply points to the home directory of the user account.

You are creating the image, and you want to run the Guest agent on the trove instances (that will be cloned from your image) under the username of say "ubuntu"

Now that you have this , the config file will look like below

export HOST_USERNAME=user1
export HOST_SCP_USERNAME=user1
export GUEST_USERNAME=ubuntu
export NETWORK_GATEWAY=10.0.0.1 (Should be the IP of the Trove Server)
export REDSTACK_SCRIPTS=/opt/stack/trove-integration/scripts
export PATH_TROVE=/opt/stack/trove

Now, It allows the trove instance to connect to the trove server and fetch the guest agent upon boot. (It uses the SSH key that was generated and also the username)

I hope this answers your question