---
# System prepended metadata

title: Assignment LEIA installation

---

# Assignment LEIA installation
 - **Date: 2021/08/19**
 - Updated by : **Jan**

# Contact 
 - Uniportal : Oliver
 - LEIA : Jan / Chris

# Goal

 - [x] To install latest LEIA for QTS testing  ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
 - ETA: 2021/08/18 - 08/19 
 
# Working Steps and related acceptance criteria:

 - Install LEIA (Jan) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] install on QA machine (oliver provide RDP connection information. Including IP / username / password) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
 - UP DB connection (Jan) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] setup LEIA to connect to MS-SQL DB to read user mapping ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] Oliver to provide the DB access informaiton (including JDBC URL of the database, login ID, password) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
 - Bind Lale End Users to UP (Jan)
     - [x] Oliver: provide 3 UP users (UACT1, UACT2, UACT3) for testing purpose.(information including UP account name / password) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - Jan : To bind the 3 users (UACT1, UACT2, UACT3) to three different lale users (lqauser1, lqauser2, lqauser3) ![#f03c15](https://via.placeholder.com/15/f03c15/000000?text=+) `Failed`
     ![image](https://lab1.jankristanto.com/static/temp/failed-binding.jpg) 
     - [x] Jan : To create a lale user as the bot (lqabot1) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
 - Unit test (Jan) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] Jan to use RESTful API to send (from lqabot1) to (lqauser1, lqauser2, lqauser3) ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] lqabot1 + lqauser1 : the chatroom should be created automatically. Message should be delivered succdessfully. ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] lqabot1 + lqauser2 : the chatroom should be created automatically. Message should be delivered succdessfully. ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`
     - [x] lqabot1 + lqauser3 : the chatroom should be created automatically. Message should be delivered succdessfully. ![#00FF00](https://via.placeholder.com/15/00FF00/000000?text=+) `Done`

     <video width="320" height="240" controls>
          <source src="https://lab1.jankristanto.com/static/temp/20210819_134153.mp4" type="video/mp4">
     </video>
     
     **If Video is unavailable please click [here](https://lab1.jankristanto.com/static/temp/20210819_134153.mp4)**
     
     **Important** : Our client apps (android & PC), failed to refresh the room list. So, if the bots create a new room, it will take some time to appear in our client apps (android & matrix). 

 -  Integration Test (Oliver)
     -  In the application level, to call LEIA api to send message. (to UACT1, UACT2, UACT3)
     -  Verification : lqauser1, lqauser2, lqauser3 should receive the application level message from lqabot1 


 -  Architecture 
     ![Image](https://lab1.jankristanto.com/static/temp/leia_architecture.PNG)

     - Clients : Android, iOS, PC 
     - Lale : Lale (Java Spring Boot)
     - Matrix : Synapse v0.3 (Python 2.7 Restful)
     - PG : Postgresql
     - Sygnal : Push Server (Python 2.7 Flask, Resful)
     - Laleplus: LEIA LALE SIDE (python 3, FastAPI, Restful)
     - MQ: Message Queue (by JJ,  python?)
     - LEIA: LEIA DAU SIDE (python3, Flask, Resful)
     - AF: Agent Flow (Java)
     - MSSQL: AF Database (SQL SERVER)
     - GCM: Google Cloud Messaging  / Firebase Cloud Messaging
     - APNS: Apple Push Notification service


     * **New**: Laleplus is providing additional features/API that not available in Matrix, especially serve for LEIA/AF specs.
          * Security: 
               1. Laleplus is secured by Matrix `access_token` (python macaroon)
               2. In addition, Laleplus only can be access by special users (bot users). the bot need to be registered by Matrix ADMIN. 

                    **Currently the list of bots store in the json file. In future, the list of the bots will be stored in sqlite. Only Matrix Admin has authorization to manage the list of the bots.**