Installing Plant Applications Universal Client Using Docker

About Installing Plant Applications Universal Client Using Docker

Installing Plant Applications Universal Client using Docker installs both the process and discrete applications. You must perform this method of installation on a Linux machine.

Important:
  • Host names and server names must always be entered in lowercase.
  • IP addresses of only the IPv4 version are supported.

Components Required for Plant Applications Universal Client Installation

The following diagram provides the various components used while installing Plant Applications Universal Client:

System Requirements

Ensure that your computer meets the system requirements as described in the following table.
ItemRequirement
ProcessorAny processor with a clock speed of 3GHz or more and minimum 8-core configuration
RAM
64GB
Note: For a test environment, you can use a 32GB RAM.
Hard drive500GB
RAM allocation for Docker45GB
Operating SystemBoth the following operating systems:
  • RedHat Linux or Ubuntu 17 or later: You must use this machine to install Plant Applications Universal Client for a production environment.
  • Windows Server 2016 (with a 16GB RAM and a 100GB hard disk): You must use this machine to export the binaries that you will use to install Plant Applications Universal Client on Linux.

Software Requirements

Before you install the Docker-based installation of Universal Client, verify that the following software applications are installed on the target machine.
  • The following Docker components on the target Linux machine:
    • Docker version 18.06 (community edition)
    • Docker Compose
    • Docker images from public registries
  • Operations Hub UAA on a Windows machine.
    Note: For instructions, refer to the Operations Hub UAA Installation Guide provided along with the Operations Hub installation package.
  • Apache CouchDB 2.3.1 on a Windows machine.

Configure Docker Settings for Linux

To install Plant Applications Universal Client on Linux, you must configure the Docker settings to work with Plant Applications Universal Client.

Before You Begin

Procedure

  1. If you are running behind a proxy, perform steps 2 through 6. Otherwise, skip to step 7.
  2. Create a directory by running the following command: sudo mkdir -p /etc/systemd/system/docker.service.d
  3. Create a file named http-proxy.conf by running the following command: sudo nano /etc/systemd/system/docker.service.d/http-proxy.conf
  4. Copy the following lines of code into the http-proxy.conf file, replacing the text in the angular brackets with the appropriate values:
    [Service]
    Environment="HTTP_PROXY=<proxy URL>:<port number of the proxy server>/""NO_PROXY=localhost,127.0.0.1,<IP address>,<host name>"                    
  5. Save the file, and exit.
    Tip: To do so, press Ctrl+o, press Enter, and then press Ctrl+x.
  6. Run the following commands to verify that the proxy details that you have entered are correct:
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    systemctl show --property=Environment docker
  7. Create a file named daemon.json in the following location: /etc/docker
  8. Add the following lines of code in the daemon.json file:
    {
      "insecure-registries" : ["<IP address>:5000","<host name>:5000"]
    }
    Note: Depending on whether you will use IP address or host name while providing DTR details during installation, enter the IP address or the host name. You may enter both the details.
  9. Optional: Add your user account to the Docker group so that you do not need to type sudo for each command, by running the following command: sudo usermod -aG docker $USER
  10. Enable Docker Swarm by running the following command: docker swarm init
    Note: If you have not performed the previous step (that is, you are not a member of the Docker group), run the following command to initialize Docker Swarm: sudo docker swarm init
    A token will be generated, which you can use to add more nodes to Docker Swarm.

Results

  • The Docker settings are configured.
  • Docker Swarm is enabled.

What To Do Next

Download Docker Images.

Download Docker Images

Before You Begin

Procedure

Open the terminal on the target Linux machine, and run the following commands to download the necessary dependent Docker images:
docker pull confluentinc/cp-kafka:5.1.2
docker pull confluentinc/cp-zookeeper:5.1.2
docker pull confluentinc/cp-schema-registry:5.1.2
docker pull thomsch98/kafdrop
docker pull haproxy:1.8
docker pull eventuateio/eventuate-tram-cdc-mysql- service:0.21.3.RELEASE
docker pull hyper/docker-registry-web:latest
docker pull registry:2.4.1
docker pull governmentpaas/cf-uaac

Configure Apache CouchDB Settings

Apache CouchDB is a document storage application that stores the documents used in discrete applications. This topic describes how to configure the Apache CouchDB settings so that it works with Plant Applications.

Before You Begin

