Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
4675 commits
Select commit Hold shift + click to select a range
21ef088
refs #37014 #36991 #37002 #37012 #36990 #36996 Adding new termiantion…
saimekala07 Nov 8, 2018
0e094f0
refs #37014 #36991 #37002 #37012 #36990 #36996 Updating employer plan…
saimekala07 Nov 8, 2018
283d86d
refs #37014 #36991 #37002 #37012 #36990 #36996 Don't store trading pa…
saimekala07 Nov 8, 2018
b36942a
refs #37014 #36991 #37002 #37012 #36990 #36996 handling bogus plan ye…
saimekala07 Nov 8, 2018
d780f7f
refs #37014 #36991 #37002 #37012 #36990 #36996 updating empoyer event…
saimekala07 Nov 8, 2018
d9ea37d
Refs #37549. Bump gem version.
Nov 8, 2018
0f731ef
Merge 'bug-37549' for functional testing.
Nov 8, 2018
a878492
Merge branch 'feature-31347' into ma-ftest-5.1
Nov 8, 2018
c8d9f5c
Merge branch 'use_case_31432' into ma-ftest-5.1
Nov 8, 2018
693f6b1
Merge remote-tracking branch 'origin/support_36892'
harshared Nov 9, 2018
9b4e9ad
37692: changed the event name from audit to change_member_communicati…
nks2109 Nov 14, 2018
22bfd68
Merge 'user_case_37692' for testing.
Nov 14, 2018
9586185
Refs #37692. Fix affected_members.
Nov 15, 2018
03a35fd
Merge 'user_case_37692' for testing.
Nov 15, 2018
07abf5b
Refs #37729. Fix header message.
Nov 15, 2018
3791338
Merge 'use-case-37729' for testing.
Nov 15, 2018
99923f5
Merge branch 'master' into plan_year_state_change
matt--williams Nov 24, 2018
5356279
Bump gem to corrected version for ALTUS.
Nov 27, 2018
d0b3d36
Merge remote-tracking branch 'origin/user-story-37392'
harshared Nov 27, 2018
b0afad6
Refs #37966. Bump gem version.
Nov 28, 2018
3b489be
Merge 'feature-37966' for testing.
Nov 28, 2018
e379e09
updated gem version for latest edicodec
harshared Nov 28, 2018
7d45318
Merge remote-tracking branch 'origin/bump_version_for_edi_codec_29597'
harshared Nov 28, 2018
659dc2c
Correct issues with gem tag.
Nov 29, 2018
06a3376
Merge branch 'cp_end_date'
matt--williams Dec 3, 2018
6214cd2
Refs #38114. Merge upstream UHIC fixes.
Dec 4, 2018
40aaadd
Merge 'feature-38114' for testing.
Dec 4, 2018
b7b91cc
Merge 'ma-ftest-5.1' for sreview.
Dec 4, 2018
3b5f062
Merge pull request #72 from health-connector/merge-31070-for-sreview
sri49 Dec 4, 2018
a4bc064
Fix issue with bogus carriers.
Jan 2, 2019
469235a
Merge fix from altus change.
Jan 4, 2019
a87013f
Bump gem. Refs #39033. Refs #39043.
Jan 4, 2019
6dfa7ad
Merge 'merge-31070-for-sreview' update for SHR.
Jan 4, 2019
ab7f14b
38943: remove duplicate employers
nks2109 Jan 4, 2019
a7c02e3
Fixing retry count.
Jan 7, 2019
6b04072
Merge 'bug-39078' for SHR.
Jan 7, 2019
e0ba7ed
Merge remote-tracking branch 'origin/data_39031'
harshared Jan 8, 2019
f614df4
Merge remote-tracking branch 'origin/data_38943'
harshared Jan 18, 2019
a3bd759
Refs #39528 update the Gemfile.lock for SHR
sri49 Jan 29, 2019
342b3e8
Merge branch 'srev_39528' into ma-sreview-5.1
sri49 Jan 29, 2019
a15df11
refs #37014 #36991 #37002 #37012 #36990 #36996 Updating employer redu…
saimekala07 Nov 8, 2018
1a8f6a0
refs #37014 #36991 #37002 #37012 #36990 #36996 Adding new termiantion…
saimekala07 Nov 8, 2018
4de1097
refs #37014 #36991 #37002 #37012 #36990 #36996 Updating employer plan…
saimekala07 Nov 8, 2018
2165385
refs #37014 #36991 #37002 #37012 #36990 #36996 Don't store trading pa…
saimekala07 Nov 8, 2018
2d9bf6f
refs #37014 #36991 #37002 #37012 #36990 #36996 handling bogus plan ye…
saimekala07 Nov 8, 2018
b15a192
refs #37014 #36991 #37002 #37012 #36990 #36996 updating empoyer event…
saimekala07 Nov 8, 2018
0d2556a
Merge branch 'plan_year_state_change' of https://github.com/health-co…
matt--williams Feb 13, 2019
911e7d5
Add counting and correction script.
Feb 27, 2019
8ad9e3c
Bring even with master.
Mar 7, 2019
af66811
Add rubocop.
Mar 11, 2019
62ba395
Fix issues with dup employers.
Mar 13, 2019
0ee1e58
Fixes #40347. Correct issue with address line 2.
Mar 13, 2019
c73de3a
Fixes #40362. Correct tier updates.
Mar 13, 2019
aa40b4f
Merge branch 'ma-sreview-5.1'
matt--williams Mar 18, 2019
538092b
REFS 40016 - updating carrier ids to mongo and building py loop method
zacharylandes Feb 22, 2019
f8f2f95
Update and provide direction on employer events.
Mar 6, 2019
2afb78c
updated employer importer and render with specs
zacharylandes Mar 7, 2019
244f6f4
Refs 40021 plan year data population migration script
Mar 6, 2019
e6e3d97
Adding updates to make testing easier and clearer.
Mar 7, 2019
a4c0527
Refs 40021 Added different error conditions for plan year issuer impo…
Mar 7, 2019
8a97580
Correct XML Listener data parsing issues.
Mar 14, 2019
e5f26a0
Correct .to_a to .fields for PY Issuer Importer
bill-transue Mar 14, 2019
0123c03
Add counting and correction script.
Feb 27, 2019
6b3d9c1
Disable rubycritic if it is not optionally installed.
Mar 20, 2019
818d3bd
Merge branch 'disable_ruby_critic_in_dev_mode'
matt--williams Mar 20, 2019
c37be1b
Merge branch 'master' into critical_data_40137
sri49 Mar 20, 2019
220d91b
Add overcommit and rubocop corrections.
Mar 20, 2019
32ed551
Rebase against master, fix specs
bill-transue Mar 20, 2019
bcaed87
Testing gem lockdown.
Mar 21, 2019
ff235d6
Merge branch 'lock_gem_versions'
matt--williams Mar 21, 2019
cd92b26
Merge remote-tracking branch 'origin/critical_data_40137'
harshared Mar 21, 2019
fab13c7
Merge pull request #89 from health-connector/add_overcommit
bill-transue Mar 22, 2019
88eccd2
Refs #40398. Fix premium effective date on demographic changes.
Mar 22, 2019
bcd52f3
Merge branch 'feature-40016-40021'
matt--williams Mar 23, 2019
87f938f
Adds EDI import transformation task for Tufts.
ZASMan Mar 26, 2019
1c9835d
Base class and spec.
Apr 1, 2019
58a5a16
Create pre-processor for Tufts effectuations.
Apr 2, 2019
2f8de1d
Deal with hyphens in identifiers.
Apr 3, 2019
90e3bc2
Correct task placement.
Apr 3, 2019
f6bc562
Fix redundant checks.
Apr 3, 2019
8d10474
Remove unused constant.
Apr 3, 2019
a6e43cd
Correct 2750 date for employer change notifications.
Apr 10, 2019
28a34fc
Create tagged gem PR.
Apr 11, 2019
82dbb81
Merge branch 'merge_uhic_master_audit_gem'
matt--williams Apr 11, 2019
519353d
40540: Updated rake to take input as csv
nks2109 Apr 15, 2019
64fe945
REFS 40701 Tweaks policies missing transmissions generator and adds spec
ZASMan Apr 15, 2019
ab6452e
Merge branch 'master' into plan_year_state_change
saimekala07 Apr 16, 2019
f3f56a5
40872: added policy employer rake
nks2109 Apr 16, 2019
d30df91
Fix spec
saimekala07 Apr 16, 2019
a64702c
Merge branch 'plan_year_state_change' of github.com:health-connector/…
saimekala07 Apr 16, 2019
b046819
Fix issue with counting and mutated rows.
Apr 16, 2019
9f852fd
Reference correct plan column.
Apr 16, 2019
be72d02
Remove PRE AMT TOT input block.
Apr 16, 2019
2cd2a26
Move to usage of 1L now that it is provided.
Apr 23, 2019
ae9cc59
Adds some notes
ZASMan Apr 24, 2019
9e50d30
Fix issue with bogus TA1 drops.
Apr 25, 2019
65b8247
Merge remote-tracking branch 'origin/support_40540'
harshared Apr 26, 2019
b2e7d89
Create placeholder for effectuations without 1L
Apr 30, 2019
541d7b3
Refs 23505 Duplicate Employer Records in MA GDB
Apr 30, 2019
dc365ec
Refs 23505 Modified migration
Apr 30, 2019
4be9749
Merge remote-tracking branch 'origin/40701_policies_missing_transmiss…
harshared Apr 30, 2019
8ec9d47
Refs 23505 added spec
May 1, 2019
166e160
Remove more blocks for tufts.
May 1, 2019
c1747af
Refs 23505 Typo
May 1, 2019
c67feb1
Fix the source of the employer contributions.
May 2, 2019
f3ebcf6
Merge remote-tracking branch 'origin/tpd-40872'
harshared May 3, 2019
78a7639
Merge branch 'feature-41613' into ma-rc-5.4
May 3, 2019
cdfa736
Correct logic for aborted plan years.
May 6, 2019
c8fe968
Merge remote-tracking branch 'origin/Bug-23505'
harshared May 7, 2019
01db56a
Merge branch 'master' into plan_year_state_change
sri49 May 7, 2019
0bdface
Merge branch 'ma-rc-5.4'
matt--williams May 8, 2019
aede489
Merge remote-tracking branch 'origin/bug-22668'
harshared May 10, 2019
9f09592
Merge branch 'feature-40398' into ma-rc-5.4.2
May 12, 2019
518e3ba
Merge branch 'bug-40696' into ma-rc-5.4.2
May 12, 2019
d367744
Merge branch 'ma-rc-5.4.2'
matt--williams May 13, 2019
469aa5e
Merge branch 'master' into plan_year_state_change
sri49 May 15, 2019
bcb3899
Merge remote-tracking branch 'origin/plan_year_state_change'
harshared May 15, 2019
daade11
41650: rake for changing phone number of a person
nks2109 Jun 5, 2019
1f90c31
Merge remote-tracking branch 'origin/data_41650'
harshared Jun 5, 2019
a705648
Fixes #41965.
Jun 6, 2019
d977dee
Merge remote-tracking branch 'origin/bug-41965'
harshared Jun 11, 2019
b2b829c
Remove file.
Jul 16, 2019
9731e81
Add more files.
Jul 16, 2019
21ad7c0
update gemlock on glue to pick the changes from EDI
sri49 Aug 12, 2019
6cefb24
Fix some files.
Aug 20, 2019
af548ce
Fix example files.
Aug 20, 2019
70b8f53
Readme update.
Aug 20, 2019
6031388
Remove file, will add back once clean.
Aug 20, 2019
b2d588f
Readme clarification.
Aug 20, 2019
c469e61
Add corrected spec.
Aug 20, 2019
24c39bf
Refs #43022. Updated with latest commit
sri49 Aug 27, 2019
4c693dd
Refs #43022. updated with the latest on edi- thpp qualifier for maint…
sri49 Aug 29, 2019
5eee467
Refs #43646. get the latest changes from 43022
sri49 Sep 5, 2019
f5610c4
Merge branch 'master' into bump_43022_gem
sri49 Nov 25, 2019
4adc8df
Updated gemlock from edicode master
sri49 Nov 27, 2019
6ac9013
Merge branch 'bump_43022_gem'
sri49 Nov 27, 2019
af128b0
43302:merging reinstate and end_date changes code into MA
nks2109 Sep 6, 2019
65d20a2
43302: removed extra files which is not related to end_date changes
nks2109 Sep 9, 2019
63f5795
refs #85327 updating edicode gem version.
saimekala07 Feb 6, 2020
d5a0714
Merge remote-tracking branch 'origin/feature_43302'
harshared Feb 27, 2020
ebd126c
updated latest edi-codec gem value in glue
harshared Feb 27, 2020
527d5c7
refs #87470 process renewal ineligble carrier drop event.
saimekala07 May 6, 2020
f6376e0
refs #87471 Adding specs for carrier drop event to ineligble groups
saimekala07 May 6, 2020
2b10e45
Add building with github.
May 28, 2020
ab949cc
Spec reproducing bug.
May 28, 2020
13fc28c
Correct transaction generation.
May 28, 2020
de8aa82
Merge branch '87470_87470_eligible_drop' into glue-rc-release-5.6.18
sri49 Jun 22, 2020
c7be0eb
Merge remote-tracking branch 'origin/glue-rc-release-5.6.18'
harshared Jun 22, 2020
8990c20
Merge branch 'fix_transaction_usec_order' into glue-rc-release-5.4.9
sri49 Jul 13, 2020
99cc4c2
Merge remote-tracking branch 'origin/glue-rc-release-5.4.9'
harshared Jul 15, 2020
64d447f
89856: report 2 plan validation for Age Based Plan Rate Sum
nks2109 Sep 29, 2020
ec143e6
89855: updates for report 1 and report 2
nks2109 Oct 1, 2020
79cb488
89855: install rubyXL gem and updated Glue DB Plan Validation Reports
nks2109 Oct 5, 2020
1a672a0
90299: Create GlueDB Event Publisher for TransportProfile Plan Load V…
nks2109 Oct 9, 2020
9290681
89855: added specs
nks2109 Oct 14, 2020
9090755
89855: added specs
nks2109 Oct 14, 2020
236ae6c
89855: fix for sending file through transport gateway
nks2109 Oct 16, 2020
7e48c6b
89855: Carrier abbrev fot NHP has replaced with AHP
nks2109 Oct 21, 2020
18969fe
Merge remote-tracking branch 'origin/89855_feature'
harshared Oct 26, 2020
9bc89ef
Fix actions.
Nov 17, 2020
9184b93
Merge pull request #130 from health-connector/fix_github_actions_ma_2…
TreyE Nov 17, 2020
f869ed9
Point to new repositories.
Feb 12, 2021
012d85f
Now points to all correct repositories.
Feb 12, 2021
0ff60f1
93369: Added column with COBRA benefit status to Glue report
nks2109 Mar 29, 2021
e2ab073
Merge pull request #138 from health-connector/support_93369
harshared Apr 14, 2021
f126a2d
pointing the edi_codec gem to latest master
nks2109 May 12, 2021
cd71efa
Merge pull request #142 from health-connector/gem_changes
harshared May 12, 2021
25cae1b
edicodec gem update
harshared Feb 23, 2022
b8a199a
Merge pull request #150 from health-connector/hc-95539-edicodec-gem-u…
harshared Feb 24, 2022
7cefef4
Fix crash for bogus dates from custom transmissions.
TreyE Apr 18, 2022
78cd2d8
whitelisting reinstate event
nisanthyaganti9 Jan 17, 2024
1995e8e
Add enrollment chain of responsibility tooltip
nks2109 Jan 31, 2024
5e95c0c
allow searching in glue with the EA enrollment group Id
nks2109 Jan 31, 2024
79660a1
adding terminated check
nisanthyaganti9 Jan 31, 2024
a0ba988
checking for coverage start in case of dep add
nisanthyaganti9 Feb 1, 2024
ec39f59
switching ternary values
nisanthyaganti9 Feb 2, 2024
e0c8da9
pushing GHA runner to ubuntu-22, copy from DC config
polographer Feb 2, 2024
0bd9e59
update eye to remove sigar
polographer Feb 2, 2024
8579891
change reference from an old DCHBX repo
polographer Feb 2, 2024
27c81a2
added missing xsd
polographer Feb 2, 2024
bcdda12
added another xsd
polographer Feb 2, 2024
e227289
this should fix the invalid hash on bcrypt
polographer Feb 5, 2024
1a19578
Merge pull request #164 from health-connector/update-gha-runner
polographer Feb 5, 2024
525f301
Merge remote-tracking branch 'origin/master' into 5191116-reinstate-f…
nisanthyaganti9 Feb 5, 2024
25722b9
Merge remote-tracking branch 'origin/5191116-reinstate-feature' into …
nisanthyaganti9 Feb 5, 2024
cebc668
stub with message chain
nisanthyaganti9 Feb 5, 2024
67f4bce
spec fix
nisanthyaganti9 Feb 6, 2024
7ab099d
Merge remote-tracking branch 'origin/5191116-reinstate-feature' into …
nisanthyaganti9 Feb 6, 2024
57c4b18
Merge branch '5191116-reinstate-feature' into chain_of_hbx_enrollments
nks2109 Feb 6, 2024
98f63ce
Merge pull request #163 from health-connector/186906830-fix-drop-for-…
nisanthyaganti9 Feb 6, 2024
95abb9d
Merge pull request #162 from health-connector/chain_of_hbx_enrollments
harshaellanki Feb 6, 2024
69adb78
downgrade timers gem to allow script to be executed
polographer Feb 8, 2024
e835653
Merge pull request #165 from health-connector/fix-timers-version
polographer Feb 8, 2024
f27c1a3
Merge remote-tracking branch 'origin/master' into 5191116-reinstate-f…
nisanthyaganti9 Feb 8, 2024
12d2591
initial commit to suppport retro cancel reinstate
nisanthyaganti9 Feb 14, 2024
f3055a5
checking for existing enrollee on dep add for retro reinstate
nisanthyaganti9 Feb 15, 2024
0c7c642
adding/fixing specs
nisanthyaganti9 Feb 15, 2024
9479c26
spec fixes
nisanthyaganti9 Feb 15, 2024
dce6458
updating cv2 branch refs
nisanthyaganti9 Feb 15, 2024
feabd49
removing loggers
nisanthyaganti9 Feb 15, 2024
6327193
Merge pull request #166 from health-connector/186985891-support-retro…
nisanthyaganti9 Feb 15, 2024
179c269
referencing cv2 and edi codec to reinstate branch
nisanthyaganti9 Feb 15, 2024
fa662fe
updating sha for edi_codec & openhbx_cv2
nisanthyaganti9 Mar 21, 2024
7c1fe18
Merge branch '5191116-reinstate-feature' into rc-release-5.5.0
sri49 Mar 22, 2024
87bfb62
Merge pull request #167 from health-connector/rc-release-5.5.0
sri49 Mar 27, 2024
7e7d23d
removing term check to fix month end nightly events
nisanthyaganti9 Jun 21, 2024
420b336
Revert "removing term check to fix month end nightly events"
nisanthyaganti9 Jun 26, 2024
16bbced
handling reterm retro canceled
nisanthyaganti9 Jun 26, 2024
6675990
Merge pull request #168 from health-connector/rm-106759
sri49 Jun 27, 2024
d2e12d9
limiting nfp recon data pull to only 3 years
erubinst Oct 3, 2024
b693f6f
fixing syntax
erubinst Nov 4, 2024
5e14e38
Merge pull request #169 from health-connector/date_filter_nfp_recon_1…
erubinst Nov 4, 2024
74a0a01
initial work on base docker image
polographer Nov 5, 2024
a28c6bb
temporary GHA trigger for this branch
polographer Nov 5, 2024
fa25e7c
force execution
polographer Nov 5, 2024
4869ca4
intial commit for production image
polographer Nov 6, 2024
539f2e1
disable branch scoping to test
polographer Nov 6, 2024
2adfcd5
don't copy files from .config, we will fix that in code
polographer Nov 6, 2024
5fa8339
ignore a couple more files that we want to fix with code
polographer Nov 6, 2024
9f49632
more .config files
polographer Nov 6, 2024
fcec239
added production section on mogoid
polographer Nov 6, 2024
d320d92
I think this is a nested error
polographer Nov 6, 2024
c888e1d
first set of copied files, will research a better workaround
polographer Nov 7, 2024
67e3565
I think is a nested issue
polographer Nov 7, 2024
01020ec
tidy up exchange.yml handling, remove need for extra exchange_informa…
Nov 8, 2024
3e9f8d2
mods to handle some steps previously handled by server-only files
Nov 8, 2024
2f7376c
use CCA currently used ediparser and hxborable repos
Nov 12, 2024
11449af
add puma
Nov 12, 2024
c448e23
add jemmaloc use
Nov 12, 2024
b0b6910
update devise config to support dev/local and production modes
Nov 12, 2024
b18540a
adjust libjemalloc version to what's available for stretch
Nov 12, 2024
c49430b
add update scripts
Nov 13, 2024
ba42853
tidying up commented or unused things
Nov 13, 2024
6d36ae8
add log dir to allow precompiled (and match other versions of this pr…
Nov 13, 2024
1296a8d
re-enable normal GHA triggers
Nov 13, 2024
70688b6
fix mongoid yaml parsing in non-prod envs, such as rspec test runs
Nov 13, 2024
79cf277
update GH secret name
Nov 14, 2024
1a4d9e2
revert from nonworking GH token
Nov 14, 2024
7f378fb
add reports workflow
Nov 14, 2024
bf25927
add update image workflow
Nov 14, 2024
9019283
add tag latest workflow
Nov 14, 2024
79124e8
change gh token to dchbx_deployments_token
Nov 14, 2024
74f5140
TEMP - add push to register workflows
Nov 14, 2024
25004f4
Revert "TEMP - add push to register workflows"
Nov 14, 2024
34e9fcf
Merge pull request #171 from health-connector/188414578-dockerfile
polographer Nov 15, 2024
347eff7
Merge branch 'master' into add-additional-gha-workflows
Nov 15, 2024
d98c19a
Merge pull request #172 from health-connector:add-additional-gha-work…
polographer Nov 15, 2024
5a17660
add script
Nov 19, 2024
84946ff
Merge pull request #173 from health-connector/add-enrollment-script-2…
polographer Nov 19, 2024
fc6f0db
remove event batch processor from update script
matt--williams Dec 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
106 changes: 106 additions & 0 deletions .docker/base/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
FROM debian:stretch

RUN echo "deb http://archive.debian.org/debian stretch main" > /etc/apt/sources.list
RUN echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
libffi-dev \
libgdbm3 \
libssl1.0-dev \
libyaml-dev \
procps \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*

# skip installing gem documentation
RUN mkdir -p /usr/local/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc

ENV RUBY_MAJOR 2.1
ENV RUBY_VERSION 2.1.10
ENV RUBY_DOWNLOAD_SHA256 5be9f8d5d29d252cd7f969ab7550e31bbb001feb4a83532301c0dd3b5006e148
ENV RUBYGEMS_VERSION 2.6.12
ENV BUNDLER_VERSION 1.15.1

# some of ruby's build scripts are written in ruby
# we purge system ruby later to make sure our final image uses what we just built
RUN set -ex \
\
&& buildDeps=' \
autoconf \
bison \
dpkg-dev \
gcc \
libbz2-dev \
libgdbm-dev \
libglib2.0-dev \
libncurses-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
make \
ruby \
wget \
xz-utils \
' \
&& apt-get update \
&& apt-get install -y --no-install-recommends $buildDeps \
&& rm -rf /var/lib/apt/lists/* \
\
&& wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \
&& echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \
\
&& mkdir -p /usr/src/ruby \
&& tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \
&& rm ruby.tar.xz \
\
&& cd /usr/src/ruby \
\
# hack in "ENABLE_PATH_CHECK" disabling to suppress:
# warning: Insecure world writable dir
&& { \
echo '#define ENABLE_PATH_CHECK 0'; \
echo; \
cat file.c; \
} > file.c.new \
&& mv file.c.new file.c \
\
&& autoconf \
&& gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
&& ./configure \
--build="$gnuArch" \
--disable-install-doc \
--enable-shared \
&& make -j "$(nproc)" \
&& make install \
\
&& dpkg-query --show --showformat '${package}\n' \
| grep -P '^libreadline\d+$' \
| xargs apt-mark manual \
&& apt-get purge -y --auto-remove $buildDeps \
&& cd / \
&& rm -r /usr/src/ruby \
\
&& gem update --system "$RUBYGEMS_VERSION" \
&& gem install bundler --version "$BUNDLER_VERSION" --force \
&& rm -r /root/.gem/

# install things globally, for great justice
# and don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_PATH="$GEM_HOME" \
BUNDLE_SILENCE_ROOT_WARNING=1 \
BUNDLE_APP_CONFIG="$GEM_HOME"
# path recommendation: https://github.com/bundler/bundler/pull/6469#issuecomment-383235438
ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH
# adjust permissions of a few directories for running "gem install" as an arbitrary user
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
# (BUNDLE_PATH = GEM_HOME, no need to mkdir/chown both)

CMD [ "irb" ]
9 changes: 9 additions & 0 deletions .docker/config/database.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require File.join(File.dirname(__FILE__), "..", "lib/ojdbc7-12.1.0.2.0.jar")
Sequel::Model.plugin(:schema)
Sequel::Model.raise_on_save_failure = false # Do not throw exceptions on failure
Sequel::Model.db = case Padrino.env
when :development then Sequel.connect("B2B_URI")
when :production then Sequel.connect("B2B_URI")
when :test then Sequel.connect("B2B_URI")
when :cte then Sequel.connect("B2B_URI")
end
235 changes: 235 additions & 0 deletions .docker/config/glue_update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
#!/bin/bash -xe
#set -e
## Global Vars

cd /edidb

if [ -z "$1" ]
then
DAYS=2
else
DAYS=$1
fi

export START_DATE=`date --date="$DAYS days ago" +%Y%m%d000000`
export ENV_NAME
export HBX_ID
export EDIDB_DB_HOST
export EDIDB_DB_NAME
export EDIDB_DB_PASSWORD
export B2B_HOST
export B2B_SERVICE_PASSWORD
export SLACK_TOKEN
export SLACK_CHANNEL
export TO_ADDRESSES
export EMAIL_FROM_ADDRESS
export EDIDB_CURL_URL
export RABBITMQ_CURL_URL
export RABBITMQ_USER
export RABBITMQ_PASSWORD
export AWS_ACCESS_KEY_ID
export AWS_SECRET_ACCESS_KEY
export REPORT_ZIP_PASSWORD

## notification function
function send_sms_notification
{
cat << EOH > sms_notification.rb
#!/usr/bin/env ruby

require 'active_resource'
require 'json'
require 'aws-sdk'

ses = Aws::SES::Client.new(
region: 'us-east-1',
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY']
)

date = Time.now.inspect
email_subject = "GlueDB Update $1 \n\n"
email_body = "\n$1 at: \n#{date}\n\n$2"


resp = ses.send_email({
source: ENV['EMAIL_FROM_ADDRESS'],
destination: {
to_addresses: ENV.fetch('TO_ADDRESSES').split(',')
},
message: {
subject: {
data: email_subject
},
body: {
text: {
data: email_body
}
},
},
reply_to_addresses: ENV.fetch('EMAIL_FROM_ADDRESS').split(','),
})

EOH

ruby ./sms_notification.rb

}

## slack message to note the beginning of the glue update
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#SLACK_CHANNEL", "username": "EDI Database Bot", "text": "'\`' ### GlueDB Update Started ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage

cat > script.sh <<'EOL'
#!/bin/bash -xe

##App Server Vars
export PARSER_DIRECTORY='/edidb/ediparser'
export GLUEDB_DIRECTORY='/edidb'
export UPDATER_DIRECTORY='/edidb/hbx_oracle'
export START_DATE

##cleanup files
rm -f ${GLUEDB_DIRECTORY}/todays_data.zip
rm -f ${GLUEDB_DIRECTORY}/db/data/all_json.csv
rm -f ${PARSER_DIRECTORY}/*.csv
rm -f ${UPDATER_DIRECTORY}/*.csv

cat << EOH > /edidb/gateway_transmissions.sh
unset BUNDLE_APP_CONFIG
unset BUNDLE_BIN
unset BUNDLE_PATH
unset BUNDLER_VERSION
unset GEM_HOME
unset RUBYGEMS_VERSION
PATH=/edidb/jruby-1.7.27/bin:$PATH
GEM_PATH=/edidb/jruby-1.7.27/lib/ruby/gems/shared
cd ${UPDATER_DIRECTORY}
padrino r scripts/gateway_transmissions.rb --start $START_DATE
EOH

chmod 744 /edidb/gateway_transmissions.sh

set +e
batch_handler=$( kubectl get pods | grep edidb-glue-batch | grep Running )
set -e
if [ -z "$batch_handler" ]; then
kubectl patch cronjobs edidb-glue-batch -p "{\"spec\" : {\"suspend\" : true }}"
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "'\`' ### GlueDB Update Started ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage
else
exit 5
fi


## bring down the listeners
echo "bringing down listeners: "$(date)
kubectl scale --replicas=0 deployment/edidb-enrollment-validator deployment/edidb-broker-updated-listener \
deployment/edidb-policy-id-list-listener deployment/edidb-enrollment-event-listener \
deployment/edidb-enrollment-event-handler
#deployment/edidb-enrollment-event-batch-processor
sleep 60
kubectl scale --replicas=0 deployment/edidb-enroll-query-result-handler
sleep 120
kubectl scale --replicas=0 deployment/edidb-employer-workers
sleep 120
kubectl scale --replicas=0 deployment/edidb-legacy-listeners
sleep 180

echo "copying prod databaase: "$(date)
mongo --host $EDIDB_DB_HOST --authenticationDatabase 'admin' -u 'admin' -p $EDIDB_DB_PASSWORD < ~/scripts/prepare_dev.js

sleep 10

/edidb/gateway_transmissions.sh
cp ${UPDATER_DIRECTORY}/b2b_edi.csv ${PARSER_DIRECTORY}
cat ${PARSER_DIRECTORY}/b2b_edi.csv | ${PARSER_DIRECTORY}/dist/build/InterchangeTest/InterchangeTest > ${PARSER_DIRECTORY}/all_json.csv
mkdir -p ${GLUEDB_DIRECTORY}/db/data
cp ${PARSER_DIRECTORY}/all_json.csv ${GLUEDB_DIRECTORY}/db/data/

cd ${GLUEDB_DIRECTORY}
#echo -e '\ngem "rubycritic"' >> Gemfile
#bundle install
RAILS_ENV=development bundle exec rake edi:import:all
RAILS_ENV=development rails r script/queries/set_authority_members.rb
#head -n -1 Gemfile > Gemfile.tmp
#mv Gemfile.tmp Gemfile

echo "updating prod database: "$(date)
update=`mongo --host $EDIDB_DB_HOST --authenticationDatabase 'admin' -u 'admin' -p $EDIDB_DB_PASSWORD < ~/scripts/prepare_prod.js`
echo $update
update=$(echo -n ${update#*"db ${EDIDB_DB_NAME}_dev"})
update=$(echo -n ${update%bye*})
update=$(echo -n ${update#*clone})
update_status=`echo $update | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["'ok'"]'`

sleep 60

if [ "$update_status" -eq 1 ]; then

#curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "'\`' ### GlueDB Update Completed :: Running Reports Before Starting Listeners ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage

#cp /etc/reports/glue_enrollment_report.sh /edidb/glue_enrollment_report.sh && chmod 744 /edidb/glue_enrollment_report.sh
#cp /etc/reports/glue_enrollment_report.json.template /edidb/glue_enrollment_report.json.template
#/edidb/glue_enrollment_report.sh > glue_enrollment_report.log
#tail -30 glue_enrollment_report.log

#cp /etc/reports/policies_missing_transmissions.sh /edidb/policies_missing_transmissions.sh && chmod 744 /edidb/policies_missing_transmissions.sh
#cp /etc/reports/policies_missing_transmissions.json.template /edidb/policies_missing_transmissions.json.template
#/edidb/policies_missing_transmissions.sh > policies_missing_transmissions.log
#tail -10 policies_missing_transmissions.log

kubectl scale --replicas=1 deployment/edidb-legacy-listeners
messages=1
while [ $messages -gt 0 ]
do
sleep 120
messages=$( curl --user $RABBITMQ_USER:$RABBITMQ_PASSWORD $RABBITMQ_CURL_URL/api/queues/%2F/$HBX_ID.$ENV_NAME.q.glue.individual_updated_listener | jq .messages | tail -1 )
done
kubectl scale --replicas=1 deployment/edidb-employer-workers
sleep 120
kubectl scale --replicas=2 deployment/edidb-enroll-query-result-handler
sleep 120
kubectl scale --replicas=2 deployment/edidb-enrollment-validator deployment/edidb-broker-updated-listener \
deployment/edidb-policy-id-list-listener deployment/edidb-enrollment-event-listener \
deployment/edidb-enrollment-event-handler \
deployment/edidb-enrollment-event-batch-processor
sleep 120
kubectl patch cronjobs edidb-glue-batch -p "{\"spec\" : {\"suspend\" : false }}"
kubectl rollout restart deployment edidb-$ENV_NAME
else
exit 1
fi

EOL

chmod +x script.sh
set +e
./script.sh
update_status=$?
set -e
sleep 120

curlTestCmd="curl -sLk -w "%{http_code}" -o /dev/null ${EDIDB_CURL_URL}/accounts/sign_in"
curlTest=`eval $curlTestCmd`

if [ "$update_status" -eq 0 ]
then
if [ "$curlTest" == "200" ]
then
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "'\`' ### GlueDB Update Completed :: Listeners Are Up ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage
send_sms_notification Success
exit 0
else
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "'\`' ### GlueDB Update Completed :: But Restart Failed ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage
send_sms_notification "Restart Failed"
exit 1
fi
elif [ "$update_status" -eq 5 ]
then
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "<!channel> '\`' ### GlueDB Update Did Not Start -- Batch Handler Is Running ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage
send_sms_notification "Did Not Start" "The batch handler is running!"
exit 1
else
curl -X POST -H "Content-type: application/json; charset=utf-8" -H "Authorization: Bearer ${SLACK_TOKEN}" --data '{"channel": "#'$SLACK_CHANNEL'", "username": "EDI Database Bot", "text": "<!channel> '\`' ### GlueDB Update Failed ### '\`'", "icon_emoji": ":gear:"}' https://slack.com/api/chat.postMessage
send_sms_notification Failed "Please check GlueDB Update job in ${ENV_NAME}"
exit 1
fi
8 changes: 8 additions & 0 deletions .docker/config/prepare_dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use DB_NAME_dev;
db.dropDatabase();
sleep(10000);
use DB_NAME_dev;
db.dropDatabase();
sleep(10000);
use DB_NAME;
db.copyDatabase('DB_NAME', 'DB_NAME_dev');
12 changes: 12 additions & 0 deletions .docker/config/prepare_prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
use DB_NAME;
db.dropDatabase();
sleep(10000);
use DB_NAME;
db.dropDatabase();
sleep(20000);
use DB_NAME;
db.dropDatabase();
sleep(20000);
use DB_NAME_dev;
sleep(10000);
db.copyDatabase('DB_NAME_dev', 'DB_NAME');
2 changes: 2 additions & 0 deletions .docker/config/update_variables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sed -i "s|B2B_URI|$B2B_URI|g" /edidb/hbx_oracle/config/database.rb
sed -i "s|DB_NAME|$EDIDB_DB_NAME|g" /edidb/scripts/prepare*
Loading