---
# System prepended metadata

title: Puzzle edgeServer factory envirnment setup

---

# Puzzle edgeServer factory envirnment setup

> KT to : Polly Lin
> Date: -09-2022
> [Git puzzle-edge-server-factory-env URL](http://10.10.2.81:8088/puzzle/edge-server-factory-env)

### About envirnment setup: 
Using puzzle edgeServer factory envirnment setup, user can install puzzle envirnment on ubuntu operating system. Setup will install all necessory softwares. 

Setup is divided into 2 parts,
1) Platform Setup:
Platform setup part will install MongoDB, NodeJS, RabbitMQ, tftp, git, python3, openssh-server 

2) Service Setup:
Service setup part will install all services API server, Scanning service,  RT-Status Service, Network Service, config api server, Heartbeat client server.
Once all services install it will start services

After completing Platform and Service setup. MongoDB script will run to create default collections along with default data in "*dtaDB*" database.


## Steps to Install Edge Server Factory environment Setup
## Need gitlab access

1) Open Terminal


2) Go to home path using 
```
sudo su
```

3) Install git using command
```
yes | apt-get install git
```

4) Clone "master"  from edge-server-factory-env project
```
git clone http://gitlab+deploy-token-11:t-5RLs7FjyJjkN4_dEX1@10.10.2.81:8088/puzzle/edge-server-factory-env
```

Clone "testSetup_nayana" branch from edge-server-factory-env project
```
git clone –b testSetup_nayana http://gitlab+deploy-token-11:t-5RLs7FjyJjkN4_dEX1@10.10.2.81:8088/puzzle/edge-server-factory-env
```

5) Change directory to edge-server-factory-env
```
cd edge-server-factory-env
```

6)To install environment run "setup.sh" bash file
```
Sudo bash setup.sh
```
7) Factory Tool API/UI Port: 3000
8) Config Management API/UI Port: 3001

Edge Servers (Factory)

2 Servers

1. Test Edge Server - Sigle Device Configuration and Test (Just in Time)

2. BurnIn Edge Server - Multi Device Test (Long Run)



Framework and applications



1. Web Server (UI) - React Js

2. API Server  - Node Js

3. Message Server - RabbitMQ

4. Web Socket Server - RabbitMQ (Web MQTT)

5. DataBase Server - MongoDB


6. HeartBeat Server - Custom application - Python + Rest Client

7. Registry Agent - Python + RabbitMQ Client + Rest Client

8. Monitoring Agent (Collectd)- Python + RabbitMQ Client + Rest Client

9. RealTime Test Status Agent - Python + RabbitMQ Client + Rest Client 

10. Report Agent - Python + RabbitMQ Client + Rest Client

11. UI Notification Agent - RabbitMQ + WebMQTT Client + API Server



Environment :

Python 3.5 + pip3
Node JS 8.x
RabbitMQ + Erlang
MongoDB

https://docs.mongodb.com/manual/administration/
https://www.rabbitmq.com/production-checklist.html
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

https://docs.mongodb.com/manual/tutorial/reconfigure-replica-set-with-unavailable-members/
