Installing on Amazon AWS
Section 8.1: Installing on Amazon AWS

Here are the steps to install the stand-alone version of RAMADDA on an AWS instance.

  1. From the EC2 Dashboard (e.g., go to the Instances page and select "Launch Instance".
  2. Choose an Amazon Machine Image (AMI)
    Pick a standard Amazon Linux 2 AMI image. Note: RAMADDA can run on REDHAT Linux but the installer has not been fully tested.
  3. Choose an Instance Type
    The instance type depends on your expected load. For example runs on a t2.medium but a t2.micro or t2.small works just fine.
  4. Configure Instance Details
    The defaults should be OK but you may want to create a new network and subnet.
  5. Add Storage
    The instance comes with a smallish volume where /home is mounted. You should add a new volume. This is where RAMADDA's home directory, uploaded files and database will be stored. The size depends on the expected size of your RAMADDA use. For example, for the repository (which has a ton of content) the database size is ~4GB and the files take up ~20GB.
  6. Configure Security Group
    Create a security group with the following ports:
    SSH  port 22
    HTTP port 80 - Source should be the default, ::/0
    HTTPS port 443 - Source should be the default, ::/0
  7. Review Instance Launch
    Create (or select an existing) key pair file (e.g., ramadda.pem) and download it. 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
  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.

Once your instance is running here are the steps to configure and install RAMADDA.
  1. From the Instances page view the details of your instance to see its IPv4 Public IP
  2. SSH to your instance using the PEM file:
    ssh -i <.pem file>  ec2-user@<server IP address>
  3. It is best to update the instance:
    sudo yum update -y
  4. Fetch then unzip the RAMADDA installer:
    wget -O
  5. Run the installer - make sure to give it the absolute path:
    sudo sh /home/ec2-user/ramaddainstaller/
The installer will walk you through a number of installation steps to setup the directories, and install and configure Java, Postgres and the RAMADDA server. The installer will:
  • Mount the EBS volume as /mnt/ramadda
  • Install and configure PostgreSQL. A ramadda user and a repository database will be created
  • Download and install RAMADDA
  • Configure RAMADDA with a (temporary) self-signed certificate for HTTPS access
  • Install RAMADDA as a service. To start and stop RAMADDA do:
    sudo service ramadda start
Once running you need to finish the configuration through the RAMADDA web interface:
https://<IP address>/repository
The install process will display an installation password that you enter through the web interface. Note: since the SSL certificate is self-signed your browser will display a warning when accessing the site.

The install will result in:
/home/ec2-user/ramaddainstaller - The installer
/home/ec2-user/ramaddainstaller/ - A script to run to update your RAMADDA server. Run it as
sudo sh /home/ec2-user/ramaddainstaller/

/home/ec2-user/ramadda - The installed server
/home/ec2-user/ramadda/ramadda.log - The log output of the server

/mnt/ramadda/repository - The RAMADDA home directory. 
/mnt/ramadda/repository/ - Holds the database password
/mnt/ramadda/repository/keystore - The generated keystore. Replace this with a real certificate
/mnt/ramadda/repository/ - Holds the keystore passwords
/mnt/ramadda/repository/ - Holds the configuration password
/mnt/ramadda/repository/ - Holds the database password
/mnt/ramadda/pgsql - Postgres database