archi commit

parent 661928c9
# Deployment of informatZen Services # Deployment of neymar Services
Follwoing figure discussed the architecture of the informatZen platfrom. Follwoing figure discussed the architecture of the neymar platfrom.
![Alt text](informatzen-architecture.png?raw=true "informatZen platfrom architecture") ![Alt text](neymar-architecture.png?raw=true "neymar platfrom architecture")
## Services ## Services
...@@ -14,21 +14,6 @@ There are three main servies; ...@@ -14,21 +14,6 @@ There are three main servies;
3. gateway 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 ## Deploy services
Start services in following order; Start services in following order;
...@@ -48,21 +33,19 @@ gateway service will start a REST api on `7654` port. For an example if your mac ...@@ -48,21 +33,19 @@ gateway service will start a REST api on `7654` port. For an example if your mac
** Open `7654` and `4300` port on VM for public ** Open `7654` and `4300` port on VM for public
#### 1. put Vaccine #### 1. put Doctor
``` ```
# request # request
curl -XPOST "http://localhost:7654/api/vaccines" \ curl -XPOST "http://localhost:7654/api/doctor" \
--header "Content-Type: application/json" \ --header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \ --header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data ' --data '
{ {
"id": "111110", "id": "111110",
"execer": "admin:admin", "doctorname": "saman ",
"messageType": "addVaccine", "mobilenumber": "0775786652",
"userMobile": "0715422017", "email": "saman@gmail.com",
"userName": "test user",
"vaccineStatus": "done"
} }
' '
...@@ -71,22 +54,21 @@ curl -XPOST "http://localhost:7654/api/vaccines" \ ...@@ -71,22 +54,21 @@ curl -XPOST "http://localhost:7654/api/vaccines" \
``` ```
#### 2. get Vaccine #### 2. get Doctor
``` ```
# request # request
curl -XPOST "http://localhost:7654/api/vaccines" \ curl -XPOST "http://localhost:7654/api/doctor" \
--header "Content-Type: application/json" \ --header "Content-Type: application/json" \
--header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \ --header "Bearer: eyJkaWdzaWciOiJORWpYZnIwQjJMZG4ySGxPb2t5blp0dkNzSFVqMGFoVTVZd1F5TmJSVCtOYjlwTnBXcEsvUi9UbDZpanhPVVJiVlJHc2NHaFIrcWVCbkZhK09YYjBmMGlacVh0WHBDVXV6bnJOcTFKRmpGZC8zSU80L1o4SXl3WG1EdWFGcUg5Njc5VE9neVRkcU1nT01VeWNNWTF0bmtIUStWVUtUN0JTV0NWMEM3ZmNXbEE9IiwiaWQiOiJlcmFuZ2FlYkBnbWFpbC5jb20iLCJpc3N1ZVRpbWUiOjE1NTg0ODk4ODksInJvbGVzIjoiIiwidHRsIjo2MH0=" \
--data ' --data '
{ {
"id": "1111xx", "id": "1111xx",
"execer": "admin:admin", "doctorname": "saman",
"messageType": "getVaccine", "mobilenumber": "0775786652",
"userMobile": "0715422017", "email": "saman@gmail.com",
} }
' '
# reply
{"userMobile":"0775321290","userName":"test user","vaccineStatus": "done", "timestamp":"2021-07-12 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