Skip to content

Add CYGNUS_CONF_URL to fetch a custom agent config w/o rebuilding docker image#1418

Open
taliaga wants to merge 1 commit into
telefonicaid:masterfrom
smartsdk:add-conf-url
Open

Add CYGNUS_CONF_URL to fetch a custom agent config w/o rebuilding docker image#1418
taliaga wants to merge 1 commit into
telefonicaid:masterfrom
smartsdk:add-conf-url

Conversation

@taliaga

@taliaga taliaga commented Mar 17, 2017

Copy link
Copy Markdown

Hi there!

I'm new to cygnus, but I'm proposing this little change to make it easier to try different agent configurations without the need to rebuild the image. This way, I can put the agent config in, say, a github gist and try different things faster.

Note that I'm including some COPY in the Dockerfile because when building locally an image, a change in one of those script is actually being ignored. There's a non-trivial flow of variables definition and copies in the huge RUN command above, which ends up using the script in the configured cygnus repo. I couldn't see the need for such indirection... maybe from the time the Dockerfile was not inside the repo?

Anyway, let me know wdyt :)

@frbattid

Copy link
Copy Markdown
Member

I'll review this ASAP, thanks!

@taliaga

taliaga commented Apr 20, 2017

Copy link
Copy Markdown
Author

@frbattid Another benefit I forgot to mention regarding this, consequence of the fact that rebuilding the image is no longer necessary, is that it makes much easier testing cygnus in a distributed cluster environment (a docker swarm cluster is my use case).

@taliaga

taliaga commented Jun 12, 2017

Copy link
Copy Markdown
Author

Hi @AlvaroVega!, any comments on this? I'd like to stop using my custom cygnus images if possible.

@AlvaroVega

Copy link
Copy Markdown
Member

HI, was this PR tested? Does this PR ensure backward compatibility?

@taliaga

taliaga commented Jun 12, 2017

Copy link
Copy Markdown
Author

Thanks Alvaro for such a fast reply.
So, first of all, as a developer I understand your concerns.
Also, note that the changes I'm doing are within the docker folder, not source code already being tested.

That being said, my question is... what kind of testing for this would you like to have?

  • The basic one: Yes, I've tested it locally and it works both ways of the "if" (i.e, with and without config file url). It's expected to be backwards compatible because I'm just adding functionality only when a new variable is present ($CYGNUS_CONF_URL).
  • The fact that it's a valid dockerfile: we could try to get the hub.docker.com build the image with the source of this branch. But that will not assure you anything about backwards compatibility.
  • Something more complex you may have in mind?

@taliaga

taliaga commented Jun 22, 2017

Copy link
Copy Markdown
Author

Ping @AlvaroVega

@taliaga

taliaga commented Sep 7, 2017

Copy link
Copy Markdown
Author

@AlvaroVega @

@AlvaroVega

Copy link
Copy Markdown
Member

Regarding with this PR currently you can use CYGNUS_SKIP_CONF_GENERATION env var and others to provide your custom agent configuration.
Download that custom agent configuration is not included.

@AlvaroVega

Copy link
Copy Markdown
Member

Using docker, currently you can provide your own cygnus agent conf in a file in a volumen.

@fgalan

fgalan commented Dec 18, 2019

Copy link
Copy Markdown
Member

Using docker, currently you can provide your own cygnus agent conf in a file in a volumen.

@taliaga is enough with this possiblity that @AlvaroVega explains? Or do you still that downloading a conf file (using wget) is still needed? In the second case, could you elaborate on the user case behind, please?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants