Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-4900] flink-master: Allow to deploy TM with container #2703

Closed
wants to merge 2 commits into from

Conversation

Makman2
Copy link
Contributor

@Makman2 Makman2 commented Oct 27, 2016

Allows via a setting to deploy a base image on that a task manager runs.

@Makman2
Copy link
Contributor Author

Makman2 commented Oct 31, 2016

Hello :)
Not sure what has gone wrong in the tests (it seems the CI is not really stable when looking at other PRs, especially on my typo fixing PR), though it would be good to merge it asap, as I'm working on getting flink into DC/OS and having this feature inside master would be a step forward as it makes building docker images easier :) thx in advance 👍
CC @EronWright

Allows via a setting to deploy a base image on that a task manager
runs.
@mxm
Copy link
Contributor

mxm commented Nov 4, 2016

Thanks for the PR! Jenkins CI is currently broken but Travis CI passed. Looks good to me but would be great if you could take a look @EronWright.

Copy link
Contributor

@EronWright EronWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the minor issues I mentioned, this looks great, thanks!

@@ -489,6 +489,29 @@
*/
public static final String MESOS_RESOURCEMANAGER_TASKS_CPUS = "mesos.resourcemanager.tasks.cpus";

/**
* The base container image to use for task managers (started via the unified containerizer).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rephrase the comment: "The container image to use for task managers." In other words, it isn't a 'base' image in this context, and numerous containerizers are now supported.

.setType(Protos.ContainerInfo.Type.DOCKER)
.setDocker(Protos.ContainerInfo.DockerInfo.newBuilder()
.setNetwork(Protos.ContainerInfo.DockerInfo.Network.HOST)
.setForcePullImage(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"setForcePullImage" is probably not appropriate in production; for dev/test you probably need to use an explicit image tag, not 'latest'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you can specify the image name with your tag: myimage:devel
But we can make a setting for it which defaults to true (I think force-pulling should be on by default, as it has no side-effects).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force pulling does have side-effects, it causes docker to make additional network requests that might not be desirable. This behavior is not typical of other DCOS packages, nor is it consistent between the containerizers. Please turn it off.

@@ -601,6 +601,54 @@ else if (recoveryMode == HighAvailabilityMode.ZOOKEEPER) {

info.setCommand(cmd);

// Set base container for task manager if specified in configs.
String taskManagerContainerName = flinkConfig.getString(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable name (and associated comment) is inaccurate; may I suggest something like tmImageName.

@Makman2
Copy link
Contributor Author

Makman2 commented Nov 12, 2016

Btw shall I use "fixup commits" or fix the commit directly? I prefer the second method, I'm not a real fan of non-atomic commits and commits like "Oops, fixing mistake from before". Though I've read inside the contributions-guidelines that the first method is preferred^^

@mxm
Copy link
Contributor

mxm commented Nov 15, 2016

It is easier for the review process when you push fixups commits to pull requests. Usually we fixup the commits when merging to master.

@mxm
Copy link
Contributor

mxm commented Nov 15, 2016

I'll merge the changes once the comments have been addressed.

.setType(Protos.ContainerInfo.Type.DOCKER)
.setDocker(Protos.ContainerInfo.DockerInfo.newBuilder()
.setNetwork(Protos.ContainerInfo.DockerInfo.Network.HOST)
.setForcePullImage(true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Force pulling does have side-effects, it causes docker to make additional network requests that might not be desirable. This behavior is not typical of other DCOS packages, nor is it consistent between the containerizers. Please turn it off.

@EronWright
Copy link
Contributor

@mxm LGTM

@asfgit asfgit closed this in e8318d6 Nov 23, 2016
alpinegizmo pushed a commit to alpinegizmo/flink that referenced this pull request Nov 28, 2016
Allows via a setting to deploy a base image on that a task manager
runs.

This closes apache#2703.
liuyuzhong pushed a commit to liuyuzhong/flink that referenced this pull request Dec 5, 2016
Allows via a setting to deploy a base image on that a task manager
runs.

This closes apache#2703.
static-max pushed a commit to static-max/flink that referenced this pull request Dec 13, 2016
Allows via a setting to deploy a base image on that a task manager
runs.

This closes apache#2703.
joseprupi pushed a commit to joseprupi/flink that referenced this pull request Feb 12, 2017
Allows via a setting to deploy a base image on that a task manager
runs.

This closes apache#2703.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants