Skip to main content

Python deployment

Overview​

Ververica Cloud allows you to run Python Deployments. This topic describes how to quickly set up a Python Deployment, run it, and view the outputs in Ververica Cloud.

Prerequisites​

You must have created an existing account and workspace (for example by following the steps in Get started).

Step 1: Prepare the Python and input data for testing​

You need to download the following files to be used in this tutorial:

Step 2: Upload the artifact files​

To upload the artifact files:

  1. On your Dashboard page, do one of the following:

    • Click name of the workspace that you created in Set up your free trial account.
    • Click the triple dots at the end of the workspace entry and select Open Console.
  2. In the module navigation panel, display the Artifacts module.

    image

  3. To upload the artifacts, do one of the following:

    • Click Upload Artifact, navigate to and select the downloaded files, then click Open.
    • Drag the artifact files from the download location into the Artifacts table.

    The artifacts will be listed as follows:

    image

Step 3: Create a Python deployment​

To create the Python deployment:

  1. In the module navigation pane of the Console, click Deployments > Create Deployments.

    image

    The Create Deployment form will be displayed:

    image

  2. Fill in the Create Deployment form as follows (you might need to scroll down to see all the options):

    image

    • Deployment Type: PYTHON
    • Deployment Name: Enter word-count-streaming-test-py for this tutorial.
    • Engine Version: Leave this set to the default version.
    • PYTHON URI: Click in the field and select the word_count_streaming.py from the list. (Note: Console will fill in the required URI when you select the Python file.)
    • Entry Module: Leave blank.
    • Entry Point Main Arguments: --input /flink/usrlib/Shakespeare.txt
    • Python Libraries: Leave blank
    • Python Archives: Leave blank
    • Additional Dependencies: Click in the field and select the Shakespeare.txt from the list.
    • Description: Leave blank for this tutorial.
    • Label: Leave blank for this tutorial.
  3. Click Deploy. The deployment will be listed. Until you start the deployment, it will be listed as CANCELLED (i.e. not running). image

Step 4: Start the deployment​

To start the deployment:

  1. To the right of the deployment name, click Start in the Actions column.

  2. Fill in the startup option information. For this tutorial, use the default settings:

  3. Click Start.

    Initially, the state will be STARTING. image After the deployment is started, the deployment status changes to RUNNING.

Step 5: View the results​

To view the results:

  1. On the Deployments page, click the name of the Deployment.

  2. Display the Diagnostics > Logs tab.

  3. On the Running Task Managers tab, click the value in the Path, ID column. image

  4. Under the Log List tab, click the flink*.out file and you will see the results.

    image
    image