The instructions in the Tangerine Readme recommend installing Tangerine on a Digital Ocean instance. This document provides instructions for installing on Amazon AWS and additionally provides instructions for testing Tangerine.
These instruction require some knowledge of AWS and Linux.
Login to AWS and Launch a new instance with Ubuntu 14.04 using a t2.medium server with 4 GiB memory.
Volume should be larger than the 8GB default. 24GB would be useful.
Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-fce3c696
Ubuntu Server 14.04 LTS (HVM), EBS General Purpose (SSD) Volume Type.
Root Device Type: ebs Virtualization type: hvm
Instance Type | ECUs | vCPUs | Memory (GiB) | Instance Storage (GB) |
---|---|---|---|---|
t2.medium | Variable | 2 | 4 | EBS only |
Storage : default (8 GiB)
Security group:
- HTTP: TCP 80 0.0.0.0/0
- SSH TCP 22 0.0.0.0/0
Once your server is created, login with your key:
ssh -i ~/.ssh/iyour_key -l ubuntu ec2-54-999-99-99.compute-1.amazonaws.com
Follow the instructions here: https://docs.docker.com/engine/installation/linux/ubuntulinux/
Commands I used in following those instructions:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo vi /etc/apt/sources.list.d/docker.list
(creates a new file)
enter the following:
deb https://apt.dockerproject.org/repo ubuntu-trusty main
sudo apt-get update
sudo apt-get purge lxc-docker
apt-cache policy docker-engine
That last command verifies you are pulling from the correct repo
Install dependencies for docker
sudo apt-get update
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get install apparmor
Now install docker
sudo apt-get update
sudo apt-get install docker-engine
sudo service docker start
(docker will already be running)
Verify that all is installed correctly:
sudo docker run hello-world
Now you are ready to install Tangerine.
Go to the Tangerine Releases page and copy the .tar.gz file of the latest release
wget https://github.com/Tangerine-Community/Tangerine/archive/0.3.0.tar.gz
tar xvf 0.3.0.tar.gz
cd Tangerine-0.3.0
cp config.defaults.sh config.sh
nano config.sh
Change T_HOST_NAME to your instance's IP address
Change T_USER1_PASSWORD and T_PASS to password of your choice.
Control O and control X to save and exit.
Login as sudo:
sudo -i
cd /home/ubuntu/Tangerine-0.3.0
enter:
./install.sh
This will download and extract the docker image from Tangerine on docker hub.
Prerequisites:
- An SSL Certificate. If you don't yet have one, we recommend using AWS's Certificate Manager (found under "Security, Identity, and Compliance").
Create and Configure an Elastic Load Balancer (ELB):
- Go to EC2, click "Load Balancers" in the left column, click "Create Load Balancer", and then select "Classic Load Balancer".
- Step 1: Define Load Balancer
- Set a Load Balancer name to what you want.
- Set "Load Balancer Protocol" on the left most column to "HTTPS".
- Set "Instance Protocol" in the third column to "HTTP".
- Click "Add".
- In the new row set "Load Balancer Protocol" to "HTTP" and "Instance Protocol" to "HTTP".
- Click "Next".
- Step 2: Assign Security Groups
- Select "Create a new security group".
- Set rules for both HTTP and HTTPS. If you only do HTTPS, anyone who goes to
http://yourdomain.com
will get an Access Denied message. Allow them to access the site with HTTP, the software will forward them to HTTPS automatically. - Click "Next".
- Step 3: Configure Security Settings
- If you have an SSL certificate, you can upload that here. Otherwise select "Choose an existing certificate from AWS Certificate Manager (ACM)".
- If you have not requested a certificate for your domain yet, you will need to click "Request a new certificate from ACM" and follow those instructions before proceeding.
- Step 4: Configure Health Check
- Ping Protocol: HTTP
- Ping Port: 80
- Ping Path: /app/tangerine/index.html
- Response Timeout: 5 seconds
- Interval: 10 seconds
- Unhealthy threshold: 10
- Healthy threshold: 2
- Step 5: Add EC2 Instances
- Select the EC2 instance running Tangerine.
- Step 6: Add Tags
- No tags are required for Tangerine.
- Step 7: Review
- If everything looks good, go ahead and create it!
- Now proceed to your Load Balancers dashboard, click on your load balancer, click on the Instances tab, and now wait for your EC2 instance to be listed as "InService".
- Configure your domain's DNS to point to this load balancer by clicking on the load balancer's Description tab and using the "DNS name" given to configure your Domain's DNS.
You should now be able to view Tangerine in your web browser by pasting the ip address of your instance.
Login using the users1 user to login
Click Groups and then Accounts to create your first Group.
Enter a name - such as test1 - and click Join group.
The application will confirm that the new group has been created.
Click the Back button (the app's, not the browser's) and you will see a list of Groups. Click your new group.
Now you may create a new Assessment by clicking "New" under the Assessments section and entering a name for the new Assessment. The new Assessment wiill be displayed in the listing. Click the widget to the left of your new Assessment name to reveal the options.
Click the fourth option to edit the Assessment.
Add Subtests in the Subtests section of the Assessment Builder:
In the following examples, we will create a widget to capture the current data and time and two common subtests.
Click Add Subtest to display the "New Subtest" page:
Choose Date and Time and enter a name and click Add
Click Add Subtest.
Choose Letter Sound Knowledge in the Grid section, enter a name, and click Add.
Click Add Subtest.
Choose Student Survey in the Survey section, enter a name, and click Add.
Now you have a list of the 3 main parts of the Assessment.
But we're not done yet!
In the Student info subtest, click the Edit button (pencil icon) and scroll to the Questions section at the bottom of the page.
Click Add Question.
Enter a prompt and variable name ("What is your name?", "student_name") and click Add
Click Done.
It will save your assessment and display an error message that the question has no options.
In the Student info subtest, click the Edit button (pencil icon) and scroll to the Questions section at the bottom of the page.
Click the Edit button (pencil icon) for the Question and choose Open.
Click Done.
Click Done.
Click Back.
Now you may run your assessment. Expand the options widget for your Assessment and click the first icon to run it. This runs the Assessment in the Tangerine client widget, which is the same code that will be used in the Android APK.
Complete the Assessment and click Save Result.
It will display the JSON for the result at the bottom of the page. If you wish to save your result to the CouchDB, click "Save result to server."
To generate an APK, click APK. The first time it runs, it will take a few minutes to process.
Once it is create, Tangerine will display the url for the created APK.
Download it and install :
adb install ~/Downloads/tangerine.apk
Once it has installed, launch the Tangerine app.
Click the sign up tab.
Enter a username/password. Any name will suffice.
Complete assessment.
To upload data to the server, on the home screen click "Universal Upload." It will confirm if the data has been upload successfully.
Return to your browser instance of Tangerine. Click Results. View your data.
Go back to Home and click the widget to expand the options for your Assessment. Click the third icon for results.
Click the CSV button. This will download a spreadsheet with the results.