GitHub user jgrier opened a pull request:
https://github.com/apache/flink/pull/3205
[FLINK-5635] Improve Docker tooling to make it easier to build images and
launch Flink via Docker tools
Improvements for Docker on Flink experience.
This PR depends on this other one:
https://github.com/apache/flink/pull/3204
- Modifying Dockerfile to allow building from local flink-dist as well as
release URLs
- Making image name configurable so it's easier for user's to use this to
build an publish their own images
- Logging to stdout rather than just files
- Adding scripts to deploy seamlessly on Docker Swarm without host
networking
- Updating Docker Compose scripts to work correctly for deploying locally
- Generally parameterizing things so these Docker scripts are more
generally useful and self-documenting
- Provides options so that you can deploy multiple Flink services with
unique names on Docker Swarm
- This should all work well with the new Docker "stack" stuff as well.
Example usage:
```
# Build a Docker image from your local flink build
./build.sh --from-local-dist --image-name "dataartisans/flink"
```
```
# Build a Docker image from an official release
./build.sh --from-release --flink-verison 1.2.0 --hadoop-version 2.7
--scala-version 2.11 --image-name "dataartisans/flink"
```
```
# Run with Docker Compose
docker-compose up -d
docker-compose scale taskmanager=4
```
```
# Run on Docker Swarm
./create-docker-swarm-service.sh --image-name "dataartisans/flink"
my-flink-service my-flink-port
```
```
# Shut down
./remove-docker-swarm-service.sh --image-name "dataartisans/flink"
my-flink-service
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jgrier/flink release-1.2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/3205.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3205
----
commit d380e98b397c770ee4b7eb9e4abb2387e7672d4c
Author: Jamie Grier <[email protected]>
Date: 2017-01-21T00:12:17Z
Improvements for Docker on Flink experience.
Modifying Dockerfile to build from local flink-dist as well as release URLs.
Logging to stdout.
Adding scripts to deploy seamlessly on Docker Swarm.
Updating Docker Compose scripts to work correctly.
Parameterizing things so these Docker scripts are more generally useful.
commit 962290ab66d993cac4c4e233a017feb8a6eb1cc5
Author: Jamie Grier <[email protected]>
Date: 2017-01-21T00:14:27Z
Adding flag to flink-daemon.sh and related scripts so that we can actually
log to the console -- which is better for Docker environments.
commit 66c2133ede0ed9914baba2fe7b93f1b9d585ede2
Author: Jamie Grier <[email protected]>
Date: 2017-01-25T05:45:23Z
Adding Apache license to new files.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---