This script can't be used in OpenStack since CloudWatch API was removed
from Heat multiple cycles ago[1].
[1] 6d55417f80384ead56e176beec9e2fc4eb162d61
Change-Id: I0ab73d3553b17485cc8fcf094377876226a4593d
We are stuck on a very old version of hacking (0.8). In order to move
forward, we need to fix a bunch of things that flake8 will complain about.
Change-Id: If40ac29094b90c5bae63e7423061a190655f50a3
LOG.warn is deprecated. It still used in a few places.
Updated to non-deprecated LOG.warning.
Change-Id: I6e8df0e072448fbd4077c4e5d98b2986e9855489
Closes-Bug:#1508442
Initialized logger with default value of NOTSET.
Added if statement to handle verbose argument and set the logger to
DEBUG.
Change-Id: I997b8b964dade013db265d088d00ccfdd6ab030e
Closes-Bug: #1269465
Make all internal commands as list to avoid any possibility of command
line injection. Commands supplied as string are susceptible to
substitution.
All the internal commands are supplied as list to CommandRunner. As a
convention, all the commands must be given as list to subprocess except
the commands read from file, like in case of cfn hooks and commands
section in metadata.
Few internal commands require shell redirects and they will be
implemented in another patch.
Change-Id: Ifabaf44e341144bc85508dc05c76b1d83e41ae44
Partial-Bug: #1312246
cfn-signal will not work when heat-cfn-api server is configured
for the https. This patch will provide a option to make a insecure
request to the cfn server.
Change-Id: I9dcd53b40a389811e292c331ff625a8b5af827b7
Closes-Bug: 1460007
Unless the parameter is provided, cfn-signal will use the instance UUID
from the Nova metadata as the id sent back to the WaitCondition.
In case the Nova metadata isn't available, it will use the hostname as a
fallback.
Change-Id: I1e5847c7babd7c6295d8c3e21f6cfa110a9b3026
Closes-bug: 1223429
logging.getLogger() was called with a wrong name in the cfn scripts. As
a result, the cfn_helper module logged everything to stderr.
Change-Id: I3447291b202887aa09b0f0cb01764708683e7821
Closes-Bug: #1269355
The -k argument can be a top-level key or a nested key in which case
the keys are separated by dots (eg "foo.bar"). In case a key contains a
dot character, it needs to be surrounded by single quotes (eg
"foo.'bar.1'.fred).
If the -k option is not provided, the command prints out the full
metadata structure as before.
Change-Id: Ib05d39672086001b83e8d7f56bc42cc4ba75751c
Fixes: bug #1183299
According cfn user guide, the long option of cfn-signal -e should be
--exit-code.
Fixes bug #1220080
Change-Id: Id4e9feefd387a744f5e933aa4e9ea8a6f6f02a7c
This allows us to stop creating templates with circular dependancies.
So we can change:
cfn-push-stats --watch {Ref: TheAlarm}
to:
cfn-push-stats
This makes it closer to AWS and actually better as users can add their
own dimensions via the tags.
Change-Id: I365ae57c2275a2d064075eb1b3e14aa1e418d1ee
Add display() method to the Metadata class that prints the metadata to
standard output if the metdata has been successfully retrieved (either
from local cache or from the remote server).
Change-Id: Idf6c1aecf2a5204d7cf7fbf3c8d826f750a72785
Fixes: bug #1183298
This allows the user to specify an arbitrary metric in their
template, and send the number based on some data they can
generate, e.g for openshift node occupancy data
Change-Id: Iaa38614b8db3665f9fb340fd92b67b6f7a47b206
The --haproxy options sends a variety of metrics to the engine,
which can only accept one metric per watchrule, so will discard
all except the one specified on the CloudWatch alarm, so add a
version which only sends the Latency metric (since that's what
we care about for the internal loadbalancer resource)
ref bug 1133510
Change-Id: I53084dcbf14c28028af6cba0b8125663fefc6483
The /var/lib/heat-cfntools directory should be owned by the
heat-cfntools package for whichever distro it is included.
This avoids the problem of heat writing to directories owned
by cloud-init.
This is the guest-side change which corresponds to this review
https://review.openstack.org/#/c/23052/
Fixes: Bug #1105806
Typical usage:
cfn-create-aws-symlinks --source=/usr/bin
This will create directory /opt/aws/bin if it does not exist, and then creates symlinks within that from the scripts /usr/bin/cfn-*.
By default, any existing /opt/aws/bin/cfn-* script will not be overwritten. This behaviour can be overridden with the flag --force
Fixes #13
If the user doesn't specify the --register-with-glance option, the
python-glance or python-glanceclient library should not be needed.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Fixes #20
Heat supports both Essex and Folsom for now. However, in Folsom, the use
of python-glance client is deprecated in favor of python-glanceclient.
Since the clients are incompatible, this adds the `heat.glance_client`
package that abstracts the differences away.
Once we stop supporting Essex, most of this should go away.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
To figure out whether to include cfntools in the image, heat-jeos used
to look at the template filename.
Now it uses a more flexible solution: if the template has the
'files/file' declaration for each of the cfntools file, it's contenst
will be included.
Fixes #10
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
All the template processing and image building now passes around a
string representation of the TDL XML instead of writing it out to
/tmp/tdl and then reading it again.
This ensures that the template is not manipulated outside of heat-jeos
and provides greater modularity.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
The container format for the generated image should be bare, not OVF.
This change also matches the container format used with
--register-with-glance.
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Ubuntu 12.04 ships with a newer version of prettytable (which we use to display the heat-list output) than Fedora 17.
The column alignment formatting API changed between the version. This change makes sure the proper call is used.
Fixes issues #2 and #3
We'll use only two commands: `list` and `create`.
`list` displays the bundled Oz templates and `create` builds the JEOS and
optionally registers it with Glance.
The OS metadata (distro, arch, version) are no longer passed as the cli
arguments. ISO location is read from the template.
The user can pass their own custom template.
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Specifically bump iso 10.04-3 to 10.04-4 (current release). Also fix
not displaying the error message on a jeos creation failure.
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>