-
Notifications
You must be signed in to change notification settings - Fork 5
eHMP Install Instructions 2.0m3
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.
- If you are on CentOS, for VirtualBox to compile the native modules, update the kernel using
yum update -y
and reboot. - Install Chef-DK 0.18.30 (https://downloads.chef.io/chefdk/stable/0.18.30). OTHER VERSIONS MAY NOT WORK. (Direct link for RHEL/CentOS 7: https://packages.chef.io/files/stable/chefdk/0.18.30/el/7/chefdk-0.18.30-1.el7.x86_64.rpm).
- Install latest VirtualBox and Vagrant. Latest versions should be okay. Google around to see how to install it on CentOS/RHEL. Installation is pretty straight forward for macOS. Installing Vagrant rpm is straightforward. Follow this guide to install VirtualBox on Centos 7: https://wiki.centos.org/HowTos/Virtualization/VirtualBox. In my testing, I installed VirtualBox 5.1. Pay attention to any warnings about compiling the kernel module. You need to resolve them before moving forward. If you do not, either VirtualBox won't work; or you won't be able to generate network interfaces and the chef-client will seem like it's hanging.
- Download http://nexus.osehra.org:8081/nexus/content/repositories/filerepo/vistacore/workspace-setup/stripped-chefdk-config/0.1.0/stripped-chefdk-config-0.1.0.zip.
- Download the eHMP operational branch (https://github.com/OSEHRA-Sandbox/eHMP/archive/eHMP_2.0m3_operational_branch.zip)
- Make directory under home called "~/Projects/vistacore"
- Unzip the eHMP operational branch into ~/Projects/vistacore. Once you do that, you will need to move all the contents of the folder "eHMP-eHMP_2.0m3_operational_branch" into ~/Projects/vistacore. The folders you should have are "adk backbone-fetch-cache cds chef-repo ehmp ehmp-ui jds-filter etc...".
- Unzip the chefdk config into ~/Projects/vistacore -> will create a directory called .chef. There will be some __MACOSX folder after you unzip which you may remove if you wish.
- Replace the
knife.rb
file in~/Projects/vistacore/.chef
with one that looks like this:
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/
- Download Backbone_sessionstorage.js latest revision (4) from https://gist.github.com/davemo/3875274 into file named
~/Projects/vistacore/private_licenses/bower/backbone-sessionStorage
. - Download Highstock-4.2.5 from https://code.highcharts.com/zips/Highstock-4.2.5.zip into
~/Projects/vistacore/private_licenses/bower/
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.
- Download Java jdk-8u92-linux-x64.tar.gz from: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html. You can download the latest, but you will need to modify some scripts. Place the file in
~/Projects/vistacore/private_licenses/java
. - Download Oracle express edition from: http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html; linux.x64_11gR2_database_1of2.zip and linux.x64_11gR2_database_2of2.zip from http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html. Place all three files in
~/Projects/vistacore/private_licenses/oracle
. Make sure to unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip (You will need to move the rpm file down from the unzipped directory.)
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.
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.
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
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
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"}
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/
.
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
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.
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!! |
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!! |
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.