Enterprise Recon Cloud 2.12.0

How To Manage Instance and Disk Size

This section covers the following topics:

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:

  1. Log in to the AWS IAM console.
  2. On the upper left part of the screen, click Services > All Services > CloudFormation.
  3. In the CloudFormation dashboard, under the list of stacks, select the existing stack for ER Cloud.
  4. Click the Update button.
  5. In the Update stack page, under the Prerequisite - Prepare template section, select Use existing template.
  6. Click Next.
  7. From the Select the Enterprise Recon Cloud deployment size dropdown, select your new deployment size.

  8. Click Next until the submission page.
  9. Click the Submit button.
  10. Update CPU and Memory configuration.
  11. 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.

  1. Log in to the AWS EC2 console.
  2. In the left navigation panel of the EC2 Dashboard, under the Instances section, select the EC2 instance for ER Cloud.
  3. On the upper right side of the page, click Instance state > Stop instance.
  4. Click the Storage tab of the instance.
  5. In the list of volume IDs, click the volume that contains your data (usually with the bigger volume size).
  6. In the Volumes page, click the volume you want to increase the size of.
  7. On the upper right side of the page, click Actions > Modify volume.
  8. In the Modify volume page, in the Size (GiB) field, enter the size of the volume (in GiB).
  9. Click Modify.
  10. When prompted, click Modify. It may take a while for the Volume state to change to “Okay”.
  11. Return to the Instances section and select the EC2 instance.
  12. On the upper right side of the page, click Instance state > Start instance.
  13. 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:

  1. SSH to the EC2 instance.

    ssh -i <path-to-the-sshkey.pem-file> ec2-user@<IP address or public DNS name>

  2. Using any text editor, open the /home/ec2-user/er-cloud.sh file that is in the EC2 instance.
  3. 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
  4. 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