Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/framework-riverbed_appinternals_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ The framework can be configured by modifying the [`config/riverbed_appinternals_
**NOTE**

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.

**NOTE**

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.
20 changes: 10 additions & 10 deletions lib/java_buildpack/framework/riverbed_appinternals_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ class RiverbedAppinternalsAgent < JavaBuildpack::Component::VersionedDependencyC
# @param [Hash] context a collection of utilities used the component
def initialize(context)
super(context)
@uri = download_url(credentials, @uri)
### @uri = download_url(credentials, @uri)
end

# (see JavaBuildpack::Component::BaseComponent#compile)
def compile
JavaBuildpack::Util::Cache::InternetAvailability.instance.available(
true, 'Downloading from Riverbed AppInternals Service Broker'
) do
### JavaBuildpack::Util::Cache::InternetAvailability.instance.available(
### true, 'Downloading from Riverbed AppInternals Service Broker'
### ) do
download_zip(false, @droplet.sandbox, @component_name)
end
### end
@droplet.copy_resources
rescue StandardError => e
raise "Riverbed AppInternals download failed: #{e}"
### rescue StandardError => e
### raise "Riverbed AppInternals download failed: #{e}"
end

# (see JavaBuildpack::Component::BaseComponent#release)
Expand Down Expand Up @@ -107,9 +107,9 @@ def rvbd_moniker(credentials)
credentials['rvbd_moniker'] || @configuration['rvbd_moniker']
end

def download_url(credentials, default_url)
(credentials[PROFILERURL] unless credentials.nil?) || default_url
end
### def download_url(credentials, default_url)
### (credentials[PROFILERURL] unless credentials.nil?) || default_url
### end

end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
before do
allow(services).to receive(:one_service?).with(/appinternals/).and_return(true)

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

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