Procedure

  1. Enable the https protocol by performing the following steps:
    1. Create a folder named certs in the installation folder for Apache CouchDB.
    2. In the certs folder that you have created, place the certificate and key files that you want to use for the https protocol.
  2. Access the default.ini file located in the following folder: <installation folder for Apache CouchDB>/etc
  3. Enter values for parameters as described in the following table.
    SectionParameterDescription
    chttpdportEnter the port number that you want to use for Apache CouchDB.
    bind_addressEnter the IP address of the machine on which you have installed Apache CouchDB.
    authentication_handlersPerform the following steps to enable proxy authentication:
    1. Comment out the following line: authentication_handlers = {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
    2. Uncomment the following line: authentication_handlers = {chttpd_auth, proxy_authentication_handler}, {chttpd_auth, cookie_authentication_handler}, {chttpd_auth, default_authentication_handler}
    httpdportEnter the port number that you want to use for Apache CouchDB.
    enable_corsEnter true to enable cross-origin errors.
    corsoriginsEnter the IP address of the machine on which Plant Applications is installed.
    headersEnter the following value: content-type,if-match,x-auth-couchdb-token,x-auth-couchdb-username,x-couch-full-commit
    methodsEnter the following value: GET, POST, PUT
  4. Access the local.ini file located in the following folder: <installation folder for Apache CouchDB>/etc
  5. Enter values for parameters as described in the following table.
    SectionParameterDescription
    chttpdportEnter the port number that you want to use for Apache CouchDB.
    bind_addressEnter the IP address of the machine on which you have installed Apache CouchDB.
    sslenableEnter true to allow the usage of the https protocol.
    cert_fileEnter the file path of the certificate file in the following format: ../certs/<name of the certificate file>.crt
    key_fileEnter the file path of the key file in the following format: ../certs/<name of the key file>.key
    couch_httpd_authrequire_valid_userEnter true to prompt users to enter their user name and password to access Apache CouchDB.
    Important: You must create at least one user before you enter true for this parameter.
    httpdWWW-AuthenticateUncomment the following line: WWW-Authenticate = Basic realm="administrator"
  6. Save the local.ini and default.ini files.
  7. Restart the Apache CouchDB service.

Results

Apache CouchDB settings are now configured. You can view all the changes that you have made by accessing https://<host name or IP address of Apache CouchDB>:<port number>/_utils/.
Note: By default, the port number is 6984.

What To Do Next

  1. Create an administrative user for Apache CouchDB.
    Tip: Refer to the Apache CouchDB documentation for instructions on how to create an administrative user.
  2. Create a database named documents.
    Note: Do not change the database name to other than documents (for example, https://<host name or IP address of Apache CouchDB>:6984/documents).
    Tip: Refer to the Apache CouchDB documentation for instructions on how to create a database.

Configure Operations Hub UAA

Before You Begin

  • Install Operations Hub UAA.
    Note: For instructions, refer to the Operations Hub UAA Installation Guide provided along with the Operations Hub installation package.
  • Ensure that Docker is up and running and that Docker Swarm is enabled.

Procedure

  1. Download the following file from the customer portal: Proficy_Plant_Applications_Universal_Client_Docker_v8.0_English.zip
  2. Copy the folder Configure_Operations_Hub_UAA to the target Linux machine.
  3. Access the Linux node where you have placed the folder, and then access the following folder: UAA_Config_Scripts
  4. Access the .env file, and for the CONFIG_FOLDER_PATH parameter, update the existing path with the path of the Configure_Operations_Hub_UAA/UAA_Config_Scripts/Config folder.
  5. Navigate to the Configure_Operations_Hub_UAA \UAA_Config_Scripts\Config folder that contains the uaac_setup.sh file.
  6. Access the uaac_setup.sh file, and perform the following tasks:
    1. Replace UAASERVER with the host name or IP address of the machine on which you have installed Operations Hub UAA.
    2. Replace 8443 with the port number of Operations Hub UAA.
    3. If you want to modify the user name, password, and email ID of the user, update the corresponding values in the following line of code: uaac user add bm_operator_1 -p bm_operator_1 –emails [email protected]
      Important: You must provide this modified user name during the docker Universal Client installation. This user must be a Plant Applications administrator user.
  7. Assign the execute permission to the UAA_Config_Start_Lix.sh file.
    Tip: To assign execute permission, run the following command: chmod +x UAA_Config_Start_Lix.sh
  8. Run the UAA_Config_Start_Lix.sh file.

Results

Operations Hub UAA is now configured. You can access Operations Hub UAA from the following URL: https://<Operations Hub UAA host name>:<port_number>/uaa
Tip: To verify that Operations Hub UAA is running:
  1. Run the following command to verify that the stack (in this case, uaaconfig) is deployed: docker stack ls
  2. Run the following command to verify that the service (in this case, uaaconfig_uaac) is running: docker service ls
    A list of services that are deployed on Docker appear. In the REPLICAS column:
    • The value 1/1 indicates that the service is running.
    • the value 0/1 indicates that the service is not running. If that happens, verify after some time, or access the service log by running the following command: docker service logs <name of the service> (for example, docker service logs uaaconfig_uaac).

If you want to remove the stack, run the following command: docker stack rm <name of the stack>

What To Do Next

Verify if Operations Hub UAA is configured by logging in to Operations Hub UAA with the credentials that you have created.

Generate the Binary Files Required to Install Plant Applications Universal Client

To generate the binary files required to install Plant Applications Universal Client on the target Linux machine, you must first run the installer on a Windows machine.

Before You Begin

Note: If you want to reinstall Plant Applications Universal Client, you must first uninstall the existing version of Plant Applications Universal Client using the Control Panel.
Ensure that:
  • You are an Administrator with execute permissions.
  • Your system meets the preinstallation requirements.
  • You have the following UAA and Apache CouchDB certificates in your system.
    • uaa_server.crt
    • uaa_server.pem
    • uaa_server.key
    • couch_server.crt
    Important: It is mandatory to maintain the same certificate names.
    Tip:
    • To procure uaa_server.crt, uaa_server.pem,uaa_server.key files, perform the following steps:
      1. Navigate to the following folder on the machine on which Operations Hub UAA is installed: C:\Program Files (x86)\GE_Digital\nginx\conf\cert
      2. Copy the server.crt, server.pem, and server.key files to a folder on the Windows machine.
      3. Rename these files by adding uaa_ as the prefix (for example, server.crt to uaa_server.crt).
    • To procure couch_server.crt file, perform the following steps:
      1. Navigate to the following folder on the machine on which Apache CouchDB is installed: <Apache CouchDB installation folder>/certs
      2. Copy the certificate file to a folder on the Windows machine.
      3. Rename the file to couch_server.crt.
    • To procure the couch_server.crt file, generate a self-signed certificate or use a proprietary certificate.

Procedure

  1. Download the Proficy_Plant_Applications_Universal_Client_Docker_v8.0_English.zip file from the customer portal, extract the file to the Windows machine where you want to run the installer, and then run the Plant Applications Universal Client.exe file as an administrator.
    The installer wizard appears, displaying the Welcome to Plant Applications Universal Client screen.

  2. Select Next.
    The License Agreement screen appears.

  3. Read the license agreement, select the I agree the terms in the license agreement check box, and then select Next.
    The Install Directory and DTR screen appears.

  4. In the Installation Directory box, select the location where you want to place the binary and configuration files.
  5. Enter a value in the Server Name box as follows:
    • If you select Existing DTR, enter a value in the following format: <host name or IP address>:<port number>, where <host name or IP address> is either a fully qualified domain name or IP address of the DTR. Installer uses these existing DTR details to push and pull Docker images for Plant Applications Universal Client.
    • If you select New DTR, the local host name appears. Replace the local host name with the host name of the target Linux machine.
  6. Select Validate to validate the DTR details, and then select Next.
    The Plant Applications DB Credentials screen appears.

  7. Enter the Plant Applications database and Apache CouchDB database credentials to establish connections with the databases.
    1. In the Plant Applications DB section, enter values as described in the following table.
      CredentialDescription
      Server NameEnter the host name or IP address of the Plant Applications database.
      DatabaseEnter the name of the Plant Applications database that you want to connect with the Plant Applications Universal Client.
      InstanceEnter the instance name of the SQL server. Entering an instance is optional.
      Note: You can specify values either for Instance or Port.
      PortEnter the port number that the instance uses to listen for the client connections.
      UsernameEnter the user name of the administrator who has read-write permissions to access the database you entered in the Database box. By default, the user name appears as sa.
      PasswordEnter the password for the Administrator user you entered in the Username box.
    2. Select Validate to validate the Plant Applications database configuration.
    3. In the CouchDB tab, enter your Apache CouchDB credentials as described in the following table.
      CredentialDescription
      CouchDB Server UriEnter the fully qualified web address of the Apache CouchDB in the format: https://<host name or IP address>:<port number>
      DatabaseEnter the value documents. This is the name of the Apache CouchDB database that you want to connect with the Plant Applications Universal Client.
      NodeEnter the name of the node where Apache CouchDB is running. This is an optional field and, by default, the node value appears.
      UsernameEnter the user name of the administrator that has read-write permissions to access the database you entered in the Database box.
      PasswordEnter the password for the user you entered in the Username box.
    4. Select Import Certificates to import the Apache CouchDB server certificate (couch_server.crt) that you have generated.
  8. Select Validate to validate the Apache CouchDB database credentials, and then select Next.
    The Messaging Bridge screen appears.

  9. Enter the credentials of your RabbitMQ Administrator account for queuing the messages as described in the following table.
    CredentialDescription
    Server NameEnter the host name of the RabbitMQ server.
    UsernameEnter the username of the RabbitMQ administrator.
    PasswordEnter the RabbitMQ admininstrator password.
  10. Select Validate to validate the RabbitMQ Administrator connection configuration, and then select Next.
    The UAA Credentials screen appears.

  11. Enter the Operations Hub UAA details for authenticating the users to access the Plant Application Universal Client as described in the following table.
    CredentialDescription
    UAA Server Uri Enter the service uri of Operations Hub UAA in the following format: https://<IP address or host name of Operations Hub UAA>:<port number>/uaa
    Admin Client IDEnter the client ID of the Operations Hub UAA administrator. By default, the client ID is pauc.
    Admin Client SecretEnter the client secret of Operations Hub UAA By default, the client secret is paucsecret.
    Admin UserEnter the user name of the administrative user account created in Operations Hub UAA and configured in the Plant Applications server. By default, the user name is bm_operator_1.
    Admin Password Enter the password of the administrative user. By default, the password is bm_operator_1.
  12. Select Import Certificates and select the the UAA server certificates (uaa_server.crt, uaa_server.pem, and uaa_server.key) .
  13. Select Validate to validate the Operations Hub UAA credentials, and then select Next.
    The Plant Applications Docker screen appears, displaying all the exposed Plant Applications services that are integrated with the Universal Client. You can also modify the port numbers.

  14. Ensure that the port numbers are valid and unused in the target Linux machine, then select Validate to validate the ports, and then select Next.
    Note: Though the validation happens in the local machine, you must ensure that ports are available on the target Linux machine.
    The Universal Client screen appears, displaying the host name and port number that enable you to access Plant Applications Universal Client.

    Important: By default, local host name appears in the Server Name box. You must replace it with the host name of the target Linux machine. The host name must be in lower case.
  15. Ensure that the port number is valid and unused on the target Linux machine.
  16. If you want to generate self-signed certificates, select Generate UC Self-Signed Certificates. If you want to use existing certificates, select Existing UC SSL Certificates, and then select the certificates.
    Ensure that the names of the files are pa_uc_cert.crt, pa_uc_cert.key, and pa_uc_cert.pem.
  17. Select Validate, and then select Next.
    Note: Though the validation happens in the local machine, you must ensure that ports are available on the target Linux machine.
    The You are ready to install screen appears.

    Important: Do not select Install.
  18. Select Export to generate the binary files and configuration files required to install Plant Applications Universal Client on the target Linux machine.
    The Exported Successfully screen appears.

  19. Select Export Path to navigate to the folder in which the binary files and configuration files are available.
    The PlantApplicationsDocker folder appears, displaying the binary files and configuration files.

What To Do Next

  • Use the binary files and configuration files that you have exported to install Plant Applications Universal Client on the target Linux machine.
    Note: When you transfer files from the Windows machine to the target Linux machine using a file transfer program, ensure that all the text-based files (for example, .yml, .env, .sh, .cfg, .json, and .txt files) are converted as text files. This is to replace all the carriage returns to line feeds.

Install Plant Applications Universal Client

Before You Begin

Ensure that:

Procedure

  1. Copy the root folder (PlantApplicationsDocker) to a folder in the target Linux machine.
  2. While generating binary and configuration files, if you selected the New DTR option, perform steps 3 through 7. Otherwise, log in to the existing Docker registry, and skip to step 8.
    Note: To log in to a Docker registry, run the following command: docker login <URL of the registry>
  3. Using terminal, navigate to the pa-dtr folder.
  4. Edit the .env file, and update following parameters with the absolute path of the root folder.
    • REGISTRY_WEB_CONFIG_VOLUME_PATH
    • REGISTRY_WEB_DB_VOLUME_PATH
    • REGISTRY_CONFIG_VOLUME_PATH
  5. In the pa-dtr folder, change the permission of the PA_DTR_Start_Lix.sh file to 775.
  6. Access the PA_DTR_Start_Lix.sh file, and run the Shell script as an Administrator. This is necessary to create the Docker registry.
  7. Go to the following locations to check if the docker registry is created successfully.
    • Registry-url: http://<host name or IP address>:5000 for checking if the registry is up and running.
    • Registry-web-url: http://<host name or IP address>:8080 for checking the docker images.
  8. Using terminal, navigate to the pa-service-tars folder and run one of the following commands: docker-push-util.sh <host name or IP address of the machine on which DTR is running>:<port number>
    • For a new DTR: docker-push-util.sh <host name or IP address>:<port number>
    • For an existing DTR: docker-push-util.sh <host name or IP address>
    Note: Ensure that you have added your <host name or IP address>: <port number> to the Daemon wizard and <host name or IP address> to the Proxies wizard in the Docker Settings.
  9. Using terminal, navigate to the plantapps-web-docker folder, open the .env file.
    The FOLDER PATHS records appear.
  10. In the .env file, update following parameters with the absolute path of the root folder.
    • ERROR_LOGS_PATHS
    • CONFIG_FOLDER_PATH
    • SECRETS_FOLDER_PATH
    • ZOOKEEPER_DATA_FOLDER_PATH
    • ZOOKEEPER_LOGS_FOLDER_PATH
    • KAFKA_DATA_FOLDER_PATH
  11. In the plantapps-web-docker > mnt > paweb > config folder, in the workorder_entrypoint.sh file, replace the value highlighted in red with the absolute path of the root folder.
  12. Using terminal, navigate to the plantapps-web-docker folder, change the file permission of PA_Services_Start_Lix.sh to 775.
  13. Run the PA_Services_Start_Lix.sh file.
  14. Using terminal, navigate to the plantapps-universal-client folder, and then open the .env file.
    The records associated with the PATH and FILE keys appear.
  15. In the .env file, update following parameters as shown in the image below with the absolute path of the root folder.
    • CONFIG_FOLDER_PATH
    • DOWNTIME_APP_PROPERTIES_FILE
    • PRODUCTION_METRICS_APP_PROPERTIES_FILE
    • APPHUB_LOCALCONFIG_FILE
    • ALARM_CONFIG_FILE
    • OPERATOR_APP_PROPERTIES_FILE
    • PROPERTYDEFINITION_APP_PROPERTIES_FILE
    • NONCONFORMANCE_APP_PROPERTIES_FILE
    • SUPERVISOR_PROPERTIES_FILE
    • ROUTEAPP_PROPERTIES_FILE
    • WORKQUEUEAPP_PROPERTIES_FILE
    • SECURITY_ADMINISTRATION_APP_PROPERTIES_FILE
    • MYMACHINESAPP_PROPERTIES_FILE
    • ALARM_NOTIFICATION_APP_PROPERTIES_FILE
  16. Using terminal, navigate to the plantapps-universal-client folder, and change the permission of the PA_Apps_Start_Lix.sh file to 775.
  17. Run the PA_Apps_Start_Lix.sh file after changing the file permission to 775.

Results

The Docker-based installation of Plant Applications Universal Client is completed.
Tip: To verify that the installation is successful:
  1. Run the following command to verify that the stacks (that is, PARegistry, PAServices, and PAContainer) are deployed: docker stack ls
  2. Run the following command to verify that all the services in Plant Applications Universal Client are running: docker service ls
    A list of services that are deployed on Docker appear. In the REPLICAS column:
    • The value 1/1 indicates that the service is running.
    • the value 0/1 indicates that the service is not running. If that happens, verify after some time, or access the service log by running the following command: docker service logs <name of the service> (for example, docker service logs PAServices_assignmentservice).

If you want to remove the stack, run the following command: docker stack rm <name of the stack>

Note: Wait for a few minutes (about 20 minutes) to access the Plant Applications Universal Client.

What To Do Next

Configure Plant Applications to Enable Discrete Applications

Only if a production line is route-enabled, you can use it in discrete applications. This topic describes how to route-enable a production line and use it in the discrete applications.

Procedure

  1. To use a production line in discrete applications, route-enable each production line that you want to use by right-clicking the production line, and selecting Route enabled <name of the production line>. For more information, refer to the About Enabling a Production Line for Using a Route topic in the Plant Applications Administrator Help.
  2. To import route-enabled production lines from one Plant Applications server to another, perform the following steps:
    1. Export the production lines and related data from the source server.
    2. In the destination server, create a sample production line, and add a sample unit.
    3. Right-click the production line that you have created, and select Route enabled <name of the production line>.
    4. Import the production lines and related data to the destination server.
    5. Right-click each production line that you have imported, and then select Route enabled <name of the production line>.
      You can now use the production lines in discrete applications using the destination Plant Applications server.

Uninstall Plant Applications Universal Client

Procedure

  1. Navigate to the installation folder of Plant Applications Universal Client on the target Linux machine.
  2. Using terminal, run the following commands:
    chmod +x DockerFlush.sh
    ./DockerFlush.sh <IP address or host name of the DTR machine>:<port number>

Results

Plant Applications Universal Client is uninstalled.