Amazon Web Services EC2
/docs/development/misc/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. -
In the AWS console: create new virtual 16GB drive, name it
ubos-$channel-YYYYMMDD-I
, with the current date and an index. -
In the AWS console: attach this virtual drive to the
bootstrap-$channel
instance. -
ssh
into thebootstrap-$channel
instance. -
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: unattach 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.