Operating System
- For Edge computers, install the x64 version of Windows 10 Pro (20H2 or higher) and run Windows Update. For bare metal for virtualized servers, install Windows Server 2016 or later and run Windows Update.
- Launch File Explorer and create a folder named c:\moab_api.
- Create a firewall rule to open inbound ports 80 and 443
Database
- Navigate to https://www.enterprisedb.com/downloads/postgres-postgresql-downloads and then download and install the Windows x86-64 version of PostgreSQL 13.1 or higher.
- During the default installation, you’ll be asked to enter a password, so enter P@ssw0rd or another password you prefer.
- Uncheck the Stack Builder launcher on the final dialog box of the installation and click Finish.
- Launch pgAdmin 4 and you’ll be asked to enter a master password, so enter P@ssw0rd or another password you prefer.
- Set the default database password to P@ssw0rd. This password can be changed later along with the corresponding password the Moab Platform uses to access the database via the appsettings.json file.
- In the Browser pane of the pgAdmin tool, expand the Servers tree view, right-click on Databases and create a new empty database called moabdb3.
- Download the database backup file that ends in .sql locally.
- Right-click on the moabdb3 icon and select Restore…
- In the Restore dialog, click the ellipsis to the right of Filename text box to open the Select file dialog. Click the Format combo box and select sql.
- Navigate to backup database file.
- In the Role name combo box select postgres then click Restore.
- Within the moabdb3 database, expand Schemas and Tables to verify the expected tables are all there.
Application Server
- Install Internet Information Services (IIS) 10.
- From the Start menu, click Settings.
- In the Settings dialog, click Apps.
- In the Apps & features dialog, click Programs and Features.
- In the Programs and Features dialog, click Turn on Windows Features on or off.
- Check Internet Information Services and click the + sign next to it to expand the tree view.
- Click the + sign next to World Wide Web Services to expand the tree view.
- Click the + sign next to Application Development Features to expand the tree view.
- Check WebSocket Protocol.
- Click the + sign next to Security to expand the tree view.
- Check IP Security and then click OK to close the Windows Features dialog and begin the installation process.
- Click Close when the installation is complete.
- Launch a browser, type localhost and press Enter to test to see if the Internet Information Services home page appears.
- Configure Internet Information Services
- Download and install the ASP.NET Core Runtime 5.0.1 Hosting Bundle from https://download.visualstudio.microsoft.com/download/pr/b6271a4b-db02-4245-bf99-974ea96b7ca3/29389344a55c6792bd4e717a254168a2/dotnet-hosting-5.0.1-win.exe
- Restart IIS via Command Prompt (run as Administrator). Type:
- net stop was /y
- net start w3svc
- From the Start menu select Windows Administrative Tools, Internet Information Services (IIS) Manager.
- From the Connections pane, expand the server node, right-click on the Sites folder, and select Add Website.
- In the Add Website dialog, enter moab as the Site name, enter c:\moab_api as the Physical Path, provide the binding configuration (80, 8080, 443, etc.), and click OK.
- Secure the Application
- Install TLS certificate on IIS
- To limit Internet Domains, IP addresses, and IP address ranges that can access Moab, configure IP Address and Domain Restrictions from within the IIS Manager.
Application
- Deploy
- Download the Moab deployment zip file and extract the contents found inside to c:\moab_api.
- Find a file named appsettings.json within the deployment files and open it with Notepad.
- In the ConnectionStrings section, ensure DefaultConnection reflects the proper database host location and password.
- Test
- Test the installation locally with a web browser by navigating to http://localhost:8080/weatherforecast where a result of JSON weather data should be displayed on your browser screen.
- Since Moab follows the OpenAPI standard, navigate to http://localhost:8080/swagger/index.html to view available REST APIs, URIs, parameter names, data types, and sample request formats.
- Test the same URLs from above using https to ensure TLS encryption is working properly.
- To verify the APIs are communicating with the database, navigate to http://localhost:8080/swagger/index.html and scroll down till you see Organization. Click Post and then the Try it out button. Using the default JSON values in the Request Body, click the Execute button. If all goes well, the Response Body will display a status of success and your retrieve your unique identity and security token.