Target Artifact

The target artifact is the ZIP file generated by the successful transformation with TOSCAna. This chapter details the contents the artifact built by the CloudFormation Plugin and explains their role in the deployment.

Files and folders

Structure:

<target-artifact-name>.zip
├── readme.html
└── output/
    ├── template.yaml
    └── files/
    └── scripts/
        ├── deploy.sh
        ├── file-upload.sh
        ├── deploy.sh
        ├── cleanup.sh
        └── util/

Readme

The readme.html is the readme explaining the requirements for and usage of the target artifact in order to deploy the CloudFormation template.

Template

The output/template.yaml is the CLoudFormation template generated by the transformation. This is a valid CloudFormation template in the YAML specification. However, it can not be successfully deployed on its own, as it requires the files contained in the output/files/ directory in order to complete the deployment.

Files folder

The files contained in the output/files/ folder are needed for the deployment of the CloudFormation template. This could include files such as implementation artifacts, dependencies etc.

Scripts Folder

The scripts contained in the output/scripts/ folder are needed for the deployment of the CloudFormation template generated by the CloudFormation plugin. The commands used in these scripts are supplied by the AWS CLI and require the previous setup said CLI as explained in the requirements chapter of the user documentation.

Scripts

  • deploy.sh - This script runs the helper scripts in the following order: file-upload.sh, create-stack.sh.
  • file-upload.sh - This helper script creates an Amazon S3 bucket and then uploads the necessary files from the output/files directory to said bucket. The upload commands are dynamically added to the script during the transformation as explained in the transform phase of the transformation lifecycle.

    TODO: Add link to transformation lifecycle - transform.

  • create-stack.sh - This helper script deploys the CloudFormation template specified in the template.yaml.

  • cleanup.sh - This script deletes the previously created S3 bucket, the files stored in it and the CloudFormation stack created during the deployment of the template. The execution of this script is not needed for a successful deployment of to AWS CloudFormation and is mainly intended for a quick cleanup during testing.

Utility Scripts

The output/scripts/util folder contains additional utility scripts containing functions used by the other scripts in the output/scripts/ folder.