Amazon Web Services EC2

/docs/linux/developer/cloud-images/amazon-ec2/

To create the image

To create a UBOS image for EC2 on the $channel Release Channel:

  1. In the AWS console: create a “micro” instance from existing UBOS $channel image with name bootstrap-$channel. This instance will be used to create the new installation on a new virtual disk. Follow the wizard.

  2. In the AWS console: create new virtual 16GB drive, name it ubos-$channel-YYYYMMDD-I, with the current date and an index. Make sure it is in the same availability zone as the instance.

  3. In the AWS console: attach this virtual drive to the bootstrap-$channel instance.

  4. ssh -i <keyfile> shepherd@<ip> into the bootstrap-$channel instance with the appropriate <keyfile> and public IP address.

  5. Update the bootstrap-$channel instance:

    % sudo uboos-admin update
    
  6. On the bootstrap-$channel instance:

    % sudo ubos-install --deviceclass ec2 --channel $channel /dev/xvdf -v
    

    The device names keep changing, so it may not be /dev/xvdf.

  7. In the AWS console: detach virtual disk ubos-$channel-YYYYMMDD-I from the EC2 instance bootstrap-$channel.

  8. In the AWS console: create a snapshot from virtual disk ubos-$channel-YYYYMMDD-I, name it ubos-$channel-YYYYMMDD-1 as well.

  9. In the AWS console: create an AMI (“image”) from this snapshot, name it ubos-$channel-YYYYMMDD-1 as well.

Once the image is tested successfully:

  1. Terminate the bootstrap-$channel instance.

  2. Delete its root disk (automatically) and also disk ubos-$channel-YYYYMMDD-I.

  3. Make the AMI public.

  4. Update the AMI identifier on the UBOS website.

The snapshot needs to stay around.

To test the image

  1. Instantiate the image into a “t3” “micro” instance. Note: “t2” does not work.

  2. Log into the instance, execute:

    % sudo ubos-admin status
    
  3. Perform application tests.

  4. Shut down the instance.