Manually create an AMI on AWS

To create a private Lighthouse AMI, you should use a temporary Linux “build-box” EC2 instance.

Note: This is a one-time procedure. The AMI can be used to create multiple instances of Lighthouse, and upgrades can be performed through the Lighthouse Web UI.

IMPORTANT: Before you perform this procedure, ensure that you have an account on AWS with an IAM user, a key pair and an access key. For more detailed requirements, see Before you begin.

  1. Log into AWS, and navigate to the Instances page.

  2. On the top-right of the page, click Launch Instances.
    The Launch an instance page displays.

  3. Create an AWS EC2 Linux instance, with the following settings:

    Section Configuration
    Name and tags Enter a name.
    Application and OS Images (Amazon Machine Image) Select Amazon Linux 2 or Amazon Linux 2023.
    Instance type Select t3.large instance type with a default (8 GiB) root volume.
    Configure storage Select 50GB gp3 volume

    Note: Consult Amazon documentation for more information if required.

  4. On the right-hand side of the page, click Launch Instance.

  5. On your machine, open a Command Line Interface to create a Lighthouse AMI, using the lighthouse-aws-bootstrap.sh script (usage information can be displayed by using the -h option) on the EC2 instance created in the previous steps:

    1. Connect via SSH to your instance on AWS using the username ec2-user and the private key you created previously. All subsequent steps must be performed on the instance.

      Note: To do this, go to the Instances page and select the instance you created in the previous steps. On the -right-hand side of the details pane for the instance, click Connect then select the SSH client tab on the Connect to instance page. Follow the steps on the page to SSH into your instance.

    2. Configure AWS using the following command:
      aws configure

    3. Provide the access key and region details (other settings may be left unchanged). If you are using IAM Identity Center, you must instead configure using aws configure sso, and set the CLI Profile Name to be default.

    4. Download the aws-bootstrap script:
      wget http://ftp.opengear.com/download/lighthouse_software/current/lighthouse/aws/lighthouse-aws-bootstrap.sh

    5. Run the lighthouse-aws-bootstrap.sh script as follows:
      bash ./lighthouse-aws-bootstrap.sh -n Lighthouse -r https://ftp.opengear.com/download/lighthouse_software/current/lighthouse/aws/lighthouse-<year>-<month>-<version>.aws.raw.tar
      The following is an example of a running bootstrap script:

      $ bash ./lighthouse-aws-bootstrap.sh -n Lighthouse -r \
      > http://ftp.opengear.com/download/lighthouse_software/current/lighthouse/aws/lighthouse-24.12.1.aws.raw.tar
      Downloading image...
      Image size is 54049899008 bytes (51 GiB)
      Creating volume...
      Attaching volume vol-09fb0b463f5a59eaf to EC2 instance...
      Cloning image onto volume...
      0+852971 records in
      0+852971 records out
      54049899008 bytes (54 GB, 50 GiB) copied, 845.072 s, 64.0 MB/s
      Creating snapshot of volume...
      Waiting for snapshot snap-0f83746856d985070 to complete...
      Creating AMI from snapshot snap-0f83746856d985070...
      Done!
      Cleaning up...

    6. Wait while the Lighthouse AMI is created.
      This can take up to 30 minutes.

    7. After the AMI has been created, terminate the Linux EC2 instance to avoid incurring additional costs.

  6. In AWS, navigate to the Amazon Machine Images (AMIs) page of the EC2 Management Console.

  7. Select the Lighthouse AMI.
    The Imagine summary for ami-[ID] displays.

  8. On the top-right of the page, click Launch instance from AMI.
    The Launch an instance page displays.

  9. Complete the steps in Configure and Launch the Instance.