Installation
  • 16 Sep 2024
  • 9 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Installation

  • Dark
    Light
  • PDF

Article summary

Installation

Upon deployment, the following guide may be used; notice that the steps outlined below may change, and the screenshots used may differ depending on the Operating System the API is being deployed on.

Earlier version

In case you have version 7.3 or earlier version of the API please refer to this installation page. In case you are installing a newer version, then this page is for you.


DBMS

The Safran API requires a database connection. The Safran API includes both Oracle and Microsoft SQL Server packages. Meaning that the neccessary client drivers are part of the Safran API. This ensures that the Safran API can connect to Oracle and Microsoft SQL Server without requiring any additional client installations on your server.

Oracle

The Safran API includes the fully managed Oracle Data Provider for .NET (ODP.NET) Core: from Oracle.

Microsoft SQL Server

The Safran API includes the fully managed .NET Data Provider for SQL Server driver from Microsoft.

Prerequisite

Before installing the Safran Software Solution, a few elements must be present.

Window Server

  1. Ensure your server is running Windows Server 2012 R2 or similar.
  2. Make sure that your server has the latest Windows updates.

Internet Information Services (IIS)

Within the Windows "Control Panel" under "Programs and Features" and "Turn Windows features on or off," the following needs to be present:

Enable Internet Information Servies (IIS):

  • Expand the Internet Infration Service node.
  • Check the box for Web Management Tools:
    • IIS Management Console: This is essential for managing your IIS server.
  • Check the box for World Wide Web Services:
    • Application Development Features: Ensure the following are checked:
      • .Net Extensibility 4.8
      • ASP.NET 4.8
      • ISAPI Extentions
      • ISAPI Filters
    • Common HTTP Features: Ensure the following are checked:
      • Default Document
      • Directory Browsing
      • HTTP Errors
      • Static Content
    • Health and Diagnostics: Ensure the following are checked:
      • HTTP Logging
      • Request Monitor
    • Performance Features: Endsure the following are checked:
      • Static Content Compression
    • Security: Ensure the following are checked:
Checkpoint

The server should now host a C:\inetpub folder with the following sub-folders:

  • custerr
  • history
  • logs
  • temp
  • wwwroot

Install the .NET Core Hosting Bundle:


Setup the Safran Solution

This document will guide the reader through the setup of Safran Solution as Safran Project ILAP Gateway API and Safran Project Integration API. Both will be referred to as "Safran Solution". This document will also describe how to verify the installation and setup.

Install the Safran Software solution

  1. Collect the Safran Solution, which is most likely delivered as a compressed zip file.
  2. On the Windows server where the Safran Solution is to be installed, open a File Explorer window.
  3. Navigate to the folder C:\inetpub\wwwroot
  4. Create a new subfolder named "SafranILAPGateway" or "SafranIntegrationAPI", depending on which system to install. Should you prefer another name, use such instead.
  5. Extract the delivered compressed zip file into the newly created subfolder.
  6. In case the zip file is blocked you need to unblock the file prior extracting.
  7. Your subfolder should look something like this:
  8. image.png

Setup Internet Information Services (IIS) Manager

  1. Open the START menu on the Window on the server where the Safran Solution will be installed.
  2. Type "iis" while the start menu is open.
  3. Internet Information Service (IIS) Manager is opened.
  4. On the left-hand side, locate the "Sites" folder and select to expand it. There may or may not be sites already added to the IIS.
  5. API Installation Setup IIS
  6. Right Mouse click the "Sites" item and select "Add Website…" from the popup menu.
  7. API Installation Add Website Menu
  8. The "Add Website" dialog opens
  9. API Installation Add Website Config
  10. The following input fields need to be configured:
    1. Port
      1. Defined the port where the Safran System is accessible. In this example, I have selected "83."
    2. IP address
      1. This is typically left as is
    3. Type
      1. Select HTTP or HTTPS; the recommendation is to use HTTPS; in this sample, I will choose HTTP. See IIS documentation for details on HTTPS.
    4. Host name
      1. This is typically left blank.
    5. Site name
      1. This is the application's name, and as a good practice, the name should also include the port number.
      2. In this sample, I added the Safran Solution: Safran ILAP Gateway, with port 83; therefore, I chose "SafranILAPGateway 83" as the name."
    6. Application pool
      1. This is typically left as is
    7. Physical path
      1. This will point to the subfolder where the compressed zip files were extracted and the Safran Solution's placement.
      2. "C:\inetpub\wwwroot\SafranILAPGateway"
    8. API Installation Add Website Filled in

Checkpoint

Within your IIS, you should be able to browse to the WebSite. When your prowser opens add "/v1/test/ to the URL. It could read something as http://localhost:83/v1/test. The result you should get is "Check was successful."


Firewall

Make sure that the server hosting the Safran solution has an open port on its firewall, which corresponds to the port defined in the IIS setup.

Using the same checkpoint as above you should be able to access the "test" from another computer, and instead of "localhost" you need to use the "IP address" of the server.

Database connection

A database connection is a crucial component that allows Safran API client software to communicate with database server software. This connection is necessary to send commands and receive responses, typically in the form of a result set.

Connection strings

A database connection string is a string of text that specifies information about a data source and how to connect to it. It includes details such as the database server’s address, the database name, user credentials, and other configuration settings. Connection strings are essential for the Safran API to establish a connection to your database.
For the Safran API the connection string is located in a file named "appsettings.json".

