Changes

From Genome Analysis Wiki
Jump to navigationJump to search
Line 64: Line 64:       −
== Configure the Host so it Usable ==
+
== Configure the Host to be Usable ==
    +
It is useful to configure /etc/rc.local to do most things you need at boot time.
 +
There are many other ways to do this, but here's one simple way - create the
 +
file /etc/rc.local (as root).
 +
The following example sets up access details for '''s3cmd''' and '''s3fs'''
 +
(use your own credentials).
 +
 +
<code>
 +
ubuntu@ip-10-254-60-210:~$ sudo more /etc/rc.local
 +
  #!/bin/sh
 +
  USER=ubuntu
 +
  THOUSANDG=/mnt/1000g
 +
  FILES3=passwd-s3fs
 +
  S3ERR=/tmp/s3fs.err
 +
 +
  #    Set up for GotCloud    Assumes /dev/xvdf has reference files for GotCloud
 +
  mkdir -p /gotcloud
 +
  mount /dev/xvdf /gotcloud
 +
  if [ ! -d /gotcloud/gotcloud.ref ]; then
 +
    echo "#######################################################"
 +
    echo "#  GotCloud is not set up on /gotcloud"
 +
    echo "#######################################################"
 +
  fi
 +
  #    Setup 1000g
 +
  usermod -aG fuse $USER
 +
  echo 'AKIAIW5TQEUWZ3YCZF2Q:ft1eJa3WGzNE8iitNlbA08x/G8iMqkMIkJjFCIGf' > /etc/$FILES3
 +
  chown root.root /etc/$FILES3
 +
  chmod 640 /etc/$FILES3
 +
  mkdir -p $THOUSANDG
 +
  chown $USER.$USER $THOUSANDG
 +
  /usr/local/bin/s3fs -o allow_other 1000genomes $THOUSANDG > $S3ERR 2>&1
 +
  if [ ! -r $THOUSANDG/alignment.index ]; then
 +
    echo "#######################################################" >> $S3ERR
 +
    echo "#  1000genomes is not set up on $THOUSANDG" >> $S3ERR
 +
    echo "#######################################################" >> $S3ERR
 +
  fi
 +
  df -h
 +
 +
  exit 0
 +
</code>
    
== Create the AMI ==
 
== Create the AMI ==
283

edits

Navigation menu