DevOps Accelerators

EPAM Cloud is a hybrid platform that allows to get access to facilities of different cloud providers. While the integration is constantly extended, we pay much attention to developing the features that are most expected by our users.

One of the most important recent features was introducing the ability to use EPAM Cloud services for monitoring environment created in Amazon. There was also a need to support Cloud Watch data gathering to Orchestration UI and the ability to set up additional metrics monitoring with Zabbix server.

Activating your Account in EPAM Cloud

To get the mentioned monitoring functionality for your AWS Cloud Infrastructure, please perform the following steps:

1. Activate your account in EPAM Cloud by submitting the request at support.epam.com/a>. When providing the details of the request, please mention that you need to activate an account that already exists in Amazon, and you need to access the resources via EPAM Cloud.

2. After the activation, EPAM Orchestration will be able to describe all your AWS infrastructure VMs. You will find them on the Monitoring, Management, Audit pages of Orchestration Web Console.

You will also have the ability to get the billing reports for these resources on the Reporting page and using the or2report Maestro CLI Command.

Please note that after the account resources are put under EO monitoring, EO does not start billing your account automatically. If you want your account to be billed by the standard mechanism of unified billing, register your account as a Linked Account for EPAM Cloud AWS Root Account (to do it, write a request to Help Desk.

After your account is activated, you can make any EPAM Cloud service available for your AWS instances that EO could describe. To have this feature available, you have to go through three steps:

1. Generate a GPG key and register its public part on EO for your project.

2. Import the key to the VM you want to connect to a service.

3. Add the instance to EPAM Cloud ACS.

These steps are described in details below.

Generating a GPG Key

To generate a new GPG key on Linux, please, do the following:

1. Run:

yum install pinentry gpg

or

sudo apt-get install gnupg pinentry-curses

2. Run:

gpg --gen-key

3. Pick 1 (RSA)
4. Keysize default: (2048)
5. Select expiration time, for example 2y ( two years) and confirm expiration date
6. Enter your name or project ID(For example EPMC-CLO)
7. Project email : name_name@epam.com
8. Comment: Test key
9. Confirm that all data is correct (O)
10.Leave the password field empty to disable password protection
Creation of the private part is completed.

After that, you need to export private and public keys:

1. To export your public key, use:

gpg --armor --output public.key --export name_name@epam.com

where public.key - the name of the public key and name_name@epam.com - the email you used to create the private key.
2. To export your secret key, use:

gpg --armor --output secret.key --export-secret-key name_name@epam.com

where name_name@epam.com is the email you used to create the private key.

Importing keys

The next step is importing the generated secret key to your VMs.

Importing the key on Linux

1. Run:

yum install gpg

or

apt-get install gnupg

2. Copy your secret.key (generated previously) to your home directory on the target instance.

3. Run:

[ sudo su -
gpg --import secret.key

To make sure that the key is imported successfully, run the following command:

gpg --list-keys

And you will get the response similar to this:

pub 2048R/56CCA26C 2015-01-23 [expires: 2017-01-22]
uid DEMO-PRO (Test key)
sub 2048R/A3C7BD2D 2015-01-23 [expires: 2017-01-22]

Importing the key on Windows:

1. Install gpg4win (http://files.gpg4win.org/gpg4win-2.1.1.exe) to c:\epconfig\gpg

2. Copy your secret.key (generated previously) to C:\epconfig on the target instance

3. Press WinKey + R ,enter "cmd" and press OK

4. Change directory to C:\epconfig:

cd C:\epconfig

5. Import secret key:

gpg --import secret.key

To make sure that the key is imported successfully, run the following command:

gpg --list-keys

And you will get the response similar to this:

C:/Users/Administrator/AppData/Roaming/gnupg/pubring.gpg
--------------------------------------------------------
pub 2048R/56CCA26C 2015-01-23 [expires: 2017-01-22]
uid DEMO-PRO (Test key)
sub 2048R/A3C7BD2D 2015-01-23 [expires: 2017-01-22]

Adding VMs to EPAM Cloud ACS

The next step is importing the generated secret key to your VMs.

Linux

1.Make sure that the private key is imported to the instance you are going to work with:

sudo su -
gpg --list-secret-keys


Your e-mail should be given in the responce.

2. Unpack archive with scripts to /etc/epconfig (you will get this archive by e-mail)

3. Make scripts executable:

chmod +x /etc/epconfig/*

4. Run:

/etc/epconfig/epconfig.sh

5. Stop the instance and add the next string to its userdata (in AWS Web console, right click on instance > instance settings > View/Change User Data):

ep_orch_ip=https://config.cloud.epam.com/orchestration

6. Start the instance, wait for about 5 minutes and look into /var/log/chef/ directory; there must be the client.log file

Windows:

1. Make sure that the private key is imported to the instance you are going to work with:
press WinKey + R ,enter "cmd" and press OK. Then, enter the following to the command line:

gpg --list-secret-keys

and you'll see a response similar to this:

C:/Users/Administrator/AppData/Roaming/gnupg/pubring.gpg
--------------------------------------------------------
sec 2048R/56CCA26C 2015-01-23 [expires: 2017-01-22]
uid EPMC-CLO (Test key) Maksym_Zinkevych@epam.com
sub 2048R/A3C7BD2D 2015-01-23 [expires: 2017-01-22]

2. Unpack the archive with scripts to C:\epconfig

3. Download curl for win https://curl.haxx.se/download/curl-7.49.1.zip and place curl.exe to C:\epconfig
Double click on curl.exe - if nothing happens, proceed to the Step 4. If you get the "msvcr100.dll missing" error, install one of the following packages (depending on your Windows architecture):
- Microsoft Visual C++ 2010 Redistributable Package (x86): http://www.microsoft.com/download/en/details.aspx?id=5555
- Microsoft Visual C++ 2010 Redistributable Package (x64): http://www.microsoft.com/download/en/details.aspx?id=14632

4. Run cmd as administrator(find it in start menu, right click and select run as administartor), then enter:

cd to C:\epconfig
epconfig.cmd

5. Stop the instance and add the following string to its userdata(in AWS web Console, right click on instance > instance settings > View/Change User Data):

ep_orch_ip=https://config.cloud.epam.com/orchestration

6. Start the instance, wait for about 5 minutes and look into C:/chef/ directory. There must be the client.log file