examples icon indicating copy to clipboard operation
examples copied to clipboard

DEVX-2734: prebuild producer/consumer in demo client image

Open javabrett opened this issue 3 years ago • 0 comments

Description

https://confluentinc.atlassian.net/browse/DEVX-2734

What behavior does this PR change, and why?

In examples/ccloud-observability, once the cloud-stack/cluster has been created, Docker containers are launched for a producer and consumer, to create demo-topic-1 and some suitable metrics traffic.

Currently, the image build for cnfldemos/ccloud-observability-client:0.1.0 stops after some basic Maven and source setup - no build is done, and more importantly no dependencies are downloaded. These two steps are deferred until container launch-time, when mvn ... exec:java is run against unbuilt source.

This PR changes the Docker image build so that it includes the potentially-slow process of resolving all the dependencies, then executes the build ... making the run producer/consumer steps almost instant launches.

Testing

You can run the Observability demo as-is, and use docker logs to note that the producer/consumer takes time to build/launch (mostly pulling deps), and that during that time the demo Grafana dashboard is pretty ineffective.

To test the PR, you need to run make build-image then run as normal.

Post merge we will need to verify that the containers build ran and pushed a new image version to Docker Hub.

Author Validation

Describe the validation already done, or needs to be done, by the PR submitter.

  • [X] ccloud-observability

Reviewer Tasks

Describe the tasks/validation that the PR submitter is requesting to be done by the reviewer.

javabrett avatar Mar 27 '22 23:03 javabrett