Skip to content

Commit

Permalink
Minor fixes and improvements (#17)
Browse files Browse the repository at this point in the history
* Minor fixes and improvements
* Additional minor fixes
* Moved the sample app to flink-operator ns
  • Loading branch information
yuchaoran2011 authored and anandswaminathan committed Jun 5, 2019
1 parent d1d1176 commit b8ff17d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cache:
directories:
- $GOPATH/pkg/dep
go:
- "1.10"
- "1.12"
services:
- docker
jobs:
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Using go1.10.4
FROM golang:1.10.4-alpine3.8 as builder
FROM golang:1.12.5-alpine3.9 as builder
RUN apk add git openssh-client make curl bash

COPY boilerplate/lyft/golang_test_targets/dep_install.sh /go/src/github.com/lyft/flinkk8soperator/
Expand All @@ -24,6 +23,6 @@ RUN make linux_compile
ENV PATH="/artifacts:${PATH}"

# This will eventually move to centurylink/ca-certs:latest for minimum possible image size
FROM alpine:3.8
FROM alpine:3.9
COPY --from=builder /artifacts /bin
CMD ["flinkoperator"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Operator creates flink clusters dynamically using the specified custom resou

Deploying and managing Flink applications in Kubernetes involves two steps:

* **Building Flink application packaged as a docker image:** A docker image is built containing the application source code with the necessary dependencies built in. This is required to bootstrap the Jobmanager and Taskmanager pods. At Lyft we use Source-To-Image [S2I](https://docs.openshift.com/enterprise/3.0/using_images/s2i_images/index.html) as the image build tool that provides a common builder image with Apache Flink pre-installed. The docker image could be built using any pre-existing workflows at an organization.
* **Building Flink application packaged as a docker image:** A docker image is built containing the application source code with the necessary dependencies built in. This is required to bootstrap the Jobmanager and Taskmanager pods. At Lyft we use Source-To-Image [S2I](https://docs.openshift.com/container-platform/3.11/architecture/core_concepts/builds_and_image_streams.html#source-build) as the image build tool that provides a common builder image with Apache Flink pre-installed. The docker image could be built using any pre-existing workflows at an organization.

* **Creating the Flink application custom resource:** The custom resource for Flink application provides the spec for configuring and managing flink clusters in Kubernetes. The FlinkK8sOperator, deployed on Kubernetes, continuously monitors the resource and the corresponding flink cluster, and performs action based on the diff.

Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $ kubectl logs {pod-name} -n flink-operator
You can find sample application to run with the flink operator [here](/examples/). To run a flink application, run the following command:

```bash
$ kubectl create -f examples/wordcount/flink-operator-custom-resource.yaml -n flink-operator
$ kubectl create -f examples/wordcount/flink-operator-custom-resource.yaml
```

The above command will create the flink application custom resource in kubernetes. The operator will observe the custom resource, and will create a flink cluster in kubernetes.
Expand Down
4 changes: 2 additions & 2 deletions examples/wordcount/flink-conf.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
jobmanager.web.submit.enable: true
jobmanager.web.log.path: /var/log/jobmanager/current

jobmanager.web.upload.dir: /opt/flink

taskmanager.log.path: /var/log/taskmanager/current
taskmanager.exit-on-fatal-akka-error: true
taskmanager.network.memory.max: 2147483648
taskmanager.network.memory.fraction: 0.125

web.upload.dir: /opt/flink

# Akka config
akka.framesize: 20MB
parallelism.default: 1
Expand Down
2 changes: 1 addition & 1 deletion examples/wordcount/flink-operator-custom-resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: flink.k8s.io/v1alpha1
kind: FlinkApplication
metadata:
name: wordcount-operator-example
namespace: flink-operator
annotations:
labels:
environment: development
Expand All @@ -28,4 +29,3 @@ spec:
jarName: "wordcount-operator-example-1.0.0-SNAPSHOT.jar"
parallelism: 3
entryClass: "org.apache.flink.WordCount"

4 changes: 2 additions & 2 deletions integ/operator-test-app/flink-conf.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
jobmanager.web.submit.enable: true
jobmanager.web.log.path: /var/log/jobmanager/current

jobmanager.web.upload.dir: /opt/flink

taskmanager.log.path: /var/log/taskmanager/current
taskmanager.exit-on-fatal-akka-error: true
taskmanager.network.memory.max: 2147483648
Expand All @@ -12,6 +10,8 @@ taskmanager.network.memory.fraction: 0.125
akka.framesize: 20MB
parallelism.default: 1

web.upload.dir: /opt/flink

# State backend config
state.backend: rocksdb
state.checkpoints.num-retained: 4
Expand Down

0 comments on commit b8ff17d

Please sign in to comment.