Amazon Elastic Compute Cloud plugin

2 minute readExtensibilityDeveloper productivity

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides scalable compute capacity in the cloud. It is designed to make web-scale computing easier for developers. Amazon EC2 allows users to rent virtual computers to run their applications.

Amazon EC2 provides you with complete control of your computing resources, and can reduce the time required to obtain and boot new server instances. You can scale capacity up and down as your computing requirements change. Create, launch, and terminate server instances as needed, paying by the hour for active servers. Amazon EC2 provides developers the tools to build failure-resilient applications and isolate them from common failure scenarios.

Amazon EC2 presents a true virtual computing environment, allowing you to use web service interfaces to launch instances with a variety of operating systems, load them with your custom application environment, manage your network access permissions, and run your image using as many or few systems as you want.

CloudBees CD/RO integration with Amazon EC2

The Amazon Elastic Compute Cloud plugin uses the Amazon EC2 application programming interface (API) that allows developers to choose where their applications physically run and that provides access to infrastructure resources. Using this secure API, your application is automatically scaled up and down as needed. This integration allows CloudBees CD/RO to manage Amazon EC2 resources.

The Amazon Elastic Compute Cloud plugin interacts with Amazon EC2 data by using Perl scripting to perform the following tasks:

  • Create configurations with connection information.

  • Query for virtual machine and configuration information.

  • Perform actions on instances.

  • Make API requests.

  • Create CloudBees CD/RO resources.

The integration provides a separate procedure for each of the following tasks:

  • API procedures named API_xxx that directly wrap an Amazon EC2 API call.

  • Higher-level procedures named EC2_xxx that combine many API calls.

The procedure that you select determines the fields that are available.

Prerequisites

This plugin requires CloudBees CD/RO agents with version 10.1 and later, due to library upgrades.

This plugin may be backward compatible with previous versions of the CloudBees EC-EC2 plugin, which has been deprecated. To migrate an existing automation to use this plugin, you can change the plugin name in the DSL of the existing declaration. For example:

resourceTemplate 'amazonEC2-ResourceTemplate', { cloudProviderParameter = [ 'config': 'ec2config', 'count': '1', 'group': 'PROVIDE SECURITY GROUP', 'image': 'PROVIDE IMAGE NAME', 'instanceInitiatedShutdownBehavior': '', 'instanceType': 'PROVIDE INSTANCE TYPE', 'keyname': 'PROVIDE KEY NAME', 'privateIp': '', 'propResult': '', 'res_poolName': '', 'res_port': '', 'res_workspace': '', 'resource_zone': 'default', 'subnet_id': 'PROVIDE SUBNET ID', 'use_private_ip': '0', 'userData': '', 'zone': 'PROVIDE AVAILABILITY ZONE', ] cloudProviderPluginKey = 'EC-EC2' // replace with 'EC-AWS-EC2' cloudProviderProcedure = 'API_RunInstances' // Custom properties property 'ec_cloud_plugin_parameter', { // Custom properties config = 'ec2config' count = '1' group = 'PROVIDE SECURITY GROUP' image = 'PROVIDE IMAGE NAME' instanceInitiatedShutdownBehavior = '' instanceType = 'PROVIDE INSTANCE TYPE' keyname = 'PROVIDE KEY NAME' privateIp = '' propResult = '' res_poolName = '' res_port = '' res_workspace = '' resource_zone = 'default' subnet_id = 'PROVIDE SUBNET ID' use_private_ip = '0' userData = '' property 'zone', value: 'PROVIDE AVAILABILITY ZONE', { expandable = '1' suppressValueTracking = '0' } } }