Hakuna can automatize the provisioning and the disposal of AWS CloudFormation stacks.
|CloudFormation stack is stored in S3||Hakuna Cloud can manage only stacks that are stored on S3.|
|Declared IP||Some triggers requires an IP address to work. A CloudFormation resource can expose an IP address using an output named
If you need to make changes on Parameters, we suggest to delete the old VHost and create a new one.
IP Address for ModProxy
The trigger ModProxy requires an IP address to redirect HTTPS requests. In the context of this flavour, the IP address of the resource to use as the proxy destination must be listed in the Outputs section of the stack:
|HTTP/HTTPS ModProxy||Switch on the instance if an HTTP/S request is received|
|Metrics||Switch off the instance if the CPU is low|
|Schedule||Switch on or off the instance following a predefined schedule|
|SSH||Enable SSH connection (eg: git)|
Supported stop status
When the VHost is stopped, the CloudFormation stack and all its resources are deleted.
Stacks parameters are persisted in the VHost object, and are applied to any new stack created as a consequence of a trigger.
It is possible to change those parameters using the appropriate cli command:
hakuna vhost update.
Required IAM User
Hakuna Cloud requires an IAM user to call AWS API on user behalf, in order to start and stop EC2 instances. In order to correctly configure an aws/ec2 provider, please create an IAM user configured with:
- Programmatic access enabled: create an access key ID and a secret access key and use these credentials in the Cloud Provider configuration
- AWS Management Console access disabled
- Add to the IAM User the following IAM Policy:
The following table shows how is your AWS Account represented in Hakuna Cloud.
|Name||String||An arbitrary name to identify your account|
|Identity||String||AWS Access Key ID|
|Credential||String||AWS Secret Access Key|
Provider Creation with the hakuna CLI
hakunaCLI go to Install the CLI
A Cloud Provider in the
hakuna CLI is called simply
provider. To create and configure a
provider for AWS CloudFormation follow the instructions below:
- Open a terminal and run
hakuna provider create
You will be asked to choose from all available providers, a.k.a. flavours.
Choose an arbitrary name for the cloud provider, for example “AWS CF Work Account”
Paste the Access Key ID of your AWS account
Paste the Secret Access Key of your AWS account as well
Type the AWS Region you want to host your CloudFormation stack to
Right after adding the credentials, the
hakuna CLI will validate them and you will get a confirmation about the successfully created provider.
Add a VHost
After configuring the provider, in order to add a CloudFormation stack to Hakuna Cloud you need to create a VHost:
- Open a terminal and run
hakuna vhost create
awscffrom the list of available flavours
- Choose your previously created provider, say “AWS CF Work Account”
- The tool will show you a list of available CloudFormation stacks: choose the one you want to let Hakuna Cloud manage
- Specify a domain name for that stack
HakunaIpset to a publicly accessible IP of an arbitrary stack resource.