Ask Your Question

How do I build a trove image?

asked 2016-07-29 03:50:50 -0500

openstackstarter gravatar image

My Openstack cloud is quite successfully working with 3node, and now I'm stuck with Trove. I'm following ( to make an image, but quite not sure that I understand what it says. On this web page, it says commands below will make a guest image with no problem, but I don't understand how that works. HOST_USERNAME is the host where I'm making image, but where or how do I configure that? I'm having trouble starting off.... where should I start to build a trove image, or is there any other page where including detailed guide?

export SSH_DIR
local QEMU_IMG_OPTIONS=$(! $(qemu-img | grep -q 'version 1') && \
     echo "--qemu-img-options compat=0.10")
${PATH_DISKIMAGEBUILDER}/bin/disk-image-create -a amd64 -o "${IMAGE_NAME}" \
     vm heat-cfntools cloud-init-datasources ${DISTRO}-guest \
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-07-31 05:38:30 -0500

Alok Shrivastwa gravatar image

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/ >> ~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= (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

edit flag offensive delete link more


Unfortunately, this information is out of date. trove-integration is now no longer maintained.

amrith gravatar imageamrith ( 2016-11-28 10:57:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-07-29 03:50:50 -0500

Seen: 374 times

Last updated: Jul 29 '16