This documentation is for WSO2 IoT Server 3.0.0. View the documentation for the latest release.
Due to a known issue do not use JDK1.8.0_151 with WSO2 products. Use JDK 1.8.0_144 until JDK 1.8.0_162-ea is released.
Configuring WSO2 IoT Server with the IP or Hostname - IoT Server 3.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

WSO2 IoT Server is configured via localhost as the product has SSO enabled by default. When in a production environment or if you wish to make WSO2 IoT Server IP based instead of localhost, you need to configure it accordingly. Let's take a look at the steps you need to follow to configure WSO2 IoT Server with the IP:

Before you begin

You need to open the ports listed under Required Ports for WSO2 IoT Server for WSO2 IoT Server to connect to Google Cloud Messaging (GCM)/Firebase Cloud Messaging (FCM) and Apple Push Notification Service (APNS), and enroll devices.

  1. Open the <IoT_HOME>/conf/carbon.xml file 

    1. If you configuring WSO2 IoT Server with the IP, comment out the <HostName> and <MgtHostName> attributes.

    2. If you are configuring WSO2 IoT Server with the hostname, define the hostname as the value for the <HostName> and <MgtHostName> attributes.

  2. Open the <IOTS_HOME>/core/bin/ file and configure the following properties by replacing localhost with the  <IoT_SERVER_IP/HOSTNAME>."<IoT_SERVER_IP/HOSTNAME>" \"<IoT_SERVER_IP/HOSTNAME>" \"<IoT_SERVER_IP/HOSTNAME>" \
  3. Open the <IOTS_HOME>/core/repository/conf/identity/sso-idp-config.xml file, and find and replace localhost with the <IoT_SERVER_IP/HOSTNAME>.
  4. Open the <IOTS_HOME>/core/repository/conf/app-manager.xml  file, and configure the <IdentityProviderUrl> attribute that is under <SSOConfiguration> by replacing localhost with the IoT Server IP.

    <!-- URL of the IDP use for SSO -->
  5. Open the <IOTS_HOME>/core/repository/conf/etc/webapp-publisher-config.xml file, and set true as the value for <EnabledUpdateApi>.

    <!-- If it is true, the APIs of this instance will be updated when the webapps are redeployed -->

    If you have not started WSO2 IoT Server previously, you don't need this configuration. When the server starts for the first time it will update the APIs and web apps with the new server IP.

    Make sure to configure this property back to false if you need to restart the server again after the configuring the IP.

    By enabling the update API property you will be updating the APIs and the respective web apps with the server IP when the server restarts. This takes some time, therefore, if you need to restart the server many times after this configuration or when in a production environment, you need to revert back to the default setting.

  6. Open the <IOTS_HOME> /core /repository/deployment/server/jaggeryapps/devicemgt/app/conf/app-conf.json file, and configure the following attributes:
    • identityProviderUrl: Replace with the IoT Server IP or hostname and port, which is 9443.

      "identityProviderUrl" : "https://<IoT_SERVER_IP/HOSTNAME>:9443/samlsso",
    • acs: Replace with the IoT Server IP or hostname and port, which is 9443.

      "acs": "https://<IoT_SERVER_IP/HOSTNAME>:9443/devicemgt/uuf/sso/acs",
  7. Open the <IOTS_HOME>/core/repository/deployment/server/jaggeryapps/api-store/site/conf/site.json file, and configure the identityProviderUrl attribute by replacing localhost with the IoT Server IP or hostname.

    "identityProviderURL" : "https://<IoT_SERVER_IP/HOSTNAME>:9443/samlsso",
  8. Open the <IOTS_HOME>/analytics/repository/deployment/server/jaggeryapps/portal/configs/designer.json file, and configure the identityProviderUrlacs and host attributes by replacing localhost with the IoT Server IP or hostname and the respective profiles port.

    "identityProviderURL": "https://<IoT_SERVER_IP>:9443/samlsso",
    "acs": "https://<IoT_SERVER_IP/HOSTNAME>:9445/portal/acs",

    The default port of the WSO2 IoT Server profiles are as follows:

    WSO2 IoT Server core profile9443
    WSO2 IoT Server analytics profile9445
    WSO2 IoT Server broker profile9446

    Therefore, the analytics portal needs to be assigned the 9445 port.

  9. Run the following commands so that the self-signed certificate refers to the IP you just configured instead of localhost.

    This step is required if your devices are accessing WSO2 IoT Server from outside the server.

    keytool -genkey -alias <IoT_SERVER_IP> -keyalg RSA -keysize 1024 -keypass wso2carbon -keystore wso2carbon.jks -storepass wso2carbon
    keytool -list -v -keystore wso2carbon.jks -storepass wso2carbon
    keytool -export -alias <IoT_SERVER_IP> -keystore wso2carbon.jks -storepass wso2carbon -file MYcert.pem
    keytool -import -alias <IoT_SERVER_IP> -file MYcert.pem -keystore client-truststore.jks -storepass wso2carbon
  10. Once you are done with the above steps, restart or start the message broker, IoT Server core, and the analytics profiles in the given order. For more information, see Starting the Server.

  • No labels