With RTS, you can orchestrate a stack that contains a collection of resources using a template and maintain these resources by managing stacks on the console. This section describes how to orchestrate a complex application with RTS by creating an example Elastic Cloud Server (ECS). After the operations in this section are complete, you can view a created ECS on the ECS console.
The required operations are as follows:
To create an ECS using RTS, you need to create a key pair first for identity authentication during SSH login.
If you already have a key pair, skip this step.
A key pair name consists of two parts: KeyPair and four random digits. You can enter an easy-to-remember name, for example, KeyPair-xxxx_ecs.
This is the only opportunity for you to save the private key file. Keep it secure. When creating an ECS stack, provide the name of your desired key pair. Each time you log in to the ECS using SSH, provide the private key.
If the region or project is incorrect, click the drop-down list for correction.
The details of an example ECS template are as follows:
heat_template_version: 2014-10-16 description: Create a simple ECS instance. parameters: name: type: string label: ECS Name description: Specifies the ECS name. image: type: string label: Image Name or ID description: Specifies the image used for creating ECS. The value can be the name or ID of the image. constraints: - custom_constraint: glance.image key_name: type: string label: Key Pair description: Specifies the key pair used for creating ECS. The value can be the name of the key pair. constraints: - custom_constraint: nova.keypair flavor: type: string label: Flavor Name description: Specifies the flavor used for creating ECS. constraints: - custom_constraint: nova.flavor networks: type: string label: Network Name or ID description: Specifies the network used for creating ECS. The value can be the name or ID of the network. constraints: - custom_constraint: neutron.network availability_zone: type: string label: AZ Name description: Specifies the name of the AZ to which the ECS belong. parameter_groups: - label: ECS parameters: - name - image - key_name - flavor - networks - availability_zone resources: nova_serer: type: OS::Nova::Server properties: name: { get_param: name } image: { get_param: image } flavor: { get_param: flavor } key_name: { get_param: key_name } networks: - network: { get_param: networks } availability_zone: { get_param: availability_zone }
This YAML file contains five first-level fields:
Enter and verify template content and click Next.
It takes some time to complete the creation. After the stack is created, click Stack Management in the left pane to view the stack status. You can also access the ECS console to view the created ECS.
For more information about stack management and templates, see Stack Management and Example Templates.