Elastic Apm Agent on PCF cloud foundry Java Build pack (automatic integration)

I've got a test MR pull request of code here:

I've almost got the build pack to automatically load Elastic Apm Agent on startup.
Except it's expecting the repo to have index.yml file in the maven repo.

version: 1.1.0
repository_root: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/
repository_download: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.1.0/elastic-apm-agent-1.1.0.jar```

Is there a repo where index.yml is supported? 

I've noted that we can hack the agent line manually, but we have over 50 microservices, this becomes very costly.  I'd like to get this merged into the base java build packs. 
https://discuss.elastic.co/t/elastic-apm-agent-jar-on-pcf/166137

Hi @kenmac

Thank you so much for using the Elastic Java APM and working on the Cloud Foundry Build Pack, We Certainly want to have an official build pack at some point soon.

BTW I wrote the manual hack, :grin: We realize that is not optimal but we wanted a way for folks to start trying out the agent in CF before a build pack was available.

I have forwarded this on to a couple internal folks including the PM on the APM Team.

Is this what you are looking for in the elastic apm agent maven repo?

Let's see what I can find out...

NOTE: I am a little confused are you specifically creating this buildpack to be dependent / integrated with JRebel?

1 Like

That file is the internal configuration file for the Java BuildPack's internal ruby code inside the build pack compile to "lookup" the version number and repo location.

When that .rb code goes to the var key repository_root URL it attempts to fetch a
I believe the code looks for a
INDEX_PATH = '/index.yml'
If you can name it that so the content looks like this url endpoint.
https://download.run.pivotal.io/new-relic/index.yml

1.1.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.1.0/elastic-apm-agent-1.1.0.jar
1.2.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.2.0/elastic-apm-agent-1.2.0.jar
1.3.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.3.0/elastic-apm-agent-1.3.0.jar
1.4.0: https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/1.4.0/elastic-apm-agent-1.4.0.jar

The Elastic apm directory uses the Maven xml nomenclature standard to lookup available versions to jar files like this:
https://repo1.maven.org/maven2/co/elastic/apm/elastic-apm-agent/maven-metadata.xml

The Pivotal BP need it in yml style name:value where:
name is the version number as a key and
value is the direct URL to the jar file.

As you send this to me, I could just create a temp url host for that data.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.