Skip to content

Commit 7d31c8d

Browse files
Christopher Frostnebhale
authored andcommitted
Add Introscope Agent Framework
This change adds support for user provided Introscope services. [#71584700]
1 parent 1bf24ef commit 7d31c8d

21 files changed

Lines changed: 349 additions & 69 deletions

.idea/.rakeTasks

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/dictionaries/bhale.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: ruby
22
rvm:
3-
- 2.1.5
3+
- 2.2.2
44
- 1.9.3-p551
55
before_script: if [[ $TRAVIS_RUBY_VERSION != '1.9.3-p551' || $TRAVIS_SECURE_ENV_VARS
66
!= 'true' ]]; then unset CODECLIMATE_REPO_TOKEN; fi

Gemfile.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
addressable (2.3.7)
4+
addressable (2.3.8)
55
ast (2.0.0)
66
astrolabe (1.3.0)
77
parser (>= 2.2.0.pre.3, < 3.0)
8-
codeclimate-test-reporter (0.4.6)
8+
codeclimate-test-reporter (0.4.7)
99
simplecov (>= 0.7.1, < 1.0.0)
1010
crack (0.4.2)
1111
safe_yaml (~> 1.0.0)
1212
diff-lcs (1.2.5)
1313
docile (1.1.5)
14-
multi_json (1.10.1)
15-
parser (2.2.0.3)
14+
json (1.8.2)
15+
parser (2.2.2.1)
1616
ast (>= 1.1, < 3.0)
1717
powerpack (0.1.0)
1818
rainbow (2.0.0)
1919
rake (10.4.2)
20-
redcarpet (3.2.2)
20+
redcarpet (3.2.3)
2121
rspec (3.2.0)
2222
rspec-core (~> 3.2.0)
2323
rspec-expectations (~> 3.2.0)
2424
rspec-mocks (~> 3.2.0)
25-
rspec-core (3.2.1)
25+
rspec-core (3.2.3)
2626
rspec-support (~> 3.2.0)
27-
rspec-expectations (3.2.0)
27+
rspec-expectations (3.2.1)
2828
diff-lcs (>= 1.2.0, < 2.0)
2929
rspec-support (~> 3.2.0)
3030
rspec-mocks (3.2.1)
3131
diff-lcs (>= 1.2.0, < 2.0)
3232
rspec-support (~> 3.2.0)
3333
rspec-support (3.2.2)
34-
rubocop (0.29.1)
34+
rubocop (0.30.1)
3535
astrolabe (~> 1.3)
36-
parser (>= 2.2.0.1, < 3.0)
36+
parser (>= 2.2.2.1, < 3.0)
3737
powerpack (~> 0.1)
3838
rainbow (>= 1.99.1, < 3.0)
3939
ruby-progressbar (~> 1.4)
40-
rubocop-rspec (1.2.1)
41-
ruby-progressbar (1.7.1)
40+
rubocop-rspec (1.3.0)
41+
ruby-progressbar (1.7.5)
4242
rubyzip (1.1.7)
4343
safe_yaml (1.0.4)
44-
simplecov (0.9.2)
44+
simplecov (0.10.0)
4545
docile (~> 1.1.0)
46-
multi_json (~> 1.0)
47-
simplecov-html (~> 0.9.0)
48-
simplecov-html (0.9.0)
46+
json (~> 1.8)
47+
simplecov-html (~> 0.10.0)
48+
simplecov-html (0.10.0)
4949
tee (1.0.0)
50-
webmock (1.20.4)
50+
webmock (1.21.0)
5151
addressable (>= 2.3.6)
5252
crack (>= 0.3.2)
5353
yard (0.8.7.6)

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ To learn how to configure various properties of the buildpack, follow the "Confi
5353
* [Tomcat](docs/container-tomcat.md) ([Configuration](docs/container-tomcat.md#configuration))
5454
* Standard Frameworks
5555
* [AppDynamics Agent](docs/framework-app_dynamics_agent.md) ([Configuration](docs/framework-app_dynamics_agent.md#configuration))
56+
* [Introscope Agent](docs/framework-introscope_agent.md) ([Configuration](docs/framework-introscope_agent.md#configuration))
5657
* [Java Options](docs/framework-java_opts.md) ([Configuration](docs/framework-java_opts.md#configuration))
5758
* [JRebel Agent](docs/framework-jrebel_agent.md) ([Configuration](docs/framework-jrebel_agent.md#configuration))
5859
* [MariaDB JDBC](docs/framework-maria_db_jdbc.md) ([Configuration](docs/framework-maria_db_jdbc.md#configuration))

config/components.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jres:
3333

3434
frameworks:
3535
- "JavaBuildpack::Framework::AppDynamicsAgent"
36+
- "JavaBuildpack::Framework::IntroscopeAgent"
3637
- "JavaBuildpack::Framework::JavaOpts"
3738
- "JavaBuildpack::Framework::JrebelAgent"
3839
- "JavaBuildpack::Framework::MariaDbJDBC"

config/introscope_agent.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Cloud Foundry Java Buildpack
2+
# Copyright 2013-2015 the original author or authors.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
# Configuration for the CA Wily framework
17+
---
18+
repository_root: ""
19+
version: 9.7.+
20+
default_agent_name: "$(expr \"$VCAP_APPLICATION\" : \'.*application_name[\": ]*\\([A-Za-z0-9_-]*\\).*\')"

docs/framework-introscope_agent.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Introscope Agent Framework
2+
The Introscope Agent Framework causes an application to be automatically configured to work with a bound [Introscope service][].
3+
4+
<table>
5+
<tr>
6+
<td><strong>Detection Criterion</strong></td><td>Existence of a single bound Introscope service.
7+
<ul>
8+
<li>Existence of a Introscope service is defined as the <a href="http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#VCAP-SERVICES"><code>VCAP_SERVICES</code></a> payload containing a service who's name, label or tag has <code>introscope</code> as a substring.</li>
9+
</ul>
10+
</td>
11+
</tr>
12+
<tr>
13+
<td><strong>Tags</strong></td>
14+
<td><tt>introscope-agent=&lt;version&gt;</tt></td>
15+
</tr>
16+
</table>
17+
Tags are printed to standard output by the buildpack detect script
18+
19+
## User-Provided Service (Optional)
20+
Users may optionally provide their own Introscope service. A user-provided Introscope service must have a name or tag with `introscope` in it so that the Introscope Agent Framework will automatically configure the application to work with the service.
21+
22+
The credential payload of the service may contain the following entries:
23+
24+
| Name | Description
25+
| ---- | -----------
26+
| `agent-name` | (Optional) The name that should be given to this instance of the Introscope agent
27+
| `host-name` | The host name of the Introscope Enterprise Manager server
28+
| `ssl` | (Optional) Whether or not to use an SSL connection to the Introscope Enterprise Manager server
29+
| `port` | (Optional) The port of the Introscope Enterprise Manager server
30+
31+
To provide more complex values such as the `agent-name`, using the interactive mode when creating a user-provided service will manage the character escaping automatically. For example, the default `agent-name` could be set with a value of `agent-$(expr "$VCAP_APPLICATION" : '.*application_name[": ]*\([[:word:]]*\).*')` to calculate a value from the Cloud Foundry application name.
32+
33+
## Configuration
34+
For general information on configuring the buildpack, refer to [Configuration and Extension][].
35+
36+
The framework can be configured by modifying the [`config/introscope_agent.yml`][] file in the buildpack fork. The framework uses the [`Repository` utility support][repositories] and so it supports the [version syntax][] defined there.
37+
38+
| Name | Description
39+
| ---- | -----------
40+
| `repository_root` | The URL of the Introscope Agent repository index ([details][repositories]).
41+
| `version` | The version of Introscope Agent to use.
42+
43+
### Additional Resources
44+
The framework can also be configured by overlaying a set of resources on the default distribution. To do this, add files to the `resources/ca_wily_agent` directory in the buildpack fork. For example, to override the default profile add your custom profile to `resources/introscope_agent/`.
45+
46+
[Configuration and Extension]: ../README.md#configuration-and-extension
47+
[`config/intoscope_agent.yml`]: ../config/intoscope_agent.yml
48+
[Introscope service]: http://www.ca.com/us/opscenter/ca-application-performance-management.aspx
49+
[repositories]: extending-repositories.md
50+
[version syntax]: extending-repositories.md#version-syntax-and-ordering

java-buildpack.iml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -268,34 +268,34 @@
268268
</content>
269269
<orderEntry type="jdk" jdkName="rbenv: 1.9.3-p551" jdkType="RUBY_SDK" />
270270
<orderEntry type="sourceFolder" forTests="false" />
271-
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.7, rbenv: 1.9.3-p551) [gem]" level="application" />
271+
<orderEntry type="library" scope="PROVIDED" name="addressable (v2.3.8, rbenv: 1.9.3-p551) [gem]" level="application" />
272272
<orderEntry type="library" scope="PROVIDED" name="ast (v2.0.0, rbenv: 1.9.3-p551) [gem]" level="application" />
273273
<orderEntry type="library" scope="PROVIDED" name="astrolabe (v1.3.0, rbenv: 1.9.3-p551) [gem]" level="application" />
274-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.8.2, rbenv: 1.9.3-p551) [gem]" level="application" />
275-
<orderEntry type="library" scope="PROVIDED" name="codeclimate-test-reporter (v0.4.6, rbenv: 1.9.3-p551) [gem]" level="application" />
274+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.9.4, rbenv: 1.9.3-p551) [gem]" level="application" />
275+
<orderEntry type="library" scope="PROVIDED" name="codeclimate-test-reporter (v0.4.7, rbenv: 1.9.3-p551) [gem]" level="application" />
276276
<orderEntry type="library" scope="PROVIDED" name="crack (v0.4.2, rbenv: 1.9.3-p551) [gem]" level="application" />
277277
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 1.9.3-p551) [gem]" level="application" />
278278
<orderEntry type="library" scope="PROVIDED" name="docile (v1.1.5, rbenv: 1.9.3-p551) [gem]" level="application" />
279-
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, rbenv: 1.9.3-p551) [gem]" level="application" />
280-
<orderEntry type="library" scope="PROVIDED" name="parser (v2.2.0.3, rbenv: 1.9.3-p551) [gem]" level="application" />
279+
<orderEntry type="library" scope="PROVIDED" name="json (v1.8.2, rbenv: 1.9.3-p551) [gem]" level="application" />
280+
<orderEntry type="library" scope="PROVIDED" name="parser (v2.2.2.1, rbenv: 1.9.3-p551) [gem]" level="application" />
281281
<orderEntry type="library" scope="PROVIDED" name="powerpack (v0.1.0, rbenv: 1.9.3-p551) [gem]" level="application" />
282282
<orderEntry type="library" scope="PROVIDED" name="rainbow (v2.0.0, rbenv: 1.9.3-p551) [gem]" level="application" />
283283
<orderEntry type="library" scope="PROVIDED" name="rake (v10.4.2, rbenv: 1.9.3-p551) [gem]" level="application" />
284-
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.2.2, rbenv: 1.9.3-p551) [gem]" level="application" />
284+
<orderEntry type="library" scope="PROVIDED" name="redcarpet (v3.2.3, rbenv: 1.9.3-p551) [gem]" level="application" />
285285
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.2.0, rbenv: 1.9.3-p551) [gem]" level="application" />
286-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.2.1, rbenv: 1.9.3-p551) [gem]" level="application" />
287-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.2.0, rbenv: 1.9.3-p551) [gem]" level="application" />
286+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.2.3, rbenv: 1.9.3-p551) [gem]" level="application" />
287+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.2.1, rbenv: 1.9.3-p551) [gem]" level="application" />
288288
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.2.1, rbenv: 1.9.3-p551) [gem]" level="application" />
289289
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.2.2, rbenv: 1.9.3-p551) [gem]" level="application" />
290-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.29.1, rbenv: 1.9.3-p551) [gem]" level="application" />
291-
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v1.2.1, rbenv: 1.9.3-p551) [gem]" level="application" />
292-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.7.1, rbenv: 1.9.3-p551) [gem]" level="application" />
290+
<orderEntry type="library" scope="PROVIDED" name="rubocop (v0.30.0, rbenv: 1.9.3-p551) [gem]" level="application" />
291+
<orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v1.2.2, rbenv: 1.9.3-p551) [gem]" level="application" />
292+
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.7.5, rbenv: 1.9.3-p551) [gem]" level="application" />
293293
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v1.1.7, rbenv: 1.9.3-p551) [gem]" level="application" />
294294
<orderEntry type="library" scope="PROVIDED" name="safe_yaml (v1.0.4, rbenv: 1.9.3-p551) [gem]" level="application" />
295-
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.9.2, rbenv: 1.9.3-p551) [gem]" level="application" />
296-
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.9.0, rbenv: 1.9.3-p551) [gem]" level="application" />
295+
<orderEntry type="library" scope="PROVIDED" name="simplecov (v0.10.0, rbenv: 1.9.3-p551) [gem]" level="application" />
296+
<orderEntry type="library" scope="PROVIDED" name="simplecov-html (v0.10.0, rbenv: 1.9.3-p551) [gem]" level="application" />
297297
<orderEntry type="library" scope="PROVIDED" name="tee (v1.0.0, rbenv: 1.9.3-p551) [gem]" level="application" />
298-
<orderEntry type="library" scope="PROVIDED" name="webmock (v1.20.4, rbenv: 1.9.3-p551) [gem]" level="application" />
298+
<orderEntry type="library" scope="PROVIDED" name="webmock (v1.21.0, rbenv: 1.9.3-p551) [gem]" level="application" />
299299
<orderEntry type="library" scope="PROVIDED" name="yard (v0.8.7.6, rbenv: 1.9.3-p551) [gem]" level="application" />
300300
</component>
301301
<component name="RModuleSettingsStorage">

lib/java_buildpack/component/versioned_dependency_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def supports?
6565
# @param [Pathname] target_directory the directory to store the JAR file in. Defaults to the component's sandbox.
6666
# @param [String] name an optional name for the download. Defaults to +@component_name+.
6767
# @return [Void]
68-
def download_jar(jar_name = jar_name, target_directory = @droplet.sandbox, name = @component_name)
68+
def download_jar(jar_name = self.jar_name, target_directory = @droplet.sandbox, name = @component_name)
6969
super(@version, @uri, jar_name, target_directory, name)
7070
end
7171

0 commit comments

Comments
 (0)