Steven Dake [Wed, 12 Sep 2012 22:12:50 +0000 (15:12 -0700)]
Make physical resource names unique based upon stack name
Some templates use the same resource name when registering with
nova. Nova will not allow mulitple resource names to register
with the same name in all cases, and in those it does, it often
becomes confused (in the case of EIP). This patch creates a
dot notation
For the LB test, an example of the resources would be:
teststack.LoadBalancer.LB_instance
teststack.DatabaseServer.MySqlDatabaseServer
teststack.WikiServerOne
Fixes Issue #160
Fixes Issue #136
Thanks to asalkeld@redhat.com for helping sort out the unit
test cases.
Change-Id: I14f4551feb41c7f98caa30dd98f997da6d00c467 Signed-off-by: Steven Dake <sdake@redhat.com>
Jeff Peeler [Wed, 12 Sep 2012 20:25:25 +0000 (16:25 -0400)]
Change Stack to support user defined parameter
This change allows tests to specify DBUsername/DBPassword if necessary.
The keyname is still looked up in nova and the distribution is retrieved
from the already existing Stack parameter.
Change-Id: I3732ffb685d68c8a72a83247f74ed11a50a74cd1 Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Steven Hardy [Tue, 11 Sep 2012 18:23:27 +0000 (19:23 +0100)]
heat : test utils, extract ec2 credentials from keystone
For StackBoto extract the ec2 credentials from keystone and
pass them into the client, so the functional tests don't rely
on ec2 credentials from config-files and only need the currently
provided keystone credentials
Change-Id: Ifc959011cc5b9ee77ebf04e380dc6a4059903c6d Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Tue, 11 Sep 2012 18:03:41 +0000 (19:03 +0100)]
heat : comment credentials in template boto.cfg
Comment out the credentials section in /etc/boto.cfg
this allows us to pass the correct host/endpoint without
having world-readable credentials. This can then be used
as a template for per-user ~/.boto files if desired
Change-Id: I4cea0cb3b790186ddc041edad0ab4ee4b7e8f956 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steve Baker [Tue, 11 Sep 2012 02:58:34 +0000 (14:58 +1200)]
Implement the AWS::S3::Bucket resource type.
An attempt was made to make created bucket names readable and unique.
Names are of the format heat-<resource name>-<random hex>. eg:
heat-S3Bucket-b420d12d02e5d6e46f13
Only the swift v2 auth is currently supported, which means swift will need to
use keystone for auth. This may be a valid assumption for any environment that
is running Heat.
When DeletionPolicy is Delete then an attempt is made to delete the container,
but the stack will still be deleted if container delete fails.
Run the template S3_Single_Instance.template to give it a try.
Functional tests will be coming in a later change.
Update documentation on configuring metadata server
The docs need to reflect the fact that the metadata server cannot be
configured and launched until after Nova has created the virtual bridge
interface.
Add retry logic in order to make creating flavors more
robust. Nova rate-limiting frequently causes actions to fail
so wrap all requests in retry/sleep logic and check we can
connect to nova before attempting to change anything
Ref #225
Change-Id: I1b1014df04602935f561c08ba29287061224b5f3 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 10 Sep 2012 10:03:37 +0000 (11:03 +0100)]
heat tools : add ephemeral disk for all flavors
Add ephemeral disk for all flavors in nova_create_flavors.sh
as it's currently not possible for EBS to work without a fixed
mapping to a specific block device name, meaning the EBS templates
will break for micro/tiny if there if no ephemeral disk defined
Change-Id: I801f00aba5b431d30362cd4b34da2f66457220c5 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 10 Sep 2012 09:49:45 +0000 (10:49 +0100)]
heat tools : check services running after openstack install
Check all expected services are running after starting them when
doing tools/openstack install, should avoid possible racy behavior
when we assume everything is up and immediately call nova_create_flavors.sh
Ref #225
Change-Id: I87ec0ca31579173cb9218fa79e027fd5b15031f0 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Dake [Fri, 7 Sep 2012 20:22:42 +0000 (13:22 -0700)]
Rework functional test case infrasatructure
To support multi-instance, two new classes were made:
Stack - represents a stack
Instance - represents an instance
For multi-instance stacks, create multiple Instance objects
for each instance in the stack.
For each instance in a stack, an instance object can be created which
helps validate the individual instance sets up properly.
test_WordPress_Single_Instance_With_EBS.py fails - see issue #226
Change-Id: Iddec87cd1332a9b5796c5c7e7d382ef723c3544e Signed-off-by: Steven Dake <sdake@redhat.com> Signed-off-by: Tomas Sedovic <tsedovic@redhat.com> Signed-off-by: Ian Main <imain@redhat.com>
Ian Main [Thu, 6 Sep 2012 15:27:45 +0000 (08:27 -0700)]
More EBS fixes.
Single instance with EBS apparently needs an httpd restart in order to
keep talking to mysql after we change the partition. Also change other
EBS templates to use vdc.
Change-Id: I180cca2166a0210d5d8dd3e0aea111ea625b865a Signed-off-by: Ian Main <imain@redhat.com>
Zane Bitter [Thu, 30 Aug 2012 11:32:47 +0000 (13:32 +0200)]
Rename heat-api to heat-api-cfn
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.
Previously stacks could only be referenced by name. Now, use the canonical
stack identifier to act on them. The identifier can be obtained from the
RPC API by looking it up with identify_stack. In the AWS API, the user
can pass an ARN that is converted into an identifier.
This call converts a stack name into a fully-qualified stack identifier.
This allows us to, e.g., add support for keeping deleted stacks around in
the database while still allowing stack names to be reused, since the
deleted stacks can be referenced using this ID.
Update functional test WordPress_Single_Instance_With_EIP
to use the new verify_wordpress which checks that the wordpress
homepage specified in the stack output looks OK
Change-Id: I6b839e95f2c9fc8d89a22c062c393d6f14fb5df9 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Wed, 5 Sep 2012 09:47:46 +0000 (10:47 +0100)]
heat tests : FuncUtils use heat_client in create_stack
Use heat_client (not subprocess) to create the stack,
as this will allow easier testing of the boto_client
library and easier checking of create_stack result
Change-Id: Ic3f710ec2e467bcd2fde1a2451709d444b89aca0 Signed-off-by: Steven Hardy <shardy@redhat.com>
Update test_WordPress_Single_Instance.py to use the new
verify_wordpress which checks that the wordpress homepage
specified in the stack output looks OK
Change-Id: I9c2c35215ac97f98e62bf1787db3d8645b50c762 Signed-off-by: Steven Hardy <shardy@redhat.com>
Steven Hardy [Mon, 3 Sep 2012 13:04:31 +0000 (14:04 +0100)]
heat tools : add qpid-cpp-server-daemon to tools/openstack
As of qpid-cpp-server-0.16-5 the service scripts have been
moved to a separate qpid-cpp-server-daemon package, so add
this to the list of required packages for openstack install
Fixes : #219
Change-Id: I6c8b53a69953c543df7cd68637e4ff5e4ca495ad Signed-off-by: Steven Hardy <shardy@redhat.com>
Jeff Peeler [Wed, 29 Aug 2012 17:30:47 +0000 (13:30 -0400)]
Add new arguments to run_tests
Execute unit tests and pep8 by default. Allow tests to be chosen in a more
additive fashion. Cleaned up unnecessary let statements and variable
defines.
Change-Id: I40676c5d0deda7bd3abc4bdadfd404f5909c166e Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Jeff Peeler [Mon, 27 Aug 2012 06:18:53 +0000 (02:18 -0400)]
Functional test improvements
-Move everything out of init so unit tests are not affected.
-Make JEOS creation part of utils class, now tests can choose
which JEOS to use.
-Only attempt to create JEOS if a suitable one is not found in glance.
Change-Id: I162e7447ae1fed17855bdca8eba16ac7f952db01 Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Steven Dake [Mon, 27 Aug 2012 01:09:43 +0000 (18:09 -0700)]
Make RDS (mysql) wait until setup is finished before proceeding
It is possible a service dependent on RDS may issue commands to
the RDS service before mysql has finished installing. Added
a wait condition to force synchronization.
Change-Id: I6abf2d62e92d19945c587deeb61605df2c97ec85 Signed-off-by: Steven Dake <sdake@redhat.com>