In this section, we’ll briefly describe how to get started with Application Manager. We’ll be using the REST API, which you can interact with via various tools such as
curl requests, Postman (or similar), or via the Swagger Web Client, to name just a few.
The goal of the quick start is to create a Deployment which is the main resource managed by Application Manager.
Creating a Deployment¶
The main abstraction of Application Manager is a Deployment that represents a stateful streaming application. You manipulate this resource in order to evolve your application over time, including upgrades of your user code and Flink version.
Deployments are mainly specified via:
- Desired State: the desired state of a Deployment specifies whether it should be running, cancelled, or suspended.
- Artifact: the artifact specifies what to execute as your application.
- Configuration: Parallelism and other arguments specify how to execute your application.
Example: Creating a Deployment
kind: Deployment metadata: name: TopSpeedWindowing Example labels: env: testing spec: state: cancelled deploymentTargetId: 57b4c290-73ad-11e7-8cf7-a6006ad3dba0 startFromSavepoint: kind: latest upgradeStrategy: kind: stateless template: spec: artifact: kind: jar flinkVersion: 1.6 jarUri: http://repo1.maven.org/maven2/org/apache/flink/flink-examples-streaming_2.11/1.6.0/flink-examples-streaming_2.11-1.6.0-TopSpeedWindowing.jar parallelism: 1
This will create a Deployment in desired state cancelled, the artifact to be executed is Flink’s built-in TopSpeedWindowing example, and it would be executed with a parallelism of 1.