Google, Here We Come!
Sigma IDE now supports Google Cloud Platform
And we are, too.
What the heck does that mean?
To be extra honest, there’s nothing new so far. Sigma could interact with GCP (and any other cloud service, for that matter) right from the beginning; we just didn’t have the scaffolding to make things easy and fun — the nice drag-n-drops and UI pop-ups, and the boilerplate code for handling credentials.
Now, with the bits ’n’ pieces in place, you can drag, drop and operate on your GCP stuff right inside your Sigma project!
(*) Conditions apply
Of course, there are some important points (well, let’s face it, limitations):
- GCP access is confined to one project, meaning that all cloud resources accessed in a Sigma project should come from a single GCP project. You can, of course, work around this by writing custom authorization logic on your own, but drag-n-drop stuff will still work only for the first project you configured.
- You can only interact with existing resources, and just as operations (no trigger support). New resource creation and trigger configurations require deeper integration with GCP, which will become available soon (fingers crossed).
- Only a handful of resource types are currently supported — including Storage, Pub/Sub, Datastore, and SQL. These should, however, cover most of the common scenarios; we are hoping to give more attention to big data and machine learning stuff in the immediate future — which Google also seems to be thriving upon — but feel free to shout out so we can reconsider our strategy!
So, where can I get this thing?
- Open up your Sigma project (or create a new one, if you haven’t already).
- You’ll notice a new set of buttons at the top of the Resources pane; click on GCP Resources (the second one, with the GCP logo).
- Now you can provide a service account key from the desired GCP project to access its resources via Sigma. Click Authorize, paste the JSON service account key, and press Save.
- The Resources pane will now display the available GCP resource types. You can drag-n-drop them into your code, configure new operations and edit existing ones, just like you would do with AWS resources.
(Disclaimer: The list you see may differ, depending on how old this post is.)
But you said there’s nothing new!
How could I have done this earlier?
Well, if you look closely, you’ll see what we do behind the scenes:
- We have two environment variables,
GCP_PROJECT_ID, which expose the GCP project identity and access to your Sigma app.
- Sigma has an
Authorizerfile that reads this content and configures the
googleapisNodeJS client library, using them as credentials.
- Your code imports
Authorizer(which runs the abovementioned configuration stuff), and invokes operations via
googleapis, effectively operating on the resources in your GCP project.
See? No voodoo.
Of course, back in those days, you won’t have seen the cool UI pop-ups or the drag ’n’ drop capability; so we’ve had to do a bit of work, after all.
Not cool! I want more!!
Relax, the really cool stuff is already on the way:
- Ability to define new GCP resources, right within the IDE (drag-drop-configure, of course!)
- Ability to use GCP resources as triggers (say, fire a cloud function via a Cloud Storage bucket or a Pub/Sub topic)
And, saving the best for the last,
- Complete application deployments on Google Cloud Platform!
- A complete cross-cloud experience: operating on AWS from within GCP, and vice versa!
- With other players (MS Azure, Alibaba Cloud and so forth) joining the game, pretty soon!
So, stay tuned!
Originally published at randomizd.blogspot.com on July 16, 2018.