Sample Microsoft connection string

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;

  • Server: The address of the database server. This can be an IP address, a server name, or a network name.
  • Database: The name of the database you want to connect to.
  • User Id: The username used to authenticate with the database.
  • Password: The password associated with the user ID.
"default": "Server=SafranMSSServer;Database=SafranDatabase;User Id=SAFRANSA;Password=safran;",

Sample Oracle TNS connection string

Data Source=myServerAddress:myPort/myDatabase;User Id=myUsername;Password=myPassword;

  • myServerAddress: The address of the database server. This can be an IP address, a server name, or a network name.
  • MyPort: This is the port of the IP address used in the myServerAddress.
  • myDatabase: The name of the database you want to connect to.
  • User Id: The username used to authenticate with the database.
  • Password: The password associated with the user ID.
"default": "Data Source=SafranOraServer:1521/SafranDatabase;User Id=SAFRANSA;Password=safran;Max Pool Size=200;",


Sample Oracle TNSless connection string

See the Glossary for more explanation of TNS-Less connection.


Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myServerAddress)(PORT=myPort))(CONNECT_DATA=(SERVICE_NAME=myDatabase)));User Id=SAFRANSA;Password=safran;

  • myServerAddress: The address of the database server. This can be an IP address, a server name, or a network name.
  • MyPort: This is the port of the IP address used in the myServerAddress.
  • myDatabase: The name of the database you want to connect to.
  • User Id: The username used to authenticate with the database.
  • Password: The password associated with the user ID.
"default": "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SafranDatabase)));User Id=SAFRANSA;Password=safran;"


appsettings.json

Within the subfolder where the Safran Solution was installed. There is a file called "appsettings.json". We need to adjust this to connect to our database.

"ConnectionStrings": {
  "default": "Data Source=SafranOra:1521/SafranDatabase;User Id=SAFRANSA;Password=safran;Max Pool Size=200;",
  "default_mss": "Server=SafranDatabaseServer;Database=SafranDatabase;User Id=SAFRANSA;Password=safran;",
  "default_ora": "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=SafranDatabase)));User Id=SAFRANSA;Password=safran;"
},


Checkpoint

Within your IIS, you should be able to browse to the WebSite. When your prowser opens add "/v1/version/ to the URL. It could read something as http://localhost:83/v1/version. The result you should get is a value larger than 100 in the databaseLevel."

Setup tests

These steps guide the reader through initial tests to verify the installation and setup are working.

  1. Within the IIS, select the newly added Site.

  2. Ensure the site is running, indicated with a grey "Start" option on the right-hand side.

  3. API Installation Setup Test Start

  4. Within the IIS, select the added Site and choose "Browse" from the options on the right-hand side.

  5. API Installation Setup Test Browse

Browser site test

  1. An empty Internet Explorer window should open. It should also show the Safran Software Solutions logo.
  2. API Installation Setup Test Browse Site Test
  3. Within the address, add "index.html" and press [enter]
  4. The page should load and present content
  5. API Installation Setup Test Browse Site Test Index

Safran Solution accessibility test

  1. In the address bar, replace "index.html" with "v1/test" and enter.
    1. With "Safran ILAP Gateway", we will correctly get "400 Bad Request"
    2. With another solution, we will get a "200 Success" replay.
    3. If you get messages such as "Invalid license, " your Configuration File file may not be as it should be. Please see below for a sample file.
  2. In the address bar, replace "v1/test" with "v1/version?type=json" and enter.
    1. Regardless of Safran Solution, the user should receive the solution version details.

Safran Solution client test

This test will be conducted on a computer different from the server where the Safran solution was installed. This is to ensure firewalls are open and the Safran Solution is accessible outside the server environment.

  1. Collect the address of the IIS server, either IP or the server's name.
  2. Start an internet browser software, and within the address field, enter the server's address and add "index.html", press enter.
  3. The index page should present it selves.
  4. Within the index page, scroll to the bottom and press the check version and database connectivity. As a result, the user should receive the Safran Solutions version details.
  5. Access these URLs from the client:
    1. "/v1/project_previews/"
    2. "/v1/project_previews/?owner=safran" – where safran is a real Safran user owning projects.

Additional database test

Oracle

Access to database objects

  1. The system is accessing Oracle system tables, views and synonyms, such as 'USER_TAB_COLUMNS'. These are public by default configuration and must be accessible for the database user defined in the connection string in the "Web.Config" file.
    1. Perform accessibility test by running this SQL towards the Safran database connected as the user-defined as described above.
    2. The SQL command below should return records as a result.
    3. The system is also accessing Oracle system table, views and synonym: 'DBA_USERS',
SELECT COLUMN_NAME, DATA_TYPE FROM USER_TAB_COLUMNS WHERE upper (table_name) = 'NETWORKS';

Microsoft SQL

Access to database objects

  1. The system is accessing Microsoft system tables and views, such as 'information_schema.columns'. These are public by default configuration and must be accessible for the database user defined in the connection string in the "Web.Config" file.

    1. Perform accessibility test by running this SQL towards the Safran database connected as the user-defined as described above.
    2. The SQL command below should return records as a result.
SELECT column_name, data_type FROM information_schema.columns WHERE upper (table_name) = 'NETWORKS';

Additional configuration

This concludes the installation and configuration of the Safran Solution. See chapter Application Settings for details about the appsettings.json. It is recommended to apply security and additional configuration. See those chapters for that information.

appsettings.json file


See Configuration File for a sample content of the file.


Was this article helpful?