CDP:Stack Deployment Pattern
Creating a Template for Setting up Groups of Servers
Problem to Be Solved
Commonly a test environment and a staging environment are provided for system development and operations/maintenance. These environments are not used at other times, so the use of the same number of servers as in the actual environment would have poor cost effectiveness. The use of virtual servers improves the cost effectiveness.
When the system is complex and there is a large number of virtual servers, however, the operations to construct the environment and to launch and terminate the related virtual servers, for example, may become complex and laborious. The more complex and laborious, the more time it will take you, and the more likely it will be that you will make a mistake.
Explanation of the Cloud Solution/Pattern
You can prepare a template for starting up a group of servers and start up the servers automatically all at once following the template. You can list, in that template, the Cloud components that are required in the environment that is being configured, and then configure the environment following that template, to establish complex systems easily and without errors.
You can use a service known as "CloudFormation" in AWS to start up the system (EC2 instances, and the like) from a "CloudFormation template" that lists server resources, and the like.
- Create the CloudFormation template from a preexisting or newly created environment.
- When using the system, startup the system (the EC2 instances, or the like), all at once from the CloudFormation template.
- When terminating the system, use the CloudFormation template to delete the system all at once.
When creating the template, you can also use the CloudFormer tool tocreate a template from an existing system.
- You can create a stack template (CloudFormation template) for starting up, in the right sequence, even virtual servers (EC2 instances) that require a specific startup sequence, thereby decreasing operating errors.
- You can also manage the system configuration history through versioning the stack template (the CloudFormation template).
- This makes easy for you to not just construct the environments, but deconstruct the environments as well.
- If you update the system (the virtual servers, or the like), you will have to update the Amazon Machine Image (AMI) ID in the stack template (the CloudFormation template) as well.
This pattern not only allows you to simply copy a system, but also to move from the classic EC2 environment to a Virtual Private Cloud (VPC) environment that is connected to the user enterprise by a dedicated network.
- Use a tool (CloudFormer) to create a CloudFormation template of an existing system.
- Construct a transfer-destination VPC environment (network system and subnets).
- Register, in the CloudFormation template, the ID of the VPC and the IDs of the subnets that have been built.
- Startup the system using the CloudFormation template.