Skip to content

Commit a89b117

Browse files
joemokosnebhale
authored andcommitted
Enable Profile Agent Download
This change reverts the previous change to Riverbed and enables the AppInternals agent to be downloaded from the main site instead of directly from a service broker. [#784] Signed-off-by: Ben Hale <[email protected]>
1 parent 380fabd commit a89b117

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

docs/framework-riverbed_appinternals_agent.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ The framework can be configured by modifying the [`config/riverbed_appinternals_
5252
**NOTE**
5353

5454
If the Riverbed Service Broker's version is greater than or equal to 10.20, the buildpack will instead download Riverbed AppInternals agent from Riverbed Service Broker and will fall back to using `repository_root` in [`config/riverbed_appinternals_agent.yml`][] only if Service Broker failed to serve the Agent artifact.
55+
56+
**NOTE**
57+
58+
If the Rivered verstion is 10.21.9 or later, the buildpack will load the profiler normally, instead of from the Service Broker. This allows for creating multiple offline buildpacks containing different versions.

lib/java_buildpack/framework/riverbed_appinternals_agent.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,19 @@ class RiverbedAppinternalsAgent < JavaBuildpack::Component::VersionedDependencyC
2929
# @param [Hash] context a collection of utilities used the component
3030
def initialize(context)
3131
super(context)
32-
@uri = download_url(credentials, @uri)
32+
### @uri = download_url(credentials, @uri)
3333
end
3434

3535
# (see JavaBuildpack::Component::BaseComponent#compile)
3636
def compile
37-
JavaBuildpack::Util::Cache::InternetAvailability.instance.available(
38-
true, 'Downloading from Riverbed AppInternals Service Broker'
39-
) do
37+
### JavaBuildpack::Util::Cache::InternetAvailability.instance.available(
38+
### true, 'Downloading from Riverbed AppInternals Service Broker'
39+
### ) do
4040
download_zip(false, @droplet.sandbox, @component_name)
41-
end
41+
### end
4242
@droplet.copy_resources
43-
rescue StandardError => e
44-
raise "Riverbed AppInternals download failed: #{e}"
43+
### rescue StandardError => e
44+
### raise "Riverbed AppInternals download failed: #{e}"
4545
end
4646

4747
# (see JavaBuildpack::Component::BaseComponent#release)
@@ -107,9 +107,9 @@ def rvbd_moniker(credentials)
107107
credentials['rvbd_moniker'] || @configuration['rvbd_moniker']
108108
end
109109

110-
def download_url(credentials, default_url)
111-
(credentials[PROFILERURL] unless credentials.nil?) || default_url
112-
end
110+
### def download_url(credentials, default_url)
111+
### (credentials[PROFILERURL] unless credentials.nil?) || default_url
112+
### end
113113

114114
end
115115
end

spec/java_buildpack/framework/riverbed_appinternals_agent_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
before do
3232
allow(services).to receive(:one_service?).with(/appinternals/).and_return(true)
3333

34-
allow(services).to receive(:find_service).and_return('credentials' => { 'profilerUrlLinux' =>
35-
'http://testfoobar/profiler.zip' })
34+
### allow(services).to receive(:find_service).and_return('credentials' => { 'profilerUrlLinux' =>
35+
### 'http://testfoobar/profiler.zip' })
3636

3737
allow(application_cache).to receive(:get).with('http://testfoobar/profiler.zip')
3838
.and_yield(Pathname.new('spec/fixtures/'\

0 commit comments

Comments
 (0)