Skip to content

An experiment in deploying Smalltalk application directly to the cloud, from the image, without touching any files

License

Notifications You must be signed in to change notification settings

psvensson/cloudsdk-st

Repository files navigation

cloudsdk-st

A tool for deploying Smalltalk application directly to the cloud, from the image, without touching any files. Currently supporting deploy to Google Cloud and to Google Cloud Run cloud functions (lambdas) and Google Compute Engine VMs.

If deploying to Compute Engine, you need to manually add a rule for your project's firewall to allow traffic to the VM. The VM wil be tagged with both 'pharo' and the individual name of the deployment, so if you add a rule targeting the 'pharo' tag, it will work for all VM deployments.

There is a blog post with more details and screenshots that describes the onboarding process in more detail here; (https://unclescript.blogspot.com/2020/03/a-cloud-sdk-for-pharo-smalltalk.html).

Installation

If you had a previous installation, please delete the directory ~/Pharo/Images/{your image}/pharo-local/iceberg/psvensson to make sure that you get any new stuff. Thx.

Tested for Pharo 8. Does not work with Pharo 9 yet.

Metacello new
    repository: 'github://psvensson/cloudsdk-st:master';
    baseline: 'CloudConversations';
    load

Prerequisites

You might need to add the cloud build service account a a member to the service account you're using, to be able to deploy to Cloud Run. See How to manage Google IAM. See https://cloud.google.com/cloud-build/docs/securing-builds/set-service-account-permissions

How to use

Opening application (from playground):

CCMainWindow open

Add at least one service account key (from file or pasting) by pressing the 'New Account' button. Nothing works before this is done.

In the 'Docker templates' pane is a list of templates for creating custom Docker images of Pharo 7 with the options to add extra packages and edit the startup script (load file).

When done editing a template, press 'Create Container'. This will use Google Cloud Build to both create a Docker image of the tamplte and then deploy it to Google Cloud Run as a cloud function. The process usually takes 1-2 minutes. You can follow the build process in the Google Cloud Console here; (https://console.cloud.google.com/cloud-build/builds)

The button 'Containers' list Docker containers and the button 'Build results' lists the results of all builds, including failed ones. The 'Deployments' button, finally, lists finished running cloud functions and the 'url' property in the details is the ulr where the cloud function can be accessed. You can also see and manage the cloud function directly in the Google Cloud Console here; (https://console.cloud.google.com/run)

About

An experiment in deploying Smalltalk application directly to the cloud, from the image, without touching any files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published