AWSEC2 Connector installation
What is it?
The AWSEC2 Connector installation consists of multiple steps required to run the connector with OpCon. This page describes how to install and configure the connector and the associated Enterprise Manager or Solution Manager sub-type.
- Use this procedure when setting up the AWSEC2 Connector for the first time
- Use this procedure when adding the Enterprise Manager or Solution Manager sub-type to an existing connector installation
Supported software levels
The following software versions are required to implement the AWSEC2 Connector:
- OpCon Release 25.0.3 or higher (required for Solution Manager sub-type)
- OpCon Release 19.0 or higher (required for Enterprise Manager sub-type)
- OpCon REST API
- Embedded OpenJDK Version 11 (included with the connector)
Installation overview
The installation process consists of the following steps:
- Install the AWS EC2 Connector
- Configure the AWS EC2 Connector
- For Enterprise Manager sub-type:
- Add the AWS EC2 Connector job sub-type to Enterprise Manager
- Create the global properties the sub-type uses
- For Solution Manager sub-type:
- Create the AWSEC2 scripts
- Create the AWSEC2 agent
Install the AWS EC2 Connector
The AWS EC2 Connector can be installed on any Windows Server that has an OpCon Windows Agent installed.
- When installing using the Enterprise Manager sub-type, the connector can be installed on any Windows system that contains a Windows agent
- When installing using the Solution Manager sub-type, the connector must be installed on either the same Windows server as the OpCon installation or the same Windows server as the Relay installation
To install the connector, complete the following steps:
- Copy the supplied install file
AWSEC2Connector-win.zipto the target Windows server. - Extract the contents into the installation directory.
After extraction, the root installation directory contains the following items:
awsec2.exe— the connector executableEncryptValue.exe— the encryption utilityConnector.config— the connector configuration filejava/— directory containing OpenJDK 11emplugins/— directory containing the Enterprise Manager job sub-type plugin
Configure the AWS EC2 Connector
To configure the connector, complete the following steps:
- Open the
Connector.configfile in the installation directory. - Set the required values as described in the table below.
- Save the file.
All user and password values placed in the configuration file must be encrypted using the EncryptValue.exe utility.
EncryptValue utility
The EncryptValue utility uses standard 64-bit encryption. It accepts a -v argument and displays the encrypted result.
To encrypt a value on Windows, run the following command:
EncryptValue.exe -v "abcdefg"
Connector.config settings
| Property | Description |
|---|---|
| [CONNECTOR] | Section header |
| CONNECTOR_NAME | The name of the connector. Do not change this value. |
| MAX_WAIT_TIME_FOR_STARTUP | The maximum time in minutes to wait for startup completion before terminating the requested action and returning an error. Default value is 10. |
| DEBUG | Enables debug mode. Value: ON or OFF (default: OFF). |
| [USER] | Section header. Identifies which security credentials to use for a request. The User ID value in the job definition is matched to this header to load the required credentials. |
| CONNECTOR_USER_ACCESS_KEY | The user access key for the AWS EC2 environment. Must be encrypted using EncryptValue. |
| CONNECTOR_USER_SECRET_KEY | The matching user secret key. Must be encrypted using EncryptValue. |
| [OPCON API INFORMATION] | Section header |
| ADDRESS | The address of the OpCon REST API server, including the port number. Use port 9000 for non-TLS or port 9010 for TLS. Format: address:port. |
| USING_TLS | Indicates whether the server uses TLS. Value: True or False (default: True). |
| TOKEN | An application token that authenticates requests to the OpCon API. |
The following is an example Connector.config file:
[CONNECTOR]
CONNECTOR_NAME=AWS EC2 Connector
MAX_WAIT_TIME_FOR_STARTUP=10
DEBUG=ON
[USER1]
CONNECTOR_USER_ACCESS_KEY=5155744a5156524d4e6c525a54556c55574646545355314a5431493d
CONNECTOR_USER_SECRET_KEY=5433553353325a314b79396c526d4572576d39595a584a77576e5273595852764b
[OPCON API INFORMATION]
ADDRESS=BVHTEST02:9010
USING_TLS=True
TOKEN=ec0fe84e-cabe-4b26-841e-2d958d3af253
Enterprise Manager sub-type installation
To install the Enterprise Manager sub-type, complete the following steps:
- Copy the Enterprise Manager plugin from the
installation_dir\empluginsdirectory to thedropinsdirectory of the Enterprise Manager installation. If thedropinsdirectory does not exist, create it off the root installation directory. - Restart Enterprise Manager. A new Windows job sub-type called AWS EC2 will be visible. If the sub-type does not appear, restart Enterprise Manager using Run as Administrator.
Create the AWSEC2Path global property
Create a global property named AWSEC2Path that contains the full path of the connector installation directory.
Create the special global properties
The Amazon EC2 connector uses three global properties to hold the values of images, regions, and sizes available in the job definition lists.
| Property | Description |
|---|---|
| AWS_IMAGES | Create this property and add the image values using a comma to separate entries. Retain the double quotes surrounding each value. Format: "description : image". |
| AWS_SIZES | Create this property and add the size values using a comma to separate entries. Retain the double quotes surrounding each value. Format: "size". |
| AWS_REGIONS | Create this property and add the region values using a comma to separate entries. Retain the double quotes surrounding each value. Format: "region". |
The following are example values for each property:
List of Virtual Machines
"Microsoft Windows Server 2016 Base : ami-0f4c7e570f044b46f","Amazon Linux AMI 2018.03.0 : ami-0080e4c5bc078760e","Red Hat Enterprise Linux 7.6 (HVM) : ami-011b3ccf1bd6db744"
List of Virtual Machine Sizes
"a1.medium","a1.large","a1.xlarge","a1.2xlarge","a1.4xlarge","m4.large","m4.xlarge","m4.2xlarge","m4.4xlarge","m4.10xlarge","m4.16xlarge","m5.large","m5.xlarge","m5.2xlarge","m5.4xlarge","m5.12xlarge","m5.24xlarge","m5a.large","m5a.xlarge","m5a.2xlarge","m5a.4xlarge","m5a.12xlarge","m5a.24xlarge","m5d.large","m5d.xlarge","m5d.2xlarge","m5d.4xlarge","m5d.12xlarge","m5d.24xlarge","t2.nano","t2.micro","t2.small","t2.medium","t2.large","t2.xlarge","t2.2xlarge","t3.nano","t3.micro","t3.small","t3.medium","t3.large","t3.xlarge","t3.2xlarge"
List of Regions
"AP_NORTHEAST_1","AP_NORTHEAST_2","AP_SOUTH_1","AP_SOUTHEAST_1","AP_SOUTHEAST_2","CA_CENTRAL_1","CN_NORTH_1","CN_NORTHWEST_1","EU_CENTRAL_1","EU_NORTH_1","EU_WEST_1","EU_WEST_2","EU_WEST_3","SA_EAST_1","US_EAST_1","US_GOV_EAST_1","US_WEST_1","US_WEST_2"
Solution Manager sub-type installation
NOTE: All interactions with the Solution Manager sub-type must be completed using Solution Manager.
To install the Solution Manager sub-type, complete the following steps:
- Download the
ACSAWSEC2zip file from the FTP site under OpCon Releases > Integrations > AWSEC2. - Extract the
ACSAWSEC2directory and copy it into\SAM\pluginsfor OpCon and Relay installations. - For OpCon installations: stop and restart the SMA OpCon RestAPI and SMA OpCon Service Manager services. For Relay installations: stop and restart the Relay Service.
Create the scripts
When using the Solution Manager sub-type, two scripts must be created. The first script contains the Connector.config information and the second script contains the list information.
To create the scripts, complete the following steps:
- Go to Library and select Scripts.
- Select Script Types from the upper right corner.
a. Select +Add.
b. In the Name field, enter
ACSAWSEC2. c. In the File Extension field, entertxt. d. In the Description field, enterUsed for ACSAWSEC2 Integration. e. Select Save. - Select Script Runners from the upper right corner.
a. Select +Add.
b. In the Name field, enter
ACSAWSEC2. c. In the OS field, select AWSEC2 from the list. d. In the Type field, select ACSAWSEC2 from the list. e. In the Command field, entercmd.exe /c. f. Select Save. - Select Scripts from the upper right corner.
- Create the Connector.config script:
a. Select +Add.
b. In the Name field, enter a name for the script. It is recommended to use the proposed agent name with
_configappended (for example,MyAgent_config). c. In the Type field, select ACSAWSEC2 from the list. d. Assign the required roles. e. In the Script area, paste the contents of the createdConnector.configfile. f. Select Save. - Create the list information script:
a. Select +Add.
b. In the Name field, enter a name for the script. It is recommended to use the proposed agent name with
_dataappended (for example,MyAgent_data). c. In the Type field, select ACSAWSEC2 from the list. d. Assign the required roles. e. In the Script area, paste the data script content shown below. f. Select Save.
The data script content uses IMAGE, SIZE, and REGION keys. Additional values can be added for each key type. The following is an example data script:
IMAGE Microsoft Windows Server 2016 Base : ami-0f4c7e570f044b46f
IMAGE Amazon Linux AMI 2018.03.0 : ami-0080e4c5bc078760e
IMAGE Red Hat Enterprise Linux 7.6 (HVM) : ami-011b3ccf1bd6db744
SIZE a1.medium
SIZE a1.large
SIZE a1.xlarge
SIZE a1.2xlarge
SIZE a1.4xlarge
SIZE m4.large
SIZE m4.xlarge
SIZE m4.2xlarge
SIZE m4.4xlarge
SIZE m4.10xlarge
SIZE m4.16xlarge
SIZE m5.large
SIZE m5.xlarge
SIZE m5.2xlarge
SIZE m5.4xlarge
SIZE m5.12xlarge
SIZE m5.24xlarge
SIZE m5a.large
SIZE m5a.xlarge
SIZE m5a.2xlarge
SIZE m5a.4xlarge
SIZE m5a.12xlarge
SIZE m5a.24xlarge
SIZE m5d.large
SIZE m5d.xlarge
SIZE m5d.2xlarge
SIZE m5d.4xlarge
SIZE m5d.12xlarge
SIZE m5d.24xlarge
SIZE t2.nano
SIZE t2.micro
SIZE t2.small
SIZE t2.medium
SIZE t2.large
SIZE t2.xlarge
SIZE t2.2xlarge
SIZE t3.nano
SIZE t3.micro
SIZE t3.small
SIZE t3.medium
SIZE t3.large
SIZE t3.xlarge
SIZE t3.2xlarge
REGION AP_NORTHEAST_1
REGION AP_NORTHEAST_2
REGION AP_SOUTH_1
REGION AP_SOUTHEAST_1
REGION AP_SOUTHEAST_2
REGION CA_CENTRAL_1
REGION CN_NORTH_1
REGION CN_NORTHWEST_1
REGION EU_CENTRAL_1
REGION EU_NORTH_1
REGION EU_WEST_1
REGION EU_WEST_2
REGION EU_WEST_3
REGION SA_EAST_1
REGION US_EAST_1
REGION US_GOV_EAST_1
REGION US_WEST_1
REGION US_WEST_2
Create the AWSEC2 agent definition
To create the AWSEC2 agent, complete the following steps:
- Go to Library and select Agents.
- Select +Add.
- In the Name field, enter the name of the agent.
- Select AWSEC2 from the Type list.
- In the AWSEC2 Settings section, enter the required information.
- In the Client Information section:
a. In the Directory field, enter the installation directory of the AWSEC2 Connector.
b. In the Name field, enter
awsec2.exe(default value). c. In the Config File Name field, enterConnector.config(default value). - In the Config Script section: a. Select ACSAWSEC2 from the Script Runner list. b. Select the config script you previously created from the Script list.
- In the Drop-down Script section: a. Select ACSAWSEC2 from the Script Runner list. b. Select the data script you previously created from the Script list.
- Select Save. The agent definition is saved and the connector is ready to use.
FAQs
What version of Java does the connector require?
The connector uses an embedded OpenJDK Version 11 included in the installation package. No separate Java installation is required.
Where do I find the EncryptValue utility?
The EncryptValue.exe utility is included in the connector installation directory after extracting the AWSEC2Connector-win.zip file.
Can I install the connector on a server that already has the Windows Agent?
Yes. For the Enterprise Manager sub-type, the connector can be installed on any Windows system with a Windows agent. For the Solution Manager sub-type, the connector must be on the same server as the OpCon installation or the Relay installation.
What OpCon version is required?
The Enterprise Manager sub-type requires OpCon Release 19.0 or higher. The Solution Manager sub-type requires OpCon Release 25.0.3 or higher.
What should I do if the AWS EC2 sub-type does not appear in Enterprise Manager after restart?
Restart Enterprise Manager using Run as Administrator. After this restart, Enterprise Manager can be used normally.
Glossary
EncryptValue — A utility included with the AWSEC2 Connector that encrypts credential values for storage in the Connector.config file using standard 64-bit encryption.
Connector.config — The configuration file for the AWSEC2 Connector, containing the connector name, debug setting, encrypted AWS credentials, and OpCon API connection information.
OpenJDK — An open-source implementation of the Java Development Kit. The AWSEC2 Connector includes an embedded OpenJDK Version 11 and does not require a separate Java installation.
dropins directory — A directory in the Enterprise Manager installation used to add plugin modules such as the AWS EC2 job sub-type.
AWSEC2Path — A global property in OpCon that stores the full installation directory path of the AWSEC2 Connector, referenced in job definitions using [[AWSEC2Path]].
Related topics:
- AWSEC2 Connector Overview
- [Enterprise Manager Sub-type Operation](./EM Subtype operation.md)
- [Solution Manager Sub-type Operation](./SM Subtype operation.md)