[Openstack] [Trove] Newbie Questions
Mark Kirkwood
mark.kirkwood at catalyst.net.nz
Sun Feb 28 06:16:10 UTC 2016
On 28/02/16 00:00, Ludwig Tirazona wrote:
> Hi guys!
>
> Thanks for responding last time. A couple of follow-up questions:
>
> 1.) The rabbit_host I define in trove.conf, trove-conductor.conf,
> trove-taskmanager.conf, this is a Rabbit host that is contactable by
> both the Trove services and the Trove DB instances, right? I mean, I
> don't need the Trove services to be able to contact the other OpenStack
> services via Rabbit? If they DO need to, can you suggest a "basic" setup
> for that?
>
Can be a completely separate rabbit AFAICS.
> 2.) When I run
> http://tarballs.openstack.org/trove/images/ubuntu/mysql.qcow2 as an
> instance, how do I access the CLI? Is there a default username/password?
> How do I configure it to access the RabbitMQ that it is supposed to
> contact Trove services through?
You use the trove database and user mgmt commands, e.g (from my
Juno/Kilo notes...):
$ trove list
+--------------------------------------+------+-----------+--------+-----------+------+
| id | name | datastore | status |
flavor_id | size |
+--------------------------------------+------+-----------+--------+-----------+------+
| 95ae7758-a3d7-49e1-b6be-d36e6f79df00 | db1 | mysql | ACTIVE |
7 | 2 |
+--------------------------------------+------+-----------+--------+-----------+------+
# should actually do a 'trove show 95ae7758-a3d7-49e1-b6be-d36e6f79df00'
above to get the ip address (sorry)
$ trove database-create 95ae7758-a3d7-49e1-b6be-d36e6f79df00 db
$ trove user-create 95ae7758-a3d7-49e1-b6be-d36e6f79df00 user password
--databases db
$ mysql -h 10.0.0.2 -u user -p db
mysql> CREATE TABLE tab(id integer PRIMARY KEY, val text);
Query OK, 0 rows affected (0.37 sec)
>
> 3.) Pertaining to the Disk Image Builder, the instructions at
> http://docs.openstack.org/developer/trove/dev/building_guest_images.html
> tell me that "This command will create a guest image usable by Trove:"
>
> export HOST_USERNAME
> export HOST_SCP_USERNAME
> export GUEST_USERNAME
> export NETWORK_GATEWAY
> export REDSTACK_SCRIPTS
> export SERVICE_TYPE
> export PATH_TROVE
> export ESCAPED_PATH_TROVE
> export SSH_DIR
> export GUEST_LOGDIR
> export ESCAPED_GUEST_LOGDIR
> export ELEMENTS_PATH=$REDSTACK_SCRIPTS/files/elements:$PATH_TRIPLEO_ELEMENTS/elements
> export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
> 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}" \
> -x ${QEMU_IMG_OPTIONS} ${DISTRO} ${EXTRA_ELEMENTS} \
> vm heat-cfntools cloud-init-datasources ${DISTRO}-guest \
> ${DISTRO}-${SERVICE_TYPE}
>
>
> I made this as an .sh file and ran it. DIB would die because I did not
> set values for the "export" lines above. But, there are no explanations
> in the documentation as to what the variables mean. For example, what
> should I put as SSH_DIR? What's "ESCAPED_PATH_TROVE" for? What should I
> put as its value? A lot of lacking little details that yet are important
> discouraged me from trying to build my own image.
>
I used:
$ export ESCAPED_PATH_TROVE=`echo $PATH_TROVE | sed 's/\//\\\\\//g'`
$ export SSH_DIR=${HOMEDIR}/.ssh
$ export ESCAPED_GUEST_LOGDIR=`echo $GUEST_LOGDIR | sed 's/\//\\\\\//g'`
again for Juno/Kilo branch...hopefully there are not too many new ones
to *guess* values for!!!
> Thanks for the help!!! I'm about to tear my hair out over this.
>
Yeah, we need to do better with documenting the details here...I feel
your pain
Cheers
Mark
More information about the Openstack
mailing list