Installation Prerequisites for Discovery Agent
The prerequisites and tasks you must complete before installing the AWS Application Discovery Agent are as follows.
-
Before installing Discovery Agent, you must first configure an AWS Migration Hub home region.
-
If the 1.x version of the agent is already installed, you must uninstall it before installing the most recent version.
-
If the agent has to be installed on a Linux host, ensure that the host supports the Intel i686 CPU architecture (also known as the P6 microarchitecture).
-
If your network's outbound connections are restricted, you'll need to update your firewall settings. Agents must have access to the arsenal via TCP port 443. They do not necessitate the opening of any inbound ports.
-
For auto-upgrade to work, you must have access to Amazon S3 in your home region.
-
Create an IAM (AWS Identity and Access Management ) user and attach the existing AWSApplicationDiscoveryAgentAccess IAM managed policy in the console. This policy authorizes the user to carry out necessary agent actions on your behalf. See AWS Managed (Predefined) Policies for Application Discovery Service for more information on managed policies.
- Examine the time skew from your Network Time Protocol (NTP) servers and make any necessary adjustments. The agent registration call fails due to incorrect time synchronization.
Agent Installation on Linux
These are the steps to install the AWS agent installation on Linux:
Step1: Create a new directory for your agent components on your Linux-based server or virtual machine.
Step 2: Change to the new directory and use the command line or the terminal to download the installation script.
- Run the following command to download from the command line.
curl -o ./aws-discovery-agent.tar.gz https://s3-us-west-2.amazonaws.com/awsdiscovery-agent.us-west-2/linux/latest/aws-discovery-agent.tar.gz
-
Follow these steps to download from the Migration Hub console:
- Open the console and go to the Discovery Tools page.
- Choose Download agent in the Discovery Agent box, then Linux in the Resultant List box. Your download will begin right away.
Step 3: Use the following three commands to verify the installation package's cryptographic signature:
curl -o ./agent.sig https://s3.us-west-2.amazonaws.com/aws-discovery-agent.us-west-2/linux/latest/aws-discovery-agent.tar.gz.sig
curl -o ./discovery.gpg https://s3.us-west-2.amazonaws.com/aws-discovery-agent.uswest-2/linux/latest/discovery.gpg
gpg --no-default-keyring --keyring ./discovery.gpg --verify agent.sig aws-discoveryagent.tar.gz
Step 4: Extract the files from the tarball as shown below.
tar -xzf aws-discovery-agent.tar.gz
Step 5: Installing Discovery Agent
Run the agent install command as indicated in the example below to install the agent. Replace your-home-region with your home region's name, aws-access-key-id with your access key id, and aws-secret-access-key with your secret access key in the example.
sudo bash install -r your-home-region -k aws-access-key-id -s aws-secret-accesskey
Agent Installation on Windows
Step 1: Download the Windows agent installer, but don't double-click it to start it in Windows.
Note: If you try to start the installer from within Windows by double-clicking it, it will fail. Only the command prompt is used to install the agent. (If you already double-clicked the installer, go to Add/Remove Programs and uninstall the agent before proceeding with the subsequent procedures.)
If the Windows agent installer detects no version of the Visual C++ x86 runtime on the host, the Visual C++ x86 2015–2019 runtime is automatically installed before the agent software is installed.
Step 2: As an administrator, open a command line and go to the directory where you saved the installation package.
Step 3: Installing Discovery Agent
Run the agent install command as indicated in the example below to install the agent. Replace your-home-region with your home region's name, aws-access-key-id with your access key id, and aws-secret-access-key with your secret access key in the example.
We can specify the folder path C:install-location for the INSTALLLOCATION argument to set the agent installation location.
INSTALLLOCATION="C:installlocation" is an example. [INSTALLLOCATION path]AWS Discovery is the resulting folder hierarchy.
The Program Files folder is the default installation location.
Agent Data Collection
If data collection stops after deploying and configuring the Discovery Agent, you can restart it. You can start and stop data collection via the console or use the AWS CLI to make API calls. The procedures that follow describe both of these methods.
Using the migration hub console
On the Data Collectors page of the Migration Hub console, the following procedure shows how to start or stop the Discovery Agent data collection process.
To begin or end data collection.
- Select Data Collectors from the navigation pane.
- Select the Agents tab.
- Check the box next to the agent to start or stop.
- Select either Start or Stop data collection.
Frequently Asked Questions
Should I use agentless application discovery or agent-based application discovery?
Agentless Application Discovery is recommended for VMware customers because it eliminates the need for customers to install an agent on each host and collects server information regardless of the operating system of the VM. It does not gather data from non-VMware environments.
If you are running a non-VMware environment or need process and network connection information, use the AWS Application Discovery Agent. You can use both agent-based and agentless application Discovery at the same time.
What is the home region of the Migration Hub?
You must first select a Migration Hub home region from the Migration Hub Settings page or via the Migration Hub Config API before using the Migration Hub and Application Discovery Service. The Migration Hub home region is the only AWS region used by the Application Discovery Service to store your discovery and planning data. The data in the Migration Hub home region serves as a single repository of Discovery and migration planning information for your entire portfolio, as well as a unified view of migrations into multiple AWS regions. To learn more about the Migration Hub's home region, consult the documentation.
The Migration Hub home region cannot be changed once it is set.
How is data protected while being transported to AWS?
The AWS Application Discovery Agent sends data to the AWS Application Discovery Service via HTTPS/TLS. The AWS Application Discovery Agent can be run in offline mode, which writes data to a local file, allowing customers to review collected data before enabling online mode.
Is it possible to run agentless Discovery in my EC2 instances?
No, the AWS Agentless Discovery Connector is installed on VMware and only collects data from VMware vCenter.
Conclusion
In this article, we have discussed concepts of AWS Application Discovery Agent. We started with an introduction, of how data is collected by the discovery agent, then we saw how we can install the agent on Linux and Windows, and in the end, concluded with agent data collection of AWS Application Discovery Agent.
We hope that this blog has helped you enhance your knowledge regarding AWS Application Discovery Agent and if you would like to learn more, check out our article AWS Step Functions.
For peeps out there who want to learn more about Data Structures, Algorithms, Power programming, JavaScript, or any other upskilling, please refer to guided paths on Coding Ninjas Studio. Enroll in our courses, go for mock tests and solve problems available and interview puzzles. Also, you can put your attention towards interview stuff- interview experiences and an interview bundle for placement preparations. Do upvote our blog to help other ninjas grow.
Do upvote our blog to help other ninjas grow. Happy Coding!