Creating an AWS EC2 Instance

Here are the steps to create an AWS EC2 instance
  1. From the EC2 Dashboard (e.g., https://us-west-2.console.aws.amazon.com/ec2/v2/home) go to the Instances page and select "Launch Instance".
  2. Choose an Operating System
    RAMADDA can run on any operating system. The RAMADDA installer has been tested on Amazon Linux, Ubuntu, Redhat and Centos. However, the PostgreSQL installation only works with Amazon Linux. You can configure RAMADDA to use other databases (e.g. MySQL) but you will have to install them yourself.
  3. Choose an Instance Type
    The instance type depends on your expected load. For example https://ramadda.org runs on a t2.medium but a t2.micro or t2.small works just fine.
  4. Key pair
    Select "Create new key pair". This is what you use to SSH to your instance. Do not lose it! Once downloaded, you will need to change permissions on your pem file, e.g.
    chmod 600 ramadda.pem
    
  5. Network settings
    You should allow SSH, HTTPS and HTTP traffic to your server
  6. Add Storage
    The instance comes with a smallish root volume where /home is mounted. You should add a new volume. The model that we follow is to have an additional large size volume that will hold RAMADDA's home directory, uploaded files and database. The size depends on the expected size of your RAMADDA use. For example, for the https://ramadda.org repository (which has a ton of content) the database size is ~4GB and the files take up ~20GB.
  7. Review Instance Launch
  8. Elastic IPS (optional)
    By default the IP address associated with your instance can change when the instance is stopped and restarted. You can use the AWS Elastic IP service to create a permanent IP address for your instance. In the AWS console under Network and Security select "Elastic IPs". Next, select "Allocate Elastic IP address" to create a new IP address. Then associate the IP address with your new instance.
  9. From the Instances page view the details of your instance to see its IPv4 Public IP
  10. SSH to your instance using the PEM file:
    ssh -i <.pem file>  ec2-user@<server IP address>
    
  11. Set up backup
    Once you have RAMADDA installed you will want to set up backup of your main volume using the Snapshot service. Once this is configured and running it is a very good idea to test it out by starting up a new test instance, initializing the volume with the snapshot and verifying that the snapshot works.