Install Fabric.Realtime - HealthCatalyst/Fabric.Realtime GitHub Wiki

Overview

Fabric.Realtime is a service designed specifically for healthcare that enables receipt and processing of HL7 messages in real-time by down-stream applications.

Prerequisites

Ensure the following are completed before proceeding to install fabric:

  • 3 virtual machines (VMs) running Linux (preferably CentOS or RedHat). Recommended 4 cores, 8GB RAM each. The VMs should be able to connect to each other via their network.
  • The following inbound ports must be opened to the Docker swarm manager:
    1. 22 (SSH)
    2. 8080 (Mirth Web UI)
    3. 8081 (X.509 certificate server)
    4. 6661 (HL7 Listener)
    5. 5671 (RabbitMQ SSL Listener)
    6. 15672 (RabbitMQ Management Web UI)

Refer to the following guide for configuring your machines in Azure: Fabric.Realtime Setup on Azure

Planning

Prior to starting the deployment, you should determine the following:

  • DNS name for Docker Swarm Manager:
  • DNS name for Docker Worker Node #1:
  • DNS name for Docker Worker Node #2:
  • Password for RabbitMQ X.509 client certificate:
  • Password for RabbitMQ administrator (admin):
  • Password for MySql account (mirthuser):
  • Password for MySql account (root):
  • Application Insights key:

The Application Insights key should be the same instrumentation key entered during the installation of Fabric Identity.

For deployment in Azure

  • Name of storage account for Azure file share:
  • Required Azure share name: hcshared
  • Azure share access key:

Throughout this guide, the following parameters will be used to indicate where you will need to substitute with the value required for your specific configuration.

Parameter Description
<linux-admin-username> Linux administrator username
<fqdn-swarm-manager> Fully qualified domain name name for Docker swarm manager

Install Steps for Fabric.Realtime Machines

Install Docker on the Swarm Manager

The first Linux VM will be used as the Docker Swarm Manager node.

Log into the first Linux VM via SSH.

Enter the following command to install Docker:

curl -ssl https://raw.githubusercontent.com/HealthCatalyst/InstallScripts/1/installdocker.txt | sh

Log out of the VM

exit

Setup Docker Swarm on Manager Node

Log into the Swarm Manager VM via SSH again.

Once connected, the swarm setup script should begin automatically. Enter your server password to continue setup.

The script will prompt for the following :

  • Do you wish to setup docker swarm cluster now? - Enter y

  • Do you wish to make this machine the swarm master (otherwise it will join as a worker)? - Enter y to configure this machine as the swarm manager.

Copy the output of the script where it indicates To add a worker to this swarm, run the following command:. You will need this to run the output on worker nodes. For example, you should see something similar to the following:

Docker is now installed and configured on the swarm manager VM.

Configure Shared Drive on Manager Node

Log into the Docker swarm manager via SSH. If not on azure, please mount your "hcshared" file share before continuing.

For Real-time deployments in Azure, enter the following command to configure the file share:

curl -ssl https://raw.githubusercontent.com/HealthCatalyst/InstallScripts/1/docker/setupazurefileshare.txt | sh

You will be prompted for the following:

  • Please type in name of storage account(e.g., fabricshared):
  • Please type in name of share name: - Enter hcshared (The required share name is "hcshared" for version 1)
  • Please paste in access key to storage from Azure portal:

The access key can be found under your Azure storage account -> Settings -> Access keys. Click the copy button at the end of key1

Once the file share setup is complete, restart each VM in preparation for the Real-time engine install.

Create Docker Worker Nodes

The remaining VMs will be configured as Docker Worker nodes. Therefore, this must be done for each remaining VM.

Log into a Docker Swarm Worker Node via SSH.

Once connected, enter the following command to install Docker:

curl -ssl https://raw.githubusercontent.com/HealthCatalyst/InstallScripts/1/installdocker.txt | sh

Log out of the VM

exit

Log in via SSH again. Once connected, the swarm setup should begin automatically. Enter your server password to continue setup.

The script will prompt for the following:

  • Do you wish to setup docker swarm cluster now? - Enter y

  • Do you wish to make this machine the swarm master (otherwise it will join as a worker)? - Enter n to configure this machine as the swarm worker.

Enter the command given indicated after To add a worker to this swarm, run the following command: from the previous step when you configured the Docker Swarm Manager.

Docker is now installed on this worker machine.

Install Fabric.Realtime components to the Docker Swarm

SSH to docker swarm manager. Once logged in, enter the following command to deploy Fabric.Realtime:

curl -ssl https://raw.githubusercontent.com/HealthCatalyst/InstallScripts/1/realtime/installrealtimeswarm.txt | sh -s

You will be prompted for the following:

  • Please type in hostname to use for SSL certificate:
  • Please type in password to use for client certificate:
  • Please type in password to use with admin user for RabbitMq Admin UI:
  • Please type in password to use for MySql account (mirthuser):
  • Please type in password to use root MySql account:

After the deployment script completes, it will provide you with the URL where you can download the X.509 certificate used for client authentication. Please make a note of this URL so you can access it later. For example, it will be similar to the following:

If the Realtime deployment script timed-out waiting for the service to come up, the certificate URL will not be provided. You can download the X.509 certificate by navigating to: http://<fqdn-cert-host>:8081/client/fabricrabbitmquser_client_cert.p12 in your browser.

Test Fabric.Realtime Deployment

  • Access the Mirth Web UI by navigating to http://<fqdn-swarm-manager>:8080 in your browser.
  • Access RabbitMq Management Web UI by navigating to https://<fqdn-swarm-manager>:15672 in your browser.
  • Send HL7 messages to port 6661 at . To test, you can use the Tester app: https://github.com/HealthCatalyst/Fabric.Realtime.Tester.

References

Definitions

Docker Swarm is native clustering for Docker that turns a pool of Docker hosts into a single, virtual host.

A Docker Swarm Manager Node dispatches units of work to worker nodes as well as perform the orchestration and cluster management functions required to maintain the desired state of the swarm.

A Docker Swarm Worker Nodes receives and executes tasks dispatched from manager nodes.

See Swarm mode key concepts for further details.

Helpful docker commands

Command Description
docker node ls Lists nodes in the Docker Swarm
docker service rm <service> Removes a service from the Docker Swarm
docker service update <service> Updates a service in the Docker Swarm
docker service logs <service> View the logs of a given service

Install Scripts

The code for install scripts can be found at https://github.com/HealthCatalyst/InstallScripts.

⚠️ **GitHub.com Fallback** ⚠️