Commit 8e08a361 authored by hitmalith's avatar hitmalith

final commit

parent 1ec04448
# Deployment of informatZen Services
# Deployment of toyota Services
Follwoing figure discussed the architecture of the informatZen platfrom.
Follwoing figure discussed the architecture of the toyota platfrom.
![Alt text](informatzen-architecture.png?raw=true "informatZen platfrom architecture")
![Alt text](toyota-architecture.png?raw=true "toyota platfrom architecture")
## Services
......@@ -13,22 +13,6 @@ There are three main servies;
2. aplos
3. gateway
```
## Configuration
Change `host.docker.local` field in `.env` file to local machines ip. also its possible to add a host entry to `/etc/hosts` file by overriding `host.docker.local` with local machines ip. following is an example of `/etc/hosts` file.
```
10.4.1.104 host.docker.local
```
Give write permission to `/private/var/services/connect/elassandra` directory in the server. following is the way to give the permission,
```
sudo mkdir /private/var/services/connect/elassandra
sudo chmod -R 777 /private
```
## Deploy services
Start services in following order;
......@@ -39,16 +23,10 @@ docker-compose up -d aplos
docker-compose up -d gateway
docker-compose up -d web
```
** After hosting website, it can be reached on `<Ip address of the Vm>:4300`.
## Connect apis
gateway service will start a REST api on `7654` port. For an example if your machines ip is `10.4.1.104` the apis can be access via `10.4.1.104:7654/api/<apiname>`.Following are the available rest api end points and their specifications,
** Open `7654` and `4300` port on VM for public
** After hosting website, it can be reached on `<Ip address of the Vm>:4400`.
** Open `7654` and `4400` port on VM for public
#### 1. put Vaccine
#### 1. put Player
```
# request
......@@ -57,21 +35,21 @@ curl -XPOST "http://localhost:7654/api/vaccines" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"id": "111110",
"id": "01",
"execer": "admin:admin",
"messageType": "addVaccine",
"userMobile": "0715422017",
"userName": "test user",
"vaccineStatus": "done"
"messageType": "addPlayer",
"playerMobile": "0715422017",
"playerName": "test user",
"playerStatus": "done"
}
'
# reply
{"code":201,"msg":"vaccine added"}
{"code":201,"msg":"player added"}
```
#### 2. get Vaccine
#### 2. get Player
```
# request
......@@ -80,13 +58,13 @@ curl -XPOST "http://localhost:7654/api/vaccines" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data '
{
"id": "1111xx",
"id": "01",
"execer": "admin:admin",
"messageType": "getVaccine",
"userMobile": "0715422017",
"messageType": "getPlayer",
"playerMobile": "0715422017",
}
'
# reply
{"userMobile":"0775321290","userName":"test user","vaccineStatus": "done", "timestamp":"2021-07-12 20:55:21.308"}
{"playerMobile":"0775321290","playerName":"test user","playerStatus": "done", "timestamp":"2021-11-07 20:55:21.308"}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment