Deploying your Flink job
Deploying
To deploy a Flink job on Immerok Cloud you only need to create a Job resource. The Job references an Artifact that contains your Flink Program.
Job Creation via create
The easiest way to create a Job (and Artifact) is via rok create job
.
The only mandatory information you need to provide is a name for the Job and the path to a file to create this Artifact from.
The file should be in the local filesystem or accessible via http(s).
_8$ rok create job my-job --file my-job.jar_8_8👀 Creating new Artifact "my-job"._8✔ Created new resource._8✔ Uploaded [100% (15 MiB/15 MiB)]_8_8👀 Creating a new Job._8✔ job.core/my-job has been created.
The rok create job
command offers additional flags to configure your Job during creation, like --rpus
to set the number of RPUs (Rok Processing Units) for the Job.
You can also create the Artifact and Job separately via rok create artifact
and rok create job --artifact <artifact_name>
.
Job Creation via apply
rok apply
allows you to idempotently create and modify Immerok Cloud resources.
With rok apply
you control the full configuration of the Job resource and can easily manage your Immerok Cloud resources via GitOps and similar approaches to CI/CD.
_9$ rok create artifact my-job-artifact \_9 --flink-version 1.15 \_9 --zone shared-aws-us-east-1 \_9 --type JAR \_9 --from-file my-job.jar_9_9✔ Created new resource._9✔ Uploaded [100% (15 MiB/15 MiB)]_9✔ artifact.core/my-job-artifact has been created.
_3$ rok apply -f job.yaml_3_3✔ job.core/my-job has been created.