This is a SparkleFormation SparklePack for jackal-cfn. It provides integrations for the custom resources provided by the jackal-cfn library as well as templates for worker setup and example usage.
This SparklePack provides dynamics for custom resources provided by jackal-cfn:
:ami_manager
:ami_register
:hash_extractor
:jackal_stack
:orchestration_unit
It also provides a customized :jackal_image
dynamic which will
create the resource as well as an output of the newly created
AMI ID.
This SparklePack includes 3 templates:
jackal_cfn
- Creates a working processor to handle requestsjackal_bus
- Creates only the required message bus resourcesjackal_usage_example
- Example template to display usage of the OrchestrationUnit resource
NOTE: The jackal_cfn
template only supports the follow regions:
- ap-northeast-1
- ap-southeast-1
- ap-southeast-2
- cn-north-1
- eu-central-1
- eu-west-1
- sa-east-1
- us-east-1
- us-west-1
- us-west-2
- us-gov-west-1
NOTE: Assumes a working sfn
setup. (see: Getting started guide)
First, include the SparklePack into the bundle by adding this line to
the ./Gemfile
:
gem 'sparkle-pack-jackal-cfn'
Next, update the local bundle:
$ bundle update
Now enable the SparklePack within the .sfn
configuration file:
Configuration.new do
...
sparkle_pack 'sparkle-pack-jackal-cfn'
...
end
To use the jackal-cfn resources, a processor instance must be available. The SparklePack provides a template to build a processor stack. This stack will build a single EC2 instance which will be used as the base for an on demand autoscaling group. To create the stack:
$ bundle exec sfn create STACK_NAME_PROCESSOR --file jackal_cfn
This SparklePack includes an example template that uses the OrchestrationUnit
resource to read the contents of a file on the running processor instance. The
contents of the file is a JSON serialized Hash that includes the ID of the
current stack. The example stack will return the full result as well as the
specific "OriginStack"
value in the outputs:
$ bundle exec sfn create STACK_NAME_EXAMPLE --file jackal_usage_example --apply-stack STACK_NAME_PROCESSOR
The templates in this SparklePack support nesting. To create a single stack
that includes the jackal_cfn
template and the jackal_usage_example
template,
create a new local template:
# ./sparkleformation/full_jackal.rb
SparkleFormation.new(:full_jackal) do
nest!(:jackal_cfn)
nest!(:jackal_usage_example)
end
And create the nested stacks:
$ bundle exec sfn create STACK_NAME_ALL --file full_stack
- Repository: https://github.com/carnivore-rb/sparkle-pack-jackal-cfn
- Jackal CFN: https://github.com/carnivore-rb/jackal-cfn
- SparkleFormation: http://www.sparkleformation.io
- IRC: Freenode @ #carnivore