OpenSolaris Tutorials
Installing and Configuring OpenVPN in OpenSolaris
Deploying OpenSolaris In Amazon EC2
Installing Postfix and Dovecot Under OpenSolaris

Deploying OpenSolaris In Amazon EC2

Amazon provides a powerful block storage device system to expand EC2 instances. Think of an Elastic Block Storage (EBS) volume more as a physical disk or SAN LUN over a CIFS or NFS share style device.

Obviously the first step to using an EBS volume is to create it. When creating a volume the size is in GB and you want to specify to create the same zone as you plan on running instances off it. There is a cost to using EBS, consult the Amazon AWS website for usage fees.

# ec2-create-volume -s 10 -z us-east-1a -C $EC2_CERT 

Next attach the volume to a running instance. In OpenSolaris provide a number, 2 or greater, to give the volume device. The device is presented as c7d#. The volume at this point is still completely blank. Create a ZFS filesystem with zpool create.

# /opt/ec2/bin/ec2attvol vol-XXXXXXXX -C $EC2_CERT 
      -K $EC2_PRIVATE_KEY -d 2 -i i-XXXXXXXX

Since an EBS volume can only be attached to a single running instance before attaching the volume to another instance it must be detached from the first. All services that write to the EBS volume should be properly quiesced before detaching the volume to prevent corruption.

# /opt/ec2/bin/ ec2detvol vol-XXXXXXXX -C $EC2_CERT 

A handy feature in storage appliances is snapshots. Snapshots are point in time copies of volumes. These are popular for backup and disaster recovery, but can be a costly longterm backup storage method. Snapshots are great for quick recovery from the oops moment though. As with detaching a volume, before creating a snapshot quiesce all services accessing the volume. Snapshots also incur cost from Amazon AWS.

# /opt/ec2/bin/ec2-create-snapshot -C $EC2_CERT 
[;P:] When a snapshot is no longer needed it should be deleted to prevent any additional storage costs.

#  ec2-delete-snapshot -C $EC2_CERT -K $EC2_PRIVATE_KEY 

Before a snapshot can be mounted a volume must be created based of the snapshot. There are also a number of publicly available snapshots with public data. To minimize costs create the volume in the same availability zone as the instance you plan on attaching it to.

#  ec2-create-volume -C $EC2_CERT -K $EC2_PRIVATE_KEY 
     --snapshot snap-XXXXXXXX -z us-east-1a

This should be enough to get you started with Amazon EC2.

Bundling OpenSolaris AMIs <<  1 2
New Content