igia

igia

  • Documentation
  • Stay Informed
  • Community

›Microservice Platform

igia

  • Platform Overview
  • Getting Started
  • Architecture
  • How To Create An App
  • FAQ
  • Contributing
  • Licensing
  • Healthcare Disclaimer
  • HIPAA Support
  • Component List
  • Releases

    • Release-0.3.1
    • Release-0.3.2
    • Release-0.3.3
  • Known Issues
  • Acknowledgements

Sample App

  • Sample App API
  • Sample App UI

Microservice Platform

  • Microservice Gateway
  • Key Cloak (OAuth)

    • README
    • Usage
    • Introduction
  • Orchestrator

SMART on FHIR

  • Overview
  • FHIR API Example
  • FHIR API HAPI Config

    • README
    • Usage
    • Introduction

    SMART Launch App

    • README
    • Usage

Care Management

  • Overview
  • Care Management
  • Camunda Workflow Engine

Data Integration

  • Overview
  • Data Integration App
  • Data Integration Config
  • Data Integration Worker

Tools

  • igia Common Libs
  • Docs Website
  • Data Masking

I2b2 & CDI

  • Overview
  • CDI Usage

igia-platform / igia-orchestrator

Orchestrator to set up igia stack

igia-orchestrator

Orchestrator to set up igia stack

Set up using Ansible playbook

This repository contains Ansible playbook which can be used to set up igia components in local workstation. To use the playbook, Ansible needs to be installed first. Ansible provides a good installation guide.

Now, you can run the playbook with following command. deploy_dir is the directory where the playbook will download source code of applications and docker-compose files. Details of the roles used in the playbook can be found at roles' documentation page ansible-playbooks/roles/igia-deployer/README.md.

ANSIBLE_STDOUT_CALLBACK=unixy ansible-playbook ansible-playbooks/site.yml -e deploy_dir=<dir_path>

If everything goes well, you will see something like below and you will able to browse gateway and registry applications.

PLAY RECAP ************************************************************************************************************************************************************************
localhost                  : ok=6    changed=2    unreachable=0    failed=0

If you want to secure Docker engine with TLS, you can follow the documentation provided for docker-tls Ansible role.

Customizing the set up

Variables defined in ansible-playbooks/roles/igia-deployer/defaults/main.yml can be overridden by passing --extra-vars (or shorthand -e) argument when running Ansible playbook. This argument takes key=value form and it can also read variables from YAML or JSON file.

Example: Deploy the platform from master branch of components

ANSIBLE_STDOUT_CALLBACK=unixy ansible-playbook ansible-playbooks/site.yml -e deploy_dir=<dir_path> -e platform_version=master

Example: Deploy selective components

If you want to deploy only components required for care-management, create a YAML file (say, caremanagement.env.yml) with selected_optional_components specified.

selected_optional_components:
  - keycloak
  - apigtw
  - apigtw-postgresql
  - camunda
  - camunda-postgresql
  - caremanagement
  - caremanagement-postgresql

Then, pass this file's path as extra-vars argument.

ANSIBLE_STDOUT_CALLBACK=unixy ansible-playbook ansible-playbooks/site.yml -e deploy_dir=<dir_path> -e '@local.env.yml'

Example: Enabling logstash logging and zipkin tracing

You can set up infrastructure required for logging and tracing by overriding tracing_zipkin_enabled and logging_logstash_enabled variables.

 ANSIBLE_STDOUT_CALLBACK=unixy ansible-playbook ansible-playbooks/site.yml -e deploy_dir=<dir_path> \
    -e tracing_zipkin_enabled=true -e logging_logstash_enabled=true

Pre-configured Stacks

igia Orchestrator provides following pre-configured stacks:

1. igia-Platform                    -   Deploy all igia platform components
2. Integration Applications         -   Deploy Integration components
3. i2b2-cdi-ext Applications        -   Deploy i2b2 clinical data infrastructure components
4. Sample Applications              -   Deploy Sample application components
5. SMART-on-FHIR Applications       -   Deploy Smart on FHIR application components
6. Workflow Applications            -   Deploy Workflow components

Add new stack configuration

  1. Create a YAML and place under cli/stack (say, workflow.yml) with selected_optional_components specified.

    ## Optional components which are selected for workflow stack deployment
    selected_optional_components:
    - keycloak
    - apigtw
    - apigtw-postgresql
    - camunda
    - camunda-postgresql
    - caremanagement
    - caremanagement-postgresql
    - portainer
    
  2. Add a new label in the start.sh to briefly describe custom stack. This label will be visible during stack selection.

    echo "6. Workflow Applications"
    
  3. Add a case in start.sh in sequence. Sequence number should match the label sequence specified in the above step.

    6)  CUSTOM_VAR_FILE_PATH="${STACK_PATH}/workflow.yml"
            break ;;
    

Launch

You can choose pre-configured stacks or create your own. The cli/start.sh launches the pre-configured or the custom stacks.

This script will run ansible playbook to clone, build, and deploy all igia components to local docker server.

please press any key to start...

Do you need to skip one or more steps (N/y)? 

Which path to use to place or refer code (Default: ../..)? 

Deployment stack

1. igia-Platform
2. Integration Applications
3. i2b2-cdi-ext Applications
4. Sample Applications
5. SMART-on-FHIR Applications
6. Workflow Applications
7. Stack with custom config file

Choose deployment stack option (Default: 1)? 5

Add-ons

