Enterprise Recon Cloud 2.12.0
How To Manage Instance and Disk Size
This section covers the following topics:
- Overview
- Increase Both Instance Size and Disk Size
- Increase Disk Size Only
- Update CPU and Memory configuration
Overview
When 85% of total disk capacity on the Master Server is used, the Master Server stops the data store and enters the low disk space mode. This is to avoid data store corruption due to insufficient free disk space on the Master Server.
While in low disk space mode:
- Users cannot log in to the Web Console.
- The API framework is not available.
- Scans continue to run on Target hosts, but the scan results are not sent back to the Master Server. Instead, the results are saved to a journal, and stored until the Master Server becomes available.
While in low disk space mode, the Master Server checks the amount of disk space used:
- Every 10 minutes.
- When the Master Server starts up.
The Master Server will stay in low disk space mode until it detects that only 70% of total disk capacity is used on the Master Server.
There are two ways to increase your instance and/or disk size:
- Increase both the instance size and disk size via the CloudFormation template.
- Increase the disk size only via the EC2 console.
Increase Both Instance Size and Disk Size
Modifying the CloudFormation template allows you to increase your deployment size. This increases both the instance size and disk size.
To increase your deployment size via the CloudFormation template, perform the following steps:
- Log in to the AWS IAM console.
- On the upper left part of the screen, click Services > All Services > CloudFormation.
- In the CloudFormation dashboard, under the list of stacks, select the existing stack for ER Cloud.
- Click the Update button.
- In the Update stack page, under the Prerequisite - Prepare template section, select Use existing template.
- Click Next.
-
From the Select the Enterprise Recon Cloud deployment size dropdown, select your new deployment size.
Changing to a size lower than your current deployment size will result in an error. - Click Next until the submission page.
- Click the Submit button.
- Update CPU and Memory configuration.
-
Extend the partition of your updated volume.
# SSH to the EC2 instance. ssh -i <path-to-the-sshkey.pem-file> ec2-user@<IP address or public DNS name>
# Expand your partition sudo growpart /dev/nvme1n1 1 sudo xfs_growfs -d /var/lib/docker/volumes
Increase Disk Size Only
If you run out of disk space for your Master Server, you can choose to increase only your disk size via the EC2 console.
- Log in to the AWS EC2 console.
- In the left navigation panel of the EC2 Dashboard, under the Instances section, select the EC2 instance for ER Cloud.
- On the upper right side of the page, click Instance state > Stop instance.
- Click the Storage tab of the instance.
- In the list of volume IDs, click the volume that contains your data (usually with the bigger volume size).
- In the Volumes page, click the volume you want to increase the size of.
- On the upper right side of the page, click Actions > Modify volume.
- In the Modify volume page, in the Size (GiB) field, enter the size of the volume (in GiB).
- Click Modify.
- When prompted, click Modify. It may take a while for the Volume state to change to “Okay”.
- Return to the Instances section and select the EC2 instance.
- On the upper right side of the page, click Instance state > Start instance.
-
Extend the partition of your updated volume.
# SSH to the EC2 instance. ssh -i <path-to-the-sshkey.pem-file> ec2-user@<IP address or public DNS name>
# Expand your partition sudo growpart /dev/nvme1n1 1 sudo xfs_growfs -d /var/lib/docker/volumes
Update CPU and Memory configuration
After updating your instance, you also need to update the CPU and memory configuration of your Master Server and Proxy Agents.
To update the configuration, perform the following steps:
-
SSH to the EC2 instance.
ssh -i <path-to-the-sshkey.pem-file> ec2-user@<IP address or public DNS name>
- Using any text editor, open the /home/ec2-user/er-cloud.sh file that is in the EC2 instance.
- Change the following variables with the values provided in the table below:
Deployment size Small Medium Large Instance type m5.large m5.2xlarge m5.4xlarge MASTER_SERVER_CPU 3 6 12 MASTER_SERVER_MEMORY 13g 24g 56g AGENT_CPU 0.5 1 1 AGENT_MEMORY 1.5g 2g 2g PROXY_AGENT_COUNT 2 4 4 If you change your instance type from m5.large (small) to m5.2xlarge (medium), in the /home/ec2-user/er-cloud.sh file, update the MASTER_SERVER_CPU variable to 6, the MASTER_SERVER_MEMORY variable to 24g, the AGENT_CPU variable to 1, the AGENT_MEMORY variable to 2g, and the PROXY_AGENT_COUNT variable to 4.The table above indicates the recommended value for the variables according to the selected instance type. Ground Labs does not guarantee support for non-standard configurations of the Enterprise Recon Cloud Master Server. Any deviation from the information in the table above, and/or any modification made to the Master Server that may impact the functionality of Enterprise Recon Cloud is considered a non-standard configuration. -
Apply the new configuration.
# Stop all running containers /home/ec2-user/er-cloud.sh stop
# Remove all running containers docker container prune -f
# Start all containers /home/ec2-user/er-cloud.sh start