Skip to content

eHMP Install Instructions 2.0m3

Sam Habiel edited this page Jan 10, 2018 · 1 revision

Install Instructions

You must do this either on Linux or MacOS. Do not use Windows! Known to work on macOS El-Capitain, Centos 6.9 and Centos 7.3. Does not work on Fedora due to its use of dnf instead of yum which Chef doesn't support yet.

Preparatory Steps

current_dir = File.dirname(__FILE__)
log_level                :info
log_location             STDOUT
node_name                "deploy"
client_key               "#{current_dir}/deploy.pem"
ssl_verify_mode          :verify_none 
cache_type               'BasicFile'
cache_options( :path => "#{ENV['HOME']}/chef-repo/.chef/checksums" )
local_mode               true
cookbook_path           [
  "#{ENV["HOME"]}/Projects/vistacore/chef-repo/project_cookbooks",
  "#{ENV["HOME"]}/Projects/vistacore/chef-repo/wrapper_cookbooks",
  "#{ENV["HOME"]}/Projects/vistacore/chef-repo/third_party_cookbooks",
  "#{ENV["HOME"]}/Projects/vistacore/chef-repo/machine_cookbooks"
]

We need to get the proprietary components that can't be distributed with eHMP. You will place all of them into ~/Projects/vistacore/private_licenses/

For the following three steps, you will need an Oracle account. In future versions, we will try to make sure that we have no proprietary components here.

Your private_licenses folder should look like this:

private_licenses
├── bower
│   ├── backbone-sessionStorage
│   └── Highstock-4.2.5.zip
├── java
│   └── jdk-8u92-linux-x64.tar.gz
└── oracle
    ├── linux.x64_11gR2_database_1of2.zip
    ├── linux.x64_11gR2_database_2of2.zip
    ├── oracle-xe-11.2.0-1.0.x86_64.rpm
    └── oracle-xe-11.2.0-1.0.x86_64.rpm.zip
  • Create the /opt/private_licenses symlink
sudo ln -s ~/Projects/vistacore/private_licenses /opt/private_licenses
  • On CentOS/RHEL: sudo yum install -y gcc ruby-devel zlib-devel for the ruby nokogiri gem.
  • cd into ~/Projects/vistacore
  • Run sudo chef-client -o workstation --config ~/Projects/vistacore/.chef/knife.rb. On RHEL/CentOS, this will fail initially because sudo does not export $HOME by default, which you need it to do. Fix that by following this link: http://laviefrugale.blogspot.com/2012/10/sudo-s-on-rhel-6-doesn-preserve-home.html.

Deploying each VM

There are eight (8) VMs to be deployed:

  • vista-kodak
  • vista-panorama
  • JDS
  • mocks/SOLR
  • vxsync
  • jbpm
  • rdk
  • ehmp-ui

The VMs need to be deployed in four phases. Each phase needs to be done in a new terminal.

Phase 0

Due to this bug: https://github.com/chef/chef-provisioning-vagrant/issues/39, you will need to run this command first:

cd ~/Projects/vistacore/ehmp/product
source ../infrastructure/set.env.sh
vagrant box add --name 'opscode-centos-6.5' http://nexus.osehra.org:8081/nexus/content/repositories/filerepo/third-party/program/opscode/centos/6.5/centos-6.5-provisionerless.box

On CentOS/RHEL, the first sudo chef-client command locks up some scripts as root. You need to remove them

sudo rm -r ../../.chef/local-mode-cache

For the same reason, do this:

sudo chown -R $USER:$USER ~/.npm
sudo chown -R $USER:$USER ~/.gem
sudo chown -R $USER:$USER ~/Projects/vistacore/chef-repo/nodes

There is a tiny problem with the repo: I can't seem to be able to commit chef-rewind. So here's how to get it:

cd ~/Projects/vistacore/chef-repo/third_party_cookbooks/chef-rewind/
git clone https://github.com/thommay/chef-rewind .
chef gem build chef-rewind.gemspec

Phase 1

The first two gradle commands may fail with iptables-restore: unable to initialize table 'nat'. If that happens, you need to start over by destroying the machine using gradle destroyKodak or gradle destroyPanorama and redeploy it. It's really annoying, yes, as these are the two longest deployments.

cd ~/Projects/vistacore/ehmp/product
source ../infrastructure/set.env.sh
gradle deployKodakDev
gradle deployPanoramaDev
gradle deployJDSDev
gradle deployMocksDev
cd production/vx-sync
npm install ~/Projects/vistacore/job-framework
npm install ~/Projects/vistacore/solr-smart-client
npm install ~/Projects/vistacore/vista-js
cd ../..
gradle deployVXSyncDev

Phase 2

cd ~/Projects/vistacore/rdk/product
source ../infrastructure/set.env.sh
cd production/rdk
npm install ~/Projects/vistacore/job-framework
npm install ~/Projects/vistacore/solr-smart-client
npm install ~/Projects/vistacore/vista-js
npm install ~/Projects/vistacore/jds-filter
cd ../..
gradle deployRdkDev
gradle deployjbpmdev

Sanity check:

curl http://172.16.4.105:8888/resource/resourcedirectory
{"data":{"link":[{"title":"resource-directory","href":"/resource/resourcedirectory","rel":"vha.read"},{"title":"healthcheck-healthy","href":"/resource/healthcheck/healthy","rel":"vha.read"},{"title":"healthcheck-detail-html","href":"/resource/healthcheck/detail/html","rel":"vha.read"},{"title":"healthcheck-checks","href":"/resource/healthcheck/checks","rel":"vha.read"}

Phase 3

We have a Catch-22 problem. eHMP uses node 0.10--which is so old. Some of the dependencies it uses only work on node 6 (judging by ECMAScript 6 inside of them). So you will have to switch back and forth between node versions. That's why we use nvm.

If your workstation machine is CentOS/RHEL, you need to change GEM_HOME in set.env.sh to use .gems not .aidk_gems. If you don't do that, you will find that gradle can't find compass.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
# (open new terminal)
cd ~/Projects/vistacore/adk/product
source ../infrastructure/set.env.sh
nvm install 6
nvm use 6
gradle build
nvm use system

Another problem which is far harder to fix: gradle build is supposed to generate two files called vendor.css and adk.css. It turns out that compass on certain platforms (in my case CentOS 7) segfaults. You can verify this for yourself to see if it happens to you:

cd ~/Projects/vistacore/adk/product/production
grunt compass

You are supposed to see about 5 lines showing the generated files. Instead, you may see a big memory dump. If this happens to you, you need to grab vendor.css and adk.css from somewhere else. A suggested location: https://ehmp-ui.usgovvirginia.cloudapp.usgovcloudapi.net/_assets/css/vendor.css and https://ehmp-ui.usgovvirginia.cloudapp.usgovcloudapi.net/_assets/css/adk.css. Place them in ~/Projects/vistacore/adk/product/production/_assets/css/.

Phase 4

If your workstation machine is CentOS/RHEL, you need to change GEM_HOME in set.env.sh to use .gems not .aidk_gems. If you don't do that, you will find that gradle can't find compass.

Theoretically, you should be done after gradle deployehmp-uilocaldev, but the crypto libraries in the generated machine are outdated--it turns out that Google Chrome/Chromium can't connect. To fix that you need to login to that specific machine and update the Netscape Security Libraries (now maintained by Mozilla) using yum.

cd ~/Projects/vistacore/ehmp-ui/product
source ../infrastructure/set.env.sh
nvm use 6
gradle build
nvm use system
gradle deployehmp-uilocaldev
cd ../../.chef/vms
vagrant ssh ehmp-ui-sam-master
sudo yum update -y nss*
sudo service httpd reload

Finish

https://172.16.1.150/ will be the eHMP deployment location where you can log-in. Firefox doesn't display the backdrop image; only Chrome does. Chrome may initially fail to connect because of TLS issues... you will need to log-into the ehmp-ui machine and yum upgrade. Use any of the published users below to log-in.

List of Users

Proxy Users

The single user below is how the eHMP GUI talks to VistA. It uses the proxy user to impersonate other users inside of the system. The Proxy User concept came from KAJEE, and didn't originate with eHMP.

User Name Access Code Verify Code
PROXY,EHMP EP1234 EP1234!!

Published Users

The following users have been tested to run on VistA instance. Most of them work on eHMP as well.

User Name Access Code Verify Code
XIU,MARGARET MX1234 MX1234!!
DAY,MICHAEL MD1234 MD1234!!
KEELEY,TRACY TK1234 TK1234!!
KHAN,VIHAAN VK1234 VK1234!!
USER,PANORAMA PU1234 PU1234!!
PCMM,FOUR PUT1234 PUT1234!!
PROVIDER,EIGHT PR12345 PR12345!!
VEHU,TEN 10VEHU VEHU10
PHARMACIST,EIGHT PHA1234 PHA1234!!
TDNURSE,ONE 1TDNURSE TDNURSE1
USER,FMQL QLFM1234 QLFM1234!!

Troubleshooting

There WILL be many changes probably required for you to fully build this. Here are some tips:

If you installed the latest version of softwares (Java, Gradle, etc.), you may need to adjust the set.env.sh files to point to the correct instances.

If you fail to deploy a machine, destroy it by running gradle destroy{machine name w/o dev}. So reversing gradle deployjbpmdev is done via gradle destroyjbpm.

To log into the created VMs,

cd ~/Projects/vistacore/.chef/vms
vagrant ssh {machine name in this directory without .vm extension}

If everything built, to check that all subsystems are working, go to https://172.16.1.150/resource/healthcheck/detail/html.