question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow generating CR json separately from building/publishing container images

See original GitHub issue

Is your feature request related to a problem? Please describe.

There are at least 2 use-cases when I’d like to generate new CR file for existing and published container images:

  1. Changing app name in order to be able to deploy it to the same cluster but to a different namespace (we use multiple deployments of the same app for testing purposes).
  2. Changing something in a blueprint.conf without modifying any servlet code (I was trying to come up with a way to generate non-conflicting topic names for multiple deployments in the same cluster before I realized that this is also configurable in non-blueprint configs).

Describe the solution you’d like

It would be nice to have some separate sbt task to generate CR file which will not try to build or publish any container images.

Describe alternatives you’ve considered

Commenting out cloudflowDockerRegistry in build.sbt will suppress image publishing to a remote repository. However, images are still built to the local Docker. But the most inconvenient in this case is that the full image name gets changed in the generated CR file: it is no longer prefixed with the registry name. So I have to edit the CR file to replace all image references, which proved to be error prone (see #975).

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
andreaTPcommented, Mar 30, 2021

@leozilla at the moment you have multiple possible workarounds, e.g. you can define sbt commands or command aliases to package “defining settings + running tasks” (as it’s done here https://github.com/lightbend/cloudflow/blob/bafe19d3e3b6f3c35c6b5bc752bce8784f6652a8/tools/build.sbt#L182).

We are currently working on a longer-term plan that is very likely going to make this “feature” a byproduct.

1reaction
andreaTPcommented, Feb 2, 2021

The build is using dynVer plugin to generate the project version

This is not mandatory and up to you to enable/disable/workaround if it doesn’t play well with your workflow.

In Cloudflow repo examples you can always e.g. export CLOUDFLOW_VERSION=xxx to fix the Cloudflow version: https://github.com/lightbend/cloudflow/blob/master/examples/taxi-ride/project/cloudflow-plugins.sbt#L2

Read more comments on GitHub >

github_iconTop Results From Across the Web

image/containers-policy.json.5.md at main - GitHub
The purpose of the policy file is to define a set of policy requirements for a container image, usually depending on its location...
Read more >
Chapter 5. Developing Operators - Red Hat Customer Portal
Create a sample custom resource (CR). ... Targets for building, publishing, deploying the container image that wraps the Operator binary, and targets for ......
Read more >
Should I copy `package-lock.json` to the container image in ...
json says "I have built and tested with exactly version 17.0.1 of that package". Once you have both files, there is a separate...
Read more >
JSON File logging driver - Docker Documentation
Describes how to use the json-file logging driver. ... container by using the --log-driver flag to docker container create or docker run :....
Read more >
Configuring container deployment - AWS App2Container
When you run the containerize command, a deployment.json file is created for the application specified in the --application-id parameter. The generate ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found