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:
-
In the AWS console: create a “micro” instance from existing UBOS
$channel
image with namebootstrap-$channel
. This instance will be used to create the new installation on a new virtual disk. Follow the wizard. -
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. -
In the AWS console: attach this virtual drive to the
bootstrap-$channel
instance. -
ssh -i <keyfile> shepherd@<ip>
into thebootstrap-$channel
instance with the appropriate<keyfile>
and public IP address. -
Update the
bootstrap-$channel
instance:% sudo uboos-admin update
-
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
. -
In the AWS console: detach virtual disk
ubos-$channel-YYYYMMDD-I
from the EC2 instancebootstrap-$channel
. -
In the AWS console: create a snapshot from virtual disk
ubos-$channel-YYYYMMDD-I
, name itubos-$channel-YYYYMMDD-1
as well. -
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:
-
Terminate the
bootstrap-$channel
instance. -
Delete its root disk (automatically) and also disk
ubos-$channel-YYYYMMDD-I
. -
Make the AMI public.
-
Update the AMI identifier on the UBOS website.
The snapshot needs to stay around.
To test the image
-
Instantiate the image into a “t3” “micro” instance. Note: “t2” does not work.
-
Log into the instance, execute:
% sudo ubos-admin status
-
Perform application tests.
-
Shut down the instance.