Difference between revisions of "Creating a Snapshot on EC2"

From Genome Analysis Wiki
Jump to navigationJump to search
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Back to parent: [[GotCloud]]
 
Back to parent: [[GotCloud]]
  
 +
'''We no longer provide a snapshot for GotCLoud'''. This is no longer used.
  
 
The following are notes taken when creating a Snapshot of a volume where the GotCloud  
 
The following are notes taken when creating a Snapshot of a volume where the GotCloud  
Line 21: Line 22:
 
Be sure the zone is the same as the one for the instance you just launched/created.
 
Be sure the zone is the same as the one for the instance you just launched/created.
 
The volume should be based on 'No Snapshot'.
 
The volume should be based on 'No Snapshot'.
Once it is created, attach it to the  instance you have launched and mount it it /gotcloud
+
Once it is created, attach it to the  instance you have launched and '''mount it it /gotcloud'''.
  
 
'''Install the Software'''
 
'''Install the Software'''
Line 27: Line 28:
 
Follow the instructions to install a Debian package  [[Pipeline Debian Package|debian package]]
 
Follow the instructions to install a Debian package  [[Pipeline Debian Package|debian package]]
 
Run the tests to be sure everything is OK.
 
Run the tests to be sure everything is OK.
 +
This installs files in /usr/local/gotcloud and these need to be copied to the snapshot disk.
 +
 +
<code>
 +
  cd /gotcloud
 +
  rm -rf bin scripts test      # Remove old GotCloud
 +
  sudo rsync -av /usr/local/gotcloud/* /gotcloud
 +
  sudo chown -R ubuntu.ubuntu bin scripts test release_version.txt
 +
</code>
  
 
Even though the references are not part of the distribution, you cannot do anything useful
 
Even though the references are not part of the distribution, you cannot do anything useful
Line 32: Line 41:
  
 
<code>
 
<code>
   cd /mnt
+
   cd /mnt                     # Because the *.tar.gz will be too big for /home
   wget share.sph.umich.edu:gotcloud/hs37-db132.tar.gz  
+
   sudo wget share.sph.umich.edu:gotcloud/CHANGETHIS.tar.gz  
 
   cd /gotcloud
 
   cd /gotcloud
   tar xzf /mnt/hs37-db132.tar.gz
+
   sudo tar xzf /mnt/CHANGETHIS.tar.gz
 +
  sudo chown -R ubuntu.ubuntu gotcloud.ref
 +
  sudo chmod 0755 gotcloud.ref
 +
  chmod 0644 gotcloud.ref/*
 
   ls -la ref
 
   ls -la ref
   rm -f /mnt/hs37-db132.tar.gz    # if no error
+
   sudo rm -f /mnt/CHANGETHIS.tar.gz    # if no error
   cd /gotcloud/examples/umakeRef
+
   cd /gotcloud/examples/umakeRef       ############# still true?
   ln -s /gotcloud/ref/hs37d5.fa .
+
   ln -s /gotcloud/ref/hs37d5.fa .     ############# still true?
 
</code>
 
</code>
  
Line 50: Line 62:
 
<code>
 
<code>
 
   Name:  GotCloud Distribution
 
   Name:  GotCloud Distribution
   Description:  CSG GotCloud files from UMICH
+
   Description:  GotCloud from UMICH   Version 1.03a6
 
   Note snapshot name  e.g. snap-9e782bb8
 
   Note snapshot name  e.g. snap-9e782bb8
 
</code>
 
</code>
  
 
Now make the name of this snapshot available to the user population.
 
Now make the name of this snapshot available to the user population.
In your Unix terminal, get the snapshots.txt file, update it and make it available:
+
'''In your Unix terminal''', get the snapshots.txt file, update it and make it available:
  
 
<code>
 
<code>

Latest revision as of 13:12, 20 May 2013

Back to parent: GotCloud

We no longer provide a snapshot for GotCLoud. This is no longer used.

The following are notes taken when creating a Snapshot of a volume where the GotCloud software and data are installed.

Create an Instance with a Master GotCloud Volume

 Login to https://console.aws.amazon.com/ec2       # EC2 Management Console

Pay attention to the region you are using, at least for now it seems any StarCluster activity must be in us-west-2.

Launch a new instance which we will use to set up the software and ultimately save it as an AMI. Your instance can use any memory size (t1.micro is fine), but should be running Ubuntu Server 12.04.1 LTS 64 bit. The root volume size does not matter either.

Create a volume to serve as the GotCloud master volume if you do not already have one. The volume size should be 20G at the moment. Be sure the zone is the same as the one for the instance you just launched/created. The volume should be based on 'No Snapshot'. Once it is created, attach it to the instance you have launched and mount it it /gotcloud.

Install the Software

Follow the instructions to install a Debian package debian package Run the tests to be sure everything is OK. This installs files in /usr/local/gotcloud and these need to be copied to the snapshot disk.

 cd /gotcloud
 rm -rf bin scripts test      # Remove old GotCloud
 sudo rsync -av /usr/local/gotcloud/* /gotcloud
 sudo chown -R ubuntu.ubuntu bin scripts test release_version.txt

Even though the references are not part of the distribution, you cannot do anything useful without references, so get them and make them available in /gotcloud

 cd /mnt                     # Because the *.tar.gz will be too big for /home
 sudo wget share.sph.umich.edu:gotcloud/CHANGETHIS.tar.gz 
 cd /gotcloud
 sudo tar xzf /mnt/CHANGETHIS.tar.gz
 sudo chown -R ubuntu.ubuntu gotcloud.ref
 sudo chmod 0755 gotcloud.ref
 chmod 0644 gotcloud.ref/*
 ls -la ref
 sudo rm -f /mnt/CHANGETHIS.tar.gz    # if no error
 cd /gotcloud/examples/umakeRef       ############# still true?
 ln -s /gotcloud/ref/hs37d5.fa .      ############# still true?

Create the SnapShot

In your browser at the EC2 Management Console choose Elastic Block Storage -> Volumes. Find the volume for current master you created above. Choose Actions -> Create Snapshot.

 Name:  GotCloud Distribution
 Description:  GotCloud from UMICH   Version 1.03a6
 Note snapshot name  e.g. snap-9e782bb8

Now make the name of this snapshot available to the user population. In your Unix terminal, get the snapshots.txt file, update it and make it available:

 wget share.sph.umich.edu:gotcloud/snapshots.txt
 vi snapshots.txt   # Replace snapshot id with new one
 scp snapshots.txt gotcloud@share.sph.umich.edu: