This repository provides a simple Pathway Webservice and Dockerfile.
The provided guidelines showcase how to deploy this application on GCP using Google Cloud Run, but it can be deployed on any platform supporting containers.
Check out our deployment tutorials to learn more.
Google Cloud Platform (GCP) is a suite of cloud computing services from Google, providing a comprehensive infrastructure to deploy and manage applications of all kinds. You will learn how to deploy your Pathway application to GCP using Cloud Run, a compute platform that lets you run containers on scalable infrastructue.
The entire process is as easy as deploying any dockerized application.
- Google account
- GitHub account
- Fork of this repository
Regardless of whether you use a Gmail or Google Workspace account, you can test Cloud Run for free. Google may require billing information, but you will not be charged after the trial period.
The first step is to create a Google Cloud project at GCP Console
- Choose friendly name of your project and click
Create
Now that you have your project ready, go to Cloud Run. Make sure your newly created project is selected in top left corner.
- Click on the "Create Service" button
- Select "Continuously deploy from a repository" and click on "Set up with Cloud Build":
- Point to the repository with the fork of the demo project and click "Next" button:
Note: Google may prompt you to enable additional APIs. In such case simply click Enable and wait for a short time. If you are not authenticated already, choose Github as the repository provider and authenticate.
- Choose "Dockerfile" as a build type and save the changes:
Note: if you are using custom repository, you can adjust Dockerfile path.
- Select "Allow unauthenticated invocations" as an authentication type:
- Under container resources section, increase memory to at least 1 GiB and click "Create":
Once your app has been deployed, you will see a green mark next to the project name. You can now copy the URL of your service and test it with CURL.
curl -X POST -d '{"input": "hello, world"}' <YOUR-URL>
You can learn more about this example on GitHub.
You have successfully deployed a sample Pathway application using Cloud Run. You can now adjust the Pathway pipeline by modifying app.py. Once you are ready, commit and push your changes. Cloud Build will automatically detect your changes and start deploying the new version. You can monitor this process under the revisions tab.
If you were only testing your web service and wish to delete it, go to Cloud Run, select your service, and click the "Delete" button.