Running Order Hub customizations by using HTTP

If you want Order Hub to call IBM® Sterling Order Management System Software APIs by using HTTP, then the Order Hub user interface must use HTTP to load the pages.

About this task

You configure the Order Hub user interface in nginx. If you are developing customizations, then you also need to configure the customized modules. You can run both the nginx server and the Sterling Order Management System Software server either locally or on a remote server.

Procedure

  1. To call Sterling Order Management System Software APIs by using HTTP, set up the Order Hub user interface to be on an HTTP port as follows.
    1. In the environment where the nginx server is running, open the oh-setup.properties file.
    2. Set the hostname and port of the Sterling Order Management System Software server in the OMS_APPSERVER_HOST property. The URL starts with http:// since HTTP is used to call the Sterling Order Management System Software server.
    3. Run orderhub-setup.sh to configure the Order Hub user interface with the Sterling Order Management System Software server.
    4. Set up the Order Hub user interface server in the nginx configuration file to be on an HTTP port.

      This example is from /etc/nginx/nginx.conf on CentOS.

          server {
              listen       8080;
              listen       [::]:8080;
              server_name  _;
              root         /usr/share/nginx/html;
      
              # Load configuration files for the default server block.
              include /etc/nginx/default.d/*.conf;
      
              error_page 404 /404.html;
              location = /404.html {
              }
      
              error_page 500 502 503 504 /50x.html;
              location = /50x.html {
              }
              include /etc/nginx/orderhub/perf-directives.conf;
              include /etc/nginx/orderhub/security-directives.conf;
              include /etc/nginx/orderhub/locations.conf;
          }
      
  2. If you either customized existing applications or created new mono repo applications and want to run Sterling Order Management System Software customizations by using HTTP, make the following configuration updates.
    1. Open the module/app-config.json file.
    2. Add "https": false to devServerConfig.
          "name": "buc-app-order",
          "devServerConfig": {
              "port": 8300,
              "https": false,
              "contextRoot": "/buc-app-order"
          },
      

      This modification runs the custom module server on HTTP. Customized pages load from the local custom module server by using HTTP. To accept the certificate for the module in the browser, use http://localhost:port.

    3. Open the module/overrides.json file.
    4. Add "https": false to prodServerConfig. Noncustomized pages load from the nginx server by using HTTP.
    5. Set the port to the HTTP port that you set up in the nginx configuration for the Order Hub user interface server.
    6. If the Order Hub user interface is running on nginx in a remote server, set the hostName to the remote server name.
    For example,
      "prodServerConfig": {
        "hostName": "localhost",
        "deployUrl": "/buc-app-order",
        "https": false,
        "port": 8080
      }
    
  3. If you created new angular applications and want to run Sterling Order Management System Software customizations by using HTTP, when you start the server, add the --ssl false parameter.
    For example,
    yarn start --host=localhost --ssl false