Changes

From Genome Analysis Wiki
Jump to navigationJump to search
no edit summary
Line 7: Line 7:  
These notes assume you have already created an EC2 account and have the certificates and keys set up properly.
 
These notes assume you have already created an EC2 account and have the certificates and keys set up properly.
   −
== Launch an instance ==
+
 
 +
== Create new GotCloud AMI from StarCluster AMI ==
 +
=== Launch an instance ===
    
<code>
 
<code>
Line 34: Line 36:  
# Select the key/pair you want to use & Launch
 
# Select the key/pair you want to use & Launch
   −
== Setup the instance with GotCloud ==
+
=== Setup the instance with GotCloud ===
 
This assumes you have already logged onto the instance.
 
This assumes you have already logged onto the instance.
   Line 60: Line 62:  
#* <code>:q</code>
 
#* <code>:q</code>
   −
== Create the AMI ==
+
=== Set Up Swap Space ===
   −
Once your instance is all ready with everything you want, create the AMI.
+
Issue the command '''swapon -s''' to see if there is swap space.
 +
If there is only a header line, you need to add a swap file like this:
   −
In your browser at the EC2 Management Console do the following:
+
<code>
# Select the running instance
+
  df -h          # Be sure there's enough space, decide on swap size
# Right click, <code>Create Image</code>
+
  # Create a file /swap to use (assuming / is large enough)
# Enter name & Description
+
  sudo bash      # Run these commands as root
# Ensure volume size is correct
+
  swap=/swap
# Mark delete on terminate
+
  dd if=/dev/zero of=$swap bs=524288 count=16384    # 8GB swap on t1.micro  15G=bs=1073741824 count=15
#:This will take several minutes to complete.
+
  chown root:root $swap
#:In the EC2 Dashboard, you can monitor the progress.
+
  mkswap $swap
#:When it is done, you'll see a new AMI under the list of AMIs.
+
  chmod 0600 $swap
# When completed, terminate your old instance
+
  swapon $swap
 +
  echo "$swap  none swap sw  0  0" >> /etc/fstab
 +
 +
  swapon -s      # Should show the swap device
 +
</code>
   −
Your new AMI should look pretty much like this:
+
=== Create the AMI ===
 +
# Go to : [[#Create the AMI|Create the AMI]]
      Line 88: Line 96:  
#* Specify <code>-j #</code> based on the number of CPUs your instance has
 
#* Specify <code>-j #</code> based on the number of CPUs your instance has
 
# <code>cd</code>
 
# <code>cd</code>
 +
# Go to : [[#Create the AMI|Create the AMI]]
    +
== Create the AMI ==
   −
== Set Up Swap Space ==
+
Once your instance is all ready with everything you want, create the AMI.
 +
 
 +
In your browser at the EC2 Management Console do the following:
 +
# Select the running instance
 +
# Right click, <code>Create Image</code>
 +
# Enter name & Description
 +
# Ensure volume size is correct
 +
# Mark delete on terminate
 +
#:This will take several minutes to complete.
 +
#:In the EC2 Dashboard, you can monitor the progress.
 +
#:When it is done, you'll see a new AMI under the list of AMIs.
 +
# When completed, terminate your old instance
   −
Issue the command '''swapon -s''' to see if there is swap space.
  −
If there is only a header line, you need to add a swap file like this:
     −
<code>
  −
  df -h          # Be sure there's enough space, decide on swap size
  −
  #  Create a file /swap to use (assuming / is large enough)
  −
  sudo bash      # Run these commands as root
  −
  swap=/swap
  −
  dd if=/dev/zero of=$swap bs=524288 count=16384    # 8GB swap on t1.micro  15G=bs=1073741824 count=15
  −
  chown root:root $swap
  −
  mkswap $swap
  −
  chmod 0600 $swap
  −
  swapon $swap
  −
  echo "$swap  none swap sw  0  0" >> /etc/fstab
  −
  −
  swapon -s      # Should show the swap device
  −
</code>
      
== Install the Software ==
 
== Install the Software ==

Navigation menu