> For the complete documentation index, see [llms.txt](https://teamtitans.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://teamtitans.gitbook.io/project/installation-instructions.md).

# Installation Instructions

**Prerequisites: Have an RDS database set up to use application.**<br>

**Create Instance Profile**

* Getting to IAM
  * Go to[ https://aws.amazon.com](https://aws.amazon.com/)
  * In top right corner, click My Account then click AWS Management Console from the drop down
  * Under Services click IAM
* Creating a Policy
* Click Policies in the sidebar
* Click Create Policy
* Click the JSON tab and replace “Statement: \[]” with the text at the following locations:
  * Under the JSON Policy link in the tab on the left
* Click Review Policy
* Name the policy mycrt
* Click Create Policy
* Creating a Role
* Click on Roles in the sidebar
* Click Create role
* Under AWS service click EC2
* Click EC2 under use case
* Click Next
* Search for the mycrt policy created in the steps above
* Click Next
* Name the role mycrt
* Click Create role

**Create Security Group**

* Under Services click EC2
* Click Security Group in the sidebar
* Click Create Security Group
* Give the security group an appropriate name
* Under Inbound rules, create and add rules that allow you to connect via SSH (port 22) for CLI tool and HTTP (port 80, 8080) for web GUI.
* Create security group

**Create EC2 Instance**

* Under services click EC2
* Click Instances in the sidebar
* Click launch instance
* (We’d recommend selecting Free tier only checkbox)
  * Step 1
    * Select Amazon Linux AMI 2017.09.1 64-bit
  * Step 2
    * Select t2.micro instance type
  * Step 3
    * Assign IAM Role now or by following instructions below
  * Step 4 & 5
    * Leave defaults
  * Step 6
    * Attach your security group or create new one here.
* Review and Launch instance

**Attach Instance Profile to Existing EC2**

* Under Services click EC2
* Click Instances in the sidebar
* Right-click the instance the program will run on and under Instance Settings click Attach/Replace IAM Role
  * You can attach an IAM role when creating the EC2 instance in Step 3
* Attach the mycrt IAM role
* Apply changes

**Attach Security Group to Existing EC2**

* Under Services click EC2
* Click Instances in the sidebar
* Right-click the instance the program will run on and under Networking click Change Security Groups
  * You can attach a security group when creating the EC2 instance in Step 3
* Attach the security group created above
* Apply changes

**Downloading the Application**

* Download the application [here](https://teamtitansaws.github.io/)
* Connect to your EC2 instance
  * Transfer local file onto your EC2 instance
    * You can use the following command
      * `> scp -i [path to EC2 key pair] [path to JAR] [ec2-user@publicDNS]:~/data/`
    * Ex.`> scp -i ~/Desktop/amazon.pem /Downloads/MyCRT-0.1.0.jar ec2-user@ec2-54-166-128-20.compute-1.amazonaws.com:~/data/`
    * \~/Desktop/amazon.pem refers to your key pairs for your EC2 instance
    * <ec2-user@ec2-54-166-128-20.compute-1.amazonaws.com> refers to your EC2 instance

**Setting Up Environment Variables On EC2**

* SSH into your EC2
* Apply Updates
  * `> sudo yum update`
* Install Java JDK
  * `> sudo yum install java-1.8.0-openjdk-devel`
  * `> JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk"`
  * `> export PATH=$JAVA_HOME/bin:$PATH`

**Using the Application**

* Run JAR
  * java -jar /jarfilelocation
* Use MyCRT
  * Open Browser
  * http\://\*Use Your EC2 IPv4 Public IP\*:8080/


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://teamtitans.gitbook.io/project/installation-instructions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