Do you want to enable logstash logging (N/y)? y
Do you want to enable zipkin tracing (N/y)? 
Do you want to enable tests execution to verify components against QA suite (N/y)? y

QA suite type

1. All
2. Karate
3. Protractor
4. Service

Choose QA suite type option (Default: 1)? 1

Running the command: ansible-playbook ./../ansible-playbooks/site.yml -e deploy_dir=../.. -e @./stack/smart-on-fhir.yml -e tracing_zipkin_enabled=false -e logging_logstash_enabled=true -e platform_components_qa_suite_execution=true -e qa_suite_type=all 

You can refer cli/stack/custom.yml to create custom deployment stack. By default, it contains all platform components.

Common ports

igia Orchestrator exposes deployed services to the ports listed below. If the port is already in use, you can override them setting corresponding environment variable.

PortDescriptionEnvironment Variable to override
5601Jhipster console for log monitoringJHIPSTER_CONSOLE_PORT
7000Portainer for Docker container managementPORTAINER_PORT
8052Integration gateway UIINTEGRATION_APP_PORT
8054Sample Application UISAMPLE_APP_PORT
8088API gateway UIAPIGTW_PORT
8091Caremanagement UICAREMANAGEMENT_PORT
8096Patient data managerPATENT_DATA_MANAGER_PORT
8761Jhipster registryJHIPSTER_REGISTRY_PORT
8888Nginx which hosts static landing pageNGINX_PORT
9080Keycloak admin interfaceKEYCLOAK_PORT
9081SMART launch applicationSMART_LAUNCH_APP_PORT
9085Camunda UICAMUNDA_PORT
9411Zipkin UIZIPKIN_PORT
12000-12100Port range for Integration workerINTEGRATION_WORKER_PORT_RANGE
8086i2b2 web applicationI2B2_WEB_HTTP_PORT

Adding a new component to igia-orchestrator

If you want to have your component to be deployed with igia-orchestrator, you will need to do following:

  1. Create a new docker-compose file inside docker-compose/local-dev directory with convention <appname>.yml. Please see Consideration with docker-compose file.

  2. If your application is Spring based application, you may want to add <appname>-<profile>.yml file inside docker-compose\local-dev\central-server-config folder for any default application configuration for your application. igia central config server (i.e. jhipster-registry) loads application configuration from this folder when igia is deployed locally.

  3. Add an entry for your component under apps section in ansible-playbooks/roles/igia-deployer/vars/main.yml. Example:

    - repo_url: https://github.com/igia/igia-keycloak.git # SCM Url
        repo_ref: master                                                # Unless there is any good reason, always use "{{ platform_version }}"
        app_name: keycloak                                              # this name must match the suffix used in docker-compose file. See #1 above.
        build_command: ./mvnw package -Pprod -DskipTests=true dockerfile:build  # Command which builds Docker image from this project.
    
  4. Also, it is a good idea to update commented block for configuration ansible variable in ansible-playbooks/roles/igia-deployer/vars/main.yml if you are using it in the playbook and you expect that variable to be overridden based on deployment scenarios. For example, when existing keycloak is used, the user should set configuration.keycloak.keycloak-url to the URL of existing KeyCloak server. Otherwise, this can be left unset.

    ## Component specific configuration
    # configuration:
    #    ....
    #    keycloak:
    #        keycloak-url: https://<ext_keycloak>
    #        ...
    
  5. Specify mandatory platform components under mandatory_components option in the ansible-playbooks/roles/igia-deployer/vars/main.yml file.

  6. Specify optional platform components under selected_optional_components option in the ansible-playbooks/roles/igia-deployer/defaults/main.yml file. If this component is part of a pre-configured or custom stack, then, it should also be added under selected_optional_components option in the corresponding cli/stack/<stack>.yml file.

Consideration with docker-compose file

  • The name of the file should follow the convention docker-compose-<appname>.yml.

  • Compose file version should match with other docker-compose files in the same directory. Currently, we are using Compose file version 3.2.

  • If there is any configuration which can differ across environments, such configuration should be specified through environment variables and default values. For example, instead of hard coding the password string, the use of a separate environment variable (which would later be interpolated) helps users to specify non-default password for KeyCloak administrator user without changing any docker-compose files.

    version: '3.2'
    services:
        keycloak:
            .....
            environment:
                - KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD:-admin}
            ...
    

License Header

New files should contain appropriate license header. You can use the following command to add license header:

./mvnw license:format

License and Copyright

MPL 2.0 w/ HD
See LICENSE file.
See HEALTHCARE DISCLAIMER file.
© Persistent Systems, Inc.

Last updated on 1/2/2020
← IntroductionOverview →
  • Set up using Ansible playbook
  • Customizing the set up
    • Example: Deploy the platform from master branch of components
    • Example: Deploy selective components
    • Example: Enabling logstash logging and zipkin tracing
  • Pre-configured Stacks
    • Add new stack configuration
    • Launch
    • Common ports
  • Adding a new component to igia-orchestrator
  • Consideration with docker-compose file
  • License Header
  • License and Copyright
igia    igia
Enabling the development, deployment, and sharing of healthcare technology.

Logo Design By GillFishmanDesign.com Cambridge, Massachusetts

Copyright © 2020
"igia" is a trademark of the igia.io project.
Documentation
Getting StartedLicenseDisclaimerFAQ
Community
Discussion ForumPlatform Users
Contact us at
More
GitHubStar