Produced by Araxis Merge on 10/2/2017 1:40:04 PM 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 | chef-repo.zip\chef-repo\machine_cookbooks\ehmp_provision\recipes | vista-panorama.rb | Mon Aug 28 19:42:44 2017 UTC |
| 2 | chef-repo.zip\chef-repo\machine_cookbooks\ehmp_provision\recipes | vista-panorama.rb | Mon Oct 2 15:02:36 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 280 |
| Changed | 1 | 4 |
| 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 | # | |
| 2 | # Cookbook Name:: eh mp_provisi on | |
| 3 | # Recipe:: vista-pan orama | |
| 4 | # | |
| 5 | ||
| 6 | require 'c hef/provis ioning/ssh _driver' | |
| 7 | ||
| 8 | ########## ########## ########## ########## ###### Sta ging Artif acts ##### ########## ########## ########## ########## | |
| 9 | if ENV.has _key?('HMP _LOCAL_FIL E') | |
| 10 | node.def ault[:ehmp _provision ][:'vista- panorama'] [:copy_fil es].merge! ({ | |
| 11 | "/tmp/ #{File.bas ename(ENV[ 'HMP_LOCAL _FILE'])}" => ENV['H MP_LOCAL_F ILE'] | |
| 12 | }) | |
| 13 | hmp_sour ce = "file :///tmp/#{ File.basen ame(ENV['H MP_LOCAL_F ILE'])}" | |
| 14 | else | |
| 15 | hmp_sour ce = artif act_url(no de[:ehmp_p rovision][ :artifacts ][:panoram a_hmp]) | |
| 16 | end | |
| 17 | ||
| 18 | if ENV.has _key?('CAC HE_LOCAL_F ILE') | |
| 19 | node.def ault[:ehmp _provision ][:'vista- panorama'] [:copy_fil es].merge! ({ | |
| 20 | "/tmp/ vista.zip" => "#{ENV ['WORKSPAC E']}/cache /vista/vis ta.zip" | |
| 21 | }) | |
| 22 | cache_so urce = "fi le:///tmp/ vista.zip" | |
| 23 | else | |
| 24 | cache_ve rsion = EN V["PANORAM A_CACHE_VE RSION"] || ENV["CACH E_VERSION" ] | |
| 25 | cache_so urce = art ifact_url( node[:ehmp _provision ][:artifac ts][:panor ama_cache] ) | |
| 26 | end | |
| 27 | ||
| 28 | if ENV.has _key?('COR RELATED_ID S_LOCAL_FI LE') | |
| 29 | node.def ault[:ehmp _provision ][:'vista- panorama'] [:copy_fil es].merge! ({ | |
| 30 | "/tmp/ #{File.bas ename(ENV[ 'CORRELATE D_IDS_LOCA L_FILE'])} " => ENV[' CORRELATED _IDS_LOCAL _FILE'] | |
| 31 | }) | |
| 32 | correlat ed_ids_sou rce = "fil e:///tmp/# {File.base name(ENV[' CORRELATED _IDS_LOCAL _FILE'])}" | |
| 33 | else | |
| 34 | correlat ed_ids_sou rce = arti fact_url(n ode[:ehmp_ provision] [:artifact s][:correl ated_ids]) | |
| 35 | end | |
| 36 | ########## ########## ########## ########## ###### Sta ging Artif acts ##### ########## ########## ########## ########## | |
| 37 | ||
| 38 | machine_id ent = "vis ta-panoram a" | |
| 39 | ||
| 40 | boot_optio ns = node[ :ehmp_prov ision][mac hine_ident .to_sym][" #{node[:ma chine][:dr iver]}".to _sym] | |
| 41 | node.defau lt[:ehmp_p rovision][ :'vista-pa norama'][: copy_files ].merge!(n ode[:machi ne][:copy_ files]) | |
| 42 | ||
| 43 | machine_de ps = parse _dependenc y_versions "machine" | |
| 44 | ehmp_deps = parse_de pendency_v ersions "e hmp_provis ion" | |
| 45 | ||
| 46 | r_list = [ ] | |
| 47 | r_list << "recipe[pa ckages::en able_inter nal_source s@#{machin e_deps["pa ckages"]}] " | |
| 48 | r_list << "recipe[pa ckages::di sable_exte rnal_sourc es@#{machi ne_deps["p ackages"]} ]" unless node[:simu lated_ssh_ driver].ni l? && (nod e[:machine ][:allow_w eb_access] || node[: machine][: driver] == "ssh") | |
| 49 | r_list << (node[:sim ulated_ssh _driver] ? "recipe[r ole_cookbo ok::aws@#{ machine_de ps["role_c ookbook"]} ]" : "reci pe[role_co okbook::#{ node[:mach ine][:driv er]}@#{mac hine_deps[ "role_cook book"]}]") | |
| 50 | r_list << "role[vist a-panorama ]" | |
| 51 | r_list << "recipe[vi sta@#{ehmp _deps["vis ta"]}]" | |
| 52 | r_list << "recipe[pa ckages::up load@#{mac hine_deps[ "packages" ]}]" if no de[:machin e][:cache_ upload] | |
| 53 | r_list << "recipe[pa ckages::re move_local repo@#{mac hine_deps[ "packages" ]}]" if no de[:machin e][:driver ] == "ssh" && node[: simulated_ ssh_driver ].nil? | |
| 54 | ||
| 55 | machine_bo ot "boot # {machine_i dent} mach ine to the #{node[:m achine][:d river]} en vironment" do | |
| 56 | elastic_ ip ENV["PA NORAMA_ELA STIC_IP"] | |
| 57 | machine_ name machi ne_ident | |
| 58 | boot_opt ions boot_ options | |
| 59 | driver n ode[:machi ne][:drive r] | |
| 60 | action n ode[:machi ne][:drive r] | |
| 61 | only_if { node[:ma chine][:pr oduction_s ettings][m achine_ide nt.to_sym] .nil? } | |
| 62 | end | |
| 63 | ||
| 64 | # if the d river is ' vagrant', append -no de- after the machin e identify and befor e the stac k name; el se use onl y machine- stack | |
| 65 | machine_na me = node[ :machine][ :driver] = = "vagrant " ? "#{mac hine_ident }-#{node[: machine][: stack]}-no de" : "#{m achine_ide nt}-#{node [:machine] [:stack]}" | |
| 66 | machine ma chine_name do | |
| 67 | driver " ssh" | |
| 68 | converge node[:mac hine][:con verge] | |
| 69 | machine_ options la zy { | |
| 70 | { | |
| 71 | :tra nsport_opt ions => { | |
| 72 | :i p_address => node[:m achine][:p roduction_ settings][ machine_id ent.to_sym ][:ip], | |
| 73 | :u sername => node[:mac hine][:pro duction_se ttings][ma chine_iden t.to_sym][ :ssh_usern ame], | |
| 74 | :s sh_options => { | |
| 75 | :keys => [ | |
| 76 | node[:ma chine][:pr oduction_s ettings][m achine_ide nt.to_sym] [:ssh_key] | |
| 77 | ], | |
| 78 | }, | |
| 79 | :o ptions => { | |
| 80 | :prefix => 'sudo ', | |
| 81 | } | |
| 82 | }, | |
| 83 | :con vergence_o ptions => node[:mach ine][:conv ergence_op tions] | |
| 84 | } | |
| 85 | } | |
| 86 | attribut es( | |
| 87 | { | |
| 88 | stac k: node[:m achine][:s tack], | |
| 89 | nexu s_url: nod e[:common] [:nexus_ur l], | |
| 90 | data _bag_strin g: node[:c ommon][:da ta_bag_str ing], | |
| 91 | vist a: { | |
| 92 | no _reset: EN V['NO_RESE T'] || fal se, | |
| 93 | ru n_checksum s: ENV.has _key?('RUN _CHECKSUMS '), | |
| 94 | ca che: { | |
| 95 | source: ca che_source | |
| 96 | }, | |
| 97 | hm p_source: hmp_source , | |
| 98 | pa norama: { | |
| 99 | correlated _ids: { | |
| 100 | source: correlated _ids_sourc e | |
| 101 | } | |
| 102 | }, | |
| 103 | do main_name: "PANORAMA .VISTACORE .US", | |
| 104 | si te_recipe: "panorama ", | |
| 105 | im port_recip e: "panora ma", | |
| 106 | si te_id: "9E 7A", | |
| 107 | si te: "PANOR AMA", | |
| 108 | ab breviation : "PAN", | |
| 109 | access_cod e: " REDACTED ", | |
| 110 | verify_cod e: " REDACTED ", | |
| 111 | di vision: [{ id: "500", name: "PA NORAMA"}], | |
| 112 | st ation_numb er: "500", | |
| 113 | re gion: "us- east", | |
| 114 | cl inics_osyn c_appointm ent_reques t: [ | |
| 115 | { | |
| 116 | location Ien: "195" , | |
| 117 | location Name: "CAR DIOLOGY", | |
| 118 | hour: 11 , | |
| 119 | minutes: 37 | |
| 120 | } | |
| 121 | ], | |
| 122 | mu ltiple_mod e: true, | |
| 123 | po ller_proce ss_count: 2 | |
| 124 | }, | |
| 125 | beat s: { | |
| 126 | lo gging: nod e[:machine ][:logging ] | |
| 127 | } | |
| 128 | } | |
| 129 | ) | |
| 130 | files la zy { node[ :ehmp_prov ision][:'v ista-panor ama'][:cop y_files] } | |
| 131 | chef_env ironment n ode[:machi ne][:envir onment] | |
| 132 | run_list r_list | |
| 133 | action n ode[:machi ne][:actio n] | |
| 134 | only_if { ["conver ge","setup "].include ?(node[:ma chine][:ac tion].to_s ) } | |
| 135 | end | |
| 136 | ||
| 137 | chef_node machine_na me do | |
| 138 | action : delete | |
| 139 | only_if { | |
| 140 | node[: machine][: action].eq l?("destro y") | |
| 141 | } | |
| 142 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.