Skip to content

Basic

The documentation applies to:✅ v0.8.0

Download LET Portal

Because LET Portal is a set of services so we can't package into one installation file. You should download a latest source code in this Github repo

After downloading a source code, you MUST do exactly some steps below.

Step 1: Choose Database to install

As we mentioned, you should pick one database for installing LET Portal. LET Portal, by default, requires three databases on same database software.

  • letportal: main database, store all data which relate to LET Portal
  • letportalidentity: identity server database, store all data such as User, Role, Claims, JWT
  • letportalservices: service management database, store all data of Service Management such as Registration Service Info, Monitor Service, Log
  • letportalchat: database for chat service

Table below contains all default connections which include username/password which are using to connect your database in LET Portal CLI.

Database Connection String Username/Password DB Permission
MongoDB mongodb://localhost:27017/letportal
SQLServer Server=.;Database=letportal;User Id=sa;Password=123456; sa/123456 sysadmin
PostgreSQL Host=localhost;Port=5432;Database=letportal;Username=postgres;Password=123456 postgres/123456 Superuser or (CanLogin and Create databases)
MySQL server=localhost;uid=root;pwd=123456;database=letportal root/123456

Step 2: Change configuration files

By default, if you install the database with default username/password which we noticed above, you don't need to change any configuration. For changing a correct configuration, you should check carefully these configuration files below:

File Line Change to Note
src\web-apis\LetPortal.ServiceManagementApis\Files\PortalApis\appsettings.json 66 Your connection string
src\web-apis\LetPortal.ServiceManagementApis\appsettings.Local.json 18 Your connection string
src\web-apis\LetPortal.ServiceManagementApis\Files\Identity\v1.0\appsettings.Local.json 8 Your connection string
src\web-apis\LetPortal.ServiceManagementApis\Files\Chat\v1.0\appsettings.Local.json 14 Your connection string
src\LetPortal.Tools\tools.json 1 Your connection string Find your correct database to change. Ex: MongoDB is MongoStoringConnections section

For quick preference, this is a sample of one change in one file. The current database is MongoDB

"DatabaseOptions": {
    "ConnectionString": "mongodb://localhost:27017",
    "DataSource": "letportalidentity",
    "ConnectionType": "MongoDB"
  }
You need to change this into SQLServer

"DatabaseOptions": {
    "ConnectionString": "Server=.;Database=letportalidentity;User Id=sa;Password=123456;",
    "DataSource": "letportalidentity",
    "ConnectionType": "SQLServer"
  }
There are string list which you should change in ConnectionType field

MongoDB SQLServer PostgreSQL MySQL

tools.json

This file is used to insert a database connection into Portal database for constructing some dynamic list. You just change an appropriate connection following its database.

Step 3: Run installation script

On Windows, open your Powershell (press Win + X A), move to your source code folder then execute

.\src\web-apis\installation.ps1
sudo ./src/web-apis/installation.sh

Close Powershell window or logout ubuntu for making sure a script is effective

Step 4: Install Database with CLI

You need to run LET Portal CLI for installing database, read here.

With default connection above and MongoDB is default database

letportal portal install

letportal identity install
With SQL Server

letportal portal install -db=sqlserver
letportal identity install -db=sqlserver

With your connection

letportal portal install -c=mongodb://localhost:27017/letportal -db=mongodb