SparkleFormation driver for test-kitchen

May 11, 2017 ยท View on GitHub

Installation

Put this in your Gemfile:

gem 'kitchen-sparkleformation'

and run:

$ bundle

Usage

.kitchen.yml configuration:

driver:
  name: sparkleformation
  stack_name: kitchen-test
  stack_name_random_suffix: true
  sparkle_packs:
    - some_sparkle_pack
  sparkle_template: my_template_name
  upload_template: true
  s3_region: us-west-1
  s3_bucket: some-bucket
  s3_path: cloudformation/kitchen-tmp
  cf_params:
    some_parameter: some_value
  cf_options:
    :disable_rollback: true

Configuration

OptionDescriptionDefault ValueRequired?
stack_nameThe name of the CloudFormation stack to create.yes
stack_name_random_suffixIf true, append a random suffix string to the given stack name.false
sparkle_pathThe path to a directory containing your SparkleFormation template files.'sparkleformation'
sparkle_templateThe name of the SparkleFormation template to use.yes
sparkle_stateA hash of compile time parameters that are passed to SparkleFormation.{}
sparkle_packsArray of SparklePacks to load before compiling the template.[]
upload_templateIf true, upload the template to S3. Requires s3_region, s3_bucket.falsetrue if using nested templates
s3_regionRegion of given S3 bucket.if upload_template is true
s3_bucketName of an S3 bucket where templates are uploaded to.if upload_template is true
s3_pathPath in the S3 bucket where templates are uploaded to.if upload_template is true
hostname_outputExtract the hostname of an instance from the value of the given output.no
hostname_resourceThe stack resource to use to extract the hostname from.no
hostname_attributeThe attribute of a the given stack resource to extract the hostname from. Can be '<physical_resource_id>' to use the Physical ID of the given stack resource (e.g. Route53 record).no
cf_paramsRuntime parameters to pass to CloudFormation stack.{}no
cf_optionsAdditional options to pass to CloudFormation stack creation. See here.{}no

If neither hostname_output nor hostname_resource is given, the first EC2 instance in the stack is used to extract the hostname.

If hostname_attribute is set to something other than '<physical_resource_id>', the given hostname_resource must be an EC2 instance. See here for a list of available attributes. By default, private_ip_address is used.