A quick guide to JATOS and web hosting on AWS

logo

Since the writing of this guide, AWS has received numerous updates and changes to the interface, so if anything doesn't match up, look carefully and explore around. Remember, Google is your best friend.

Setting up and installing JATOS

  1. Register at AWS. You will need a credit/debit/gift card to make an account.
  2. Go to the EC2 page and launch a new EC2 instance with Ubuntu. Click here to watch a tutorial on how to create an EC2 in AWS
    • When you download the key pair value, ignore what is happening in the video and simply store it in a safe and accessible folder on your device.
  3. Go back to the EC2 instance management panel and right click on your new EC2. Right click on it and click on the connect option. Then a page should popup showing various ways to connect to your EC2 instance. Go to the section for SSH and copy that command.
  4. Navigate to the folder where your key pair value is store and open up command prompt in that folder. Paste the command that you just copied and press enter.
  5. At this point, you should be in the EC2 console. Input the following command to make sure everything is up to date: sudo apt-get update.
  6. Now, input the following command to install apache2: sudo apt-get install apache2
    • This is used to host html and webpages, which is required to host JATOS.
  7. Do the following command to create a webpage: sudo nano 1.html
    • http://{Insert your public IP here}/1.html will now show the html file.
  8. Input the following command to install JATOS onto the instance: wget https://github.com/JATOS/JATOS/releases/latest/download/jatos_linux_java.zip
    • This command will install a version of jatos that already have java attached, so don't worry about that.
  9. Input the following command to install "unzip": sudo apt-get install unzip
  10. Unzip the jatos zip file with: unzip jatos_linux_java.zip (or sudo unzip jatos_linux_java.zip; whichever one works)
  11. Now if you run (./loader.sh start) in the JATOS folder that the file (loader.sh) is in, JATOS should start successfully. http://{Insert your public IP here}:9000 will now show the JATOS login page

Complete documentation can be found here.

Setting up auto-start with JATOS

Follow the corresponding steps at this webpage on how to turn on autostart. Important: When inputting commands, insert "sudo" in front of it to execute it with administrator permission

Setting up your own domain name for the site

  1. Create and allocate an elastic IP address to your EC2 instance. Read the directions here.
    • This binds your EC2 to an IP address that won't change on every start-up.
  2. After purchasing a domain from AWS, verify your information and fill in the contact information.
    • If you want to make sure your info is correct, go to the Domain Listing section of Route 53.
  3. After the certificate is set up, go to route 53 hosted zone and create a hosted zone with your domain name.
  4. Then afterwards, in your domain’s hosted zone, create two records.
    • Record 1 should be simple routing, record type A, and in the value section, put in your public IPv4 address, this should be the elastic IP address that you have created and associated with your instance
    • Record 2 would have the record name as www.{your domain name}, record type CNAME, simple routing, and have the same value as record 1.
  5. After everything is done and the record is loaded, refresh the page, and two new ones should appear, one with a record type of NS, and another with SOA. Go to the one with NS, copy down all of the url values listed, and paste them into the name servers in your domain in the registered domains in your domain info page.
    • The url to the JATOS webpage is now put on your domain instead of a bunch of numbers.

Do note that if you just put in your domain name, sometimes browsers will default it to https secured connection. But since you only have http access, those that are linked to https may not be able to connect to the site. In this case you will need to create a load balance that transfers traffic from https to http. More info can be found at this link.

Mingfeng Zhong (class of 2023)