# Installation Guide

#### Database Server Setup

* Install docker version 18.\* from repository.

```
sudo apt-get update
```

```
sudo apt-get install \ apt-transport-https \ ca-certificates \
curl \
gnupg-agent \
Software-properties-common
```

<figure><img src="/files/DPcL3fPvc9VF9Y6cANx0" alt=""><figcaption></figcaption></figure>

```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```

<figure><img src="/files/hN6fQGnSa99jM3cZHhTj" alt=""><figcaption></figcaption></figure>

```
sudo apt-key fingerprint 0EBFCD88
```

```
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
```

<figure><img src="/files/DiSGY1bXqi9Sf26X2x2w" alt=""><figcaption></figcaption></figure>

* Check if the docker is installed in the machine by running the following command

```
sudo docker -v
```

* Other images needed from docker hub is : **Mongo 4.0.0**

```
docker pull mongo:4.0.0
```

<figure><img src="/files/WFZkb5a1qMzwP0IPFvta" alt=""><figcaption></figcaption></figure>

* Load and run Mongo Docker image by navigating to the download directory

```
docker run -d --name simplifyDB -p 27017:27017 -v ~/simplifyqa_db:/data/db -e MONGO_INITDB_ROOT_USERNAME=<admin-username> -e MONGO_INITDB_ROOT_PASSWORD=<admin-password> mongo:4.0.0
```

<figure><img src="/files/XFVFBX7qnJ3kkvgJmeux" alt=""><figcaption></figcaption></figure>

* Run the following command to create User in mongoDB

```
docker exec -it simplifyDB mongo -u <admin-username> -p <admin-password>
--authenticationDatabase admin --eval "db.createUser({user: '<db-username>', pwd: '<db-password>', roles:[{role:'readWrite', db: 'bolt'},{role:'dbAdmin', db: 'bolt'}]});" bolt

```

> Boltupload and mongodata will be provided in email. Unzip the Provided files.

* Verify if the docker is up and running by executing the following command

```
sudo docker ps -a
```

<figure><img src="/files/ouFSesED4WZrA0spntO6" alt=""><figcaption></figcaption></figure>

#### Application Server Setup

* Install docker v18.\* from repository and check docker version

```
sudo docker -v
```

* Other images needed from docker hub are: RabbitMQ:3-Management and Node:12

```
1.	docker pull rabbitmq:3-management
2.	docker pull node:12

```

* Download the docker image simplifyqa.tar and rabbitmq.tar file from the secure lnk using the following command

```
docker load -i <filename>.tar
```

<figure><img src="/files/obnhzsgXwlD4SDLPBLTL" alt=""><figcaption></figcaption></figure>

> Note: tar files would be provided over email.

#### Backup Server Setup

The db dump path from the file system will be configured for backup purposes.&#x20;

**App Server Configuration**

* Execute the following command to run our Application

```
docker run -d -p 4011:4011 -v /root/boltupload:/root/boltupload -v
/root/simplifyQA/projectconfig.js:/simplifyqaweb/config/projectconfig.js -v
/root/simplifyQA/logs/qaserver.log:/var/log/simplifyqa.log -v /etc/hosts:/etc/hosts simplifyqaweb

```

<figure><img src="/files/Wpnt5JIFOUMhe0EwbHeT" alt=""><figcaption></figcaption></figure>

* Run the following command to check running containers

```
docker ps
```

* Update projectconfig.js in application server with below content

```

1."dburl": "mongodb://<username>:<password>@dbserverIP:27017/bolt" 
2."dblogUrl": "mongodb://<username>:<password>@dbserverIP:27017/bolt" 
3."serverUrl": "http://serverIP:4011"
4."executionIp": "serverIP:4011", 
5."rabbitUrl":"amqp://<username>:<password>@serverIP:5671"

```

**Email Configuration**

* Update SMTP E-mail configuration in both projectconfig.js file in application project as well as simplifyRabbitMQ .

```
"email": "no-reply@companyname.com",
"mail_perpose_forgot": "Generating forgot password", 
"mail_perpose_new": "Generating new password", 
"mail_subject_new": "Welcome to company name", 
"mail_subject_forgot": "New password to login", 
"smtp_host": "SMTP hostname",
"smtp_port": SMTP Port, 
"secure":true/false, 
"mail_from":"from-email",
"simplify3x_username": "email",//for smtp authentication 
"simplify3x_password": "password"

```

<figure><img src="/files/RScTY4JP2keeCLDbF7mE" alt=""><figcaption></figcaption></figure>

**MQ Configuration**

* Eecute the below command to run RabbitMQ:3-Management Docker Image

```
docker run -d --hostname rabbitmq --name qarabbitmq -e RABBITMQ_DEFAULT_USER=<username> -e RABBITMQ_DEFAULT_PASS=<password>
-p 5671:5672 -p 15671:15672 rabbitmq:3-management
```

<figure><img src="/files/85Qubki8bWMhQKOTq97C" alt=""><figcaption></figcaption></figure>

* Execute the below command to for changes to be made in SimplifyQARabbitMQ projectonfig.js file before running the simplifyRabbitMQ Docker image

```
1."dburl": "mongodb://<username>:<password>@dbserverIP:27017/bolt" 
2."rabbitUrl":"amqp://<username>:<password>@serverIP:5671"
3. “serverUrl": "http://serverIP:4011”

```

* Execute the simplifyRabbitMQ Docker Image

```
docker run -d -v
/root/simplify-RabbitMQ/projectconfig.js:/simplifyqarabbitmq/configuration/projectc onfig.js -v
/root/simplify-RabbitMQ/logs/simplifyqarabbitmq.log:/var/log/simplifyqarabbitmq.log simplifyqarabbitmq
```

<figure><img src="/files/MvZu6GjQUuHSoesdHHQ2" alt=""><figcaption></figcaption></figure>

* Create file simplifyqarabbitmq.log within logs directory

```
mkdir logs
```

> **Note:** In this Example have mounted projectconfig.js file outside the project folder of both simplifyQA application and SimplifyQA rabbitMQ.

ssh username\@Ipaddress&#x20;

ubuntu 18.04 machine

#### Troubleshooting on-premise deployment

* Execute the below command to view the SimplifyQA app logs

```
File Location: projectfolder/logs/qaserver.logs
```

<figure><img src="/files/SJN0YMITJPmV9Ge2umwx" alt=""><figcaption></figcaption></figure>

* Execute the below command to view the SimplifyQA RabbitMQ logs

```
File Location: projectfolder/logs/simplifyqarabbitmq.log
```

<figure><img src="/files/xkpezP09l7xqUHb0mJFW" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.simplifyqa.ai/get-started-with-simplifyqa/simplifyqa-hosting/on-premise-installation-guide/installation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
