IRIS Mirror in the cloud (AWS)
I have been working on redesigning a Health Connect production which runs on a mirrored instance of Healthshare 2019. We were told to take advantage of containers. We got to work on IRIS 2020.1 and split the database part from the Interoperability part. We had the IRIS mirror running on EC2 instances and used containers to run IRIS interoperability application. Eventually we decided to run the data tier in containers as well. Later we switched from using EC2 instances to Fargate “server-less” compute. A challenge was that each time AWS Elastic Container Service started a new container, it assigned it a new IP address. IRIS mirror does not like changing IP addresses.
When I began to set up IRIS mirror in the cloud I found iris-mirror-with-docker application on Open Exchange: https://openexchange.intersystems.com/package/iris-mirror-with-docker
I prepare two persistent volumes – in my case on Elastic File System – for my two dataserver containers to use. I encountered permission errors, when I tried to create new directories on Elastic File System for container volumes unless the container runs as root. I want to look at file permissions so that I can avoid having containers run as root.
InterSystems told me I did not need to use a load balancer for my data tier. It would cost more for a load balancer. Mirrored database traffic is automatically routed to the primary.
When I start two containers, I use a startup script to choose which volume to use for each container. In this process I write two files to EFS which shows the container’s ip address for each volume. In IRIS I use ZSTU routine to read these files and update Mirror member ip addresses to enable communication between mirror members.
I like to organize my volumes as follows. I refer to the top-level directory as “voldata”. I create two subdirectories inside “voldata”, “iconfig” and “irisdb”. “iconfig” is the ISC_DATA_DIRECTORY, which contains the “mgr” folder. “irisdb” contains a subfolder for each database that contains IRIS.DAT.
For IRISMIRROR I created two volumes, “failover1” and “failover2”. Inside “failover1” and “failover2” I have “voldata” with subfolders described above.
For my data server image I have database to be mirrored defined as /voldata/irisdb/DATANAME. When a container starts and it claimed “failover1” or “failover2” volume, I need to update the database using CPF_MERGE.
I created a copy of iris-mirror-with-docker and cloned the repo:
Git clone https://github.com/oliverwilms/iris-mirror.git
I tried docker-compose up -d
I got an error trying to pull arbiter image. I updated the images references. I also did chmod 755 session.sh and init_mirror.sh as well as chmod 644 Installer.cls.
Still getting more errors. Going to try something different next …
I loaded ZSTU.mac, ZMIRROR.int and ZMIRRORHLPR.int, and I still got the same error. I realized that I got errors because I did not have license key file in the right place where it was declared in docker-compose file. Mirroring does not work without a proper license. After I copied my license key, it works better. More updates to come ...
My next project is to mirror my Message Bank.
To be continued ...