Your calls for Web Services (REST and SOAP) in Adeptia Connect are addressed by the respective microservices, REST API Service and SOAP API Service. These calls for Web Services are routed via a dedicated gateway, API Gateway microservice, that acts as an interface between the client and Web Service for receiving and sending requests and responses.

The Web Service that you create can be published either on the default port or a custom one that you may have configured on the API Gateway. To have custom ports available on the API Gateway, you need to first define them in the values.yaml file through an environment variable PORTS_INFO. After defining the ports, you need to expose them, and deploy the application. 

As a best practice, it is recommended that you decide upon the number of ports beforehand, and then define and expose them prior to deploying the application. Once you have deployed the application, you will have to redeploy it in case you need to add or remove a custom port from the API Gateway.

The following section guides you on how to create and configure a custom port.

  1. In the values.yaml file, use the json parameters (as shown below) as the value for the environment variable PORTS_INFO.

    {"servers":[{"port":8889},{"port":9443,"ssl":{"enabled":"true","keyStore":"d:/keystore/GatewayKeystore.jks","keyStorePassword":"changeit","keyStoreType":"JKS","trustStore":"d:/keystore/cacerts","trustStorePassword":"changeit","trustStoreType":"JKS", "clientAuth": "NONE"}}]}

    In this example, port 8889 is an unsecured port as no SSL configuration has been specified for it. Port 9443 is secure port as SSL is enabled for it. 

    The SSL configuration for the secured port is explained below.

      • d:/keystore/GatewayKeystore.jks is the keyStore path.
      • changeit is the password for keyStore and trustStore.
      • JKS is the keyStore and trustStore type.
      • d:/keystore/cacerts is the trustStore path.
      • The possible values for clientAuth key are NONE and NEED. The value NONE implies that the client authentication is not required on this port. The value NEED implies that the client authentication is required on this port. 
    If you do not provide a value to this key, the application considers it as NONE.
  2. Expose the ports by setting the following properties in apigateway section of the values.yaml file as shown in the following example. 

    • In this example, Port_For_Webservice1 represents a name that you can provide to the port that you have added.
    • You can define and expose multiple secured and unsecured ports.
  3. Run the following helm upgrade command as shown below.

    helm upgrade -i <Name of the release> <Name of the repository> -f <Path of the values.yaml file> -n <Namespace>
  • No labels