Produced by Araxis Merge on 10/3/2017 11:16:05 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\production\vx-sync | Rakefile | Mon Aug 28 20:41:42 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync | Rakefile | Mon Oct 2 20:01:34 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 232 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | require 'r ubygems' | |
| 2 | require 'c ucumber' | |
| 3 | require 'c ucumber/ra ke/task' | |
| 4 | require 'r ubocop/rak e_task' | |
| 5 | require 'j son' | |
| 6 | ||
| 7 | task :defa ult => [:i nttest] | |
| 8 | ||
| 9 | task :intt est, [:env ] => [:env ironment_s etup] | |
| 10 | task :oper ational_da ta, [:env] => [:envi ronment_se tup] | |
| 11 | task :pati ent_sync, [:env] => [:environm ent_setup] | |
| 12 | ||
| 13 | task :envi ronment_se tup, :env do |task, args| | |
| 14 | env = ar gs[:env] | | 'virtual box' | |
| 15 | ||
| 16 | environm ent_endpoi nts(env) | |
| 17 | get_work er_config( env) | |
| 18 | end | |
| 19 | ||
| 20 | def npm_co mmand(env) | |
| 21 | if env = = "aws" | |
| 22 | ret = "scl enabl e python27 devtoolse t-3 'CC=/o pt/rh/devt oolset-3/r oot/usr/bi n/gcc CXX= /opt/rh/de vtoolset-3 /root/usr/ bin/g++ /u sr/local/b in/npm ins tall --uns afe-perm - -registry https://st ore.vistac ore.us/nex us/content /repositor ies/npm-al l/'" | |
| 23 | else | |
| 24 | ret = "npm insta ll --regis try https: //store.vi stacore.us /nexus/con tent/repos itories/np m-all/" | |
| 25 | end | |
| 26 | ret | |
| 27 | end | |
| 28 | ||
| 29 | def enviro nment_endp oints(env) | |
| 30 | case env | |
| 31 | when "vi rtualbox" | |
| 32 | p "Run ning with virtualbox environme nts" | |
| 33 | ENV["V XSYNC_IP"] = knife_s earch_for_ ip("primar y_vxsync_c lient") | |
| 34 | ENV["J DS_IP"] = knife_sear ch_for_ip( "jds") | |
| 35 | begin | |
| 36 | ENV[ "SOLR_IP"] = knife_s earch_for_ ip("solr") | |
| 37 | rescue | |
| 38 | puts "solr VM not found, trying to find mock s..." | |
| 39 | ENV[ "SOLR_IP"] = knife_s earch_for_ ip("mocks" ) | |
| 40 | end | |
| 41 | ENV["K ODAK_IP"] = knife_se arch_for_i p("vista-k odak") | |
| 42 | ENV["P ANORAMA_IP "] = knife _search_fo r_ip("vist a-panorama ") | |
| 43 | ENV["J MEADOWS_IP "] = knife _search_fo r_ip("mock s") | |
| 44 | ENV["M VI_IP"] = knife_sear ch_for_ip( "mocks") | |
| 45 | ENV["H DR_IP"] = knife_sear ch_for_ip( "mocks") | |
| 46 | ENV["V LER_IP"] = knife_sea rch_for_ip ("mocks") | |
| 47 | ENV["P GD_IP"] = knife_sear ch_for_ip( "mocks") | |
| 48 | when "aw s" | |
| 49 | p "Run ning with aws enviro nments" | |
| 50 | ve_api _machine = ENV["VE_A PI_NAME"] || "ve-api -local" | |
| 51 | ENV["V XSYNC_IP"] = knife_s earch_for_ ip("primar y_vxsync_c lient") | |
| 52 | begin | |
| 53 | ENV[ "JDS_IP"] = knife_se arch_for_i p("jds") | |
| 54 | rescue | |
| 55 | ENV[ "JDS_IP"] = knife_se arch_for_i p("jds_app _server") | |
| 56 | end | |
| 57 | ENV["S OLR_IP"] = knife_sea rch_for_ip ("solr") | |
| 58 | ENV["M OCKS_IP"] = knife_se arch_for_i p("mocks") | |
| 59 | else | |
| 60 | fail " Unrecogniz ed environ ment type: #{env}. A llowable t ypes are: 'virtualbo x', 'aws', and 'ede' , and 'ede -lxc'" | |
| 61 | end | |
| 62 | end | |
| 63 | ||
| 64 | def get_wo rker_confi g(env) | |
| 65 | ||
| 66 | case env | |
| 67 | when "aws" | |
| 68 | vxsync_i p = knife_ search_for _ip("prima ry_vxsync_ client") | |
| 69 | system "sc p -i #{ENV ['WORKSPAC E']}/.chef /keys/vagr antaws_c82 a142d5205 -o StrictH ostKeyChec king=no DNS @#{vxsync_ ip}:/opt/v xsync_clie nt/worker- config.jso n ." | |
| 70 | when "virt ualbox" | |
| 71 | vxsync_i p = knife_ search_for _ip("prima ry_vxsync_ client") | |
| 72 | system " scp -i #{E NV['VAGRAN T_HOME']}/ insecure_p rivate_key vagrant@# {vxsync_ip }:/opt/vxs ync_client /worker-co nfig.json ." | |
| 73 | end | |
| 74 | end | |
| 75 | ||
| 76 | ||
| 77 | ||
| 78 | task :intt est, :env do |task, args| | |
| 79 | puts "st art npm in stall" | |
| 80 | sh npm_c ommand(arg s[:env]) | |
| 81 | puts "co mpleted np m install" | |
| 82 | puts "st art integr ation test s" | |
| 83 | sh "npm run-script int-test" | |
| 84 | puts "co mpleted in tegration tests" | |
| 85 | end | |
| 86 | ||
| 87 | task :oper ational_da ta, :env d o |task, a rgs| | |
| 88 | puts "st art npm in stall" | |
| 89 | sh npm_c ommand(arg s[:env]) | |
| 90 | puts "co mpleted np m install" | |
| 91 | puts "st art operat ional data check aga inst #{ENV ['JDS_IP'] }" | |
| 92 | sh "npm run-script operation al-check" | |
| 93 | puts "co mpleted op erational data check " | |
| 94 | end | |
| 95 | ||
| 96 | task :pati ent_sync, :env do |t ask, args| | |
| 97 | puts "st art npm in stall" | |
| 98 | sh npm_c ommand(arg s[:env]) | |
| 99 | puts "co mpleted np m install" | |
| 100 | puts "st art patien t sync aga inst #{ENV ['VXSYNC_I P']}" | |
| 101 | sh "npm run-script sync-pati ent" | |
| 102 | puts "co mpleted pa tient" | |
| 103 | end | |
| 104 | ||
| 105 | def knife_ search_for _ip(machin e_name) | |
| 106 | release = File.rea d(File.dir name(__FIL E__) + "/. ./../../in frastructu re/propert ies/releas eVersion") | |
| 107 | stack = ENV['JOB_N AME'] || " #{ENV['USE R']}-#{rel ease}" | |
| 108 | if ENV.k ey?('BUNDL E_BIN_PATH ') | |
| 109 | raw_se arch = Bun dler.with_ clean_env { `/opt/ch efdk/bin/k nife searc h node \'r ole:#{mach ine_name} AND stack: #{stack}\' -Fj --con fig ~/Proj ects/vista core/.chef /knife.rb` } | |
| 110 | else | |
| 111 | raw_se arch = `/o pt/chefdk/ bin/knife search nod e \'role:# {machine_n ame} AND s tack:#{sta ck}\' -Fj --config ~ /Projects/ vistacore/ .chef/knif e.rb` | |
| 112 | end | |
| 113 | parsed_s earch = JS ON.parse(r aw_search, :create_a dditions = > false) | |
| 114 | fail "Mo re than on e node wit h that nam e found" i f parsed_s earch["res ults"] > 1 | |
| 115 | fail "No node with that name found: \' role:#{mac hine_name} AND stack :#{stack}\ '" if pars ed_search[ "results"] == 0 | |
| 116 | ip = par sed_search ["rows"][0 ]['automat ic']['ipad dress'] | |
| 117 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.