How to run an External Adapter on GCP

Learn how to setup and run an external adapter on Google Cloud Platform / Google Cloud Functions

Published 21st February 2019 • Updated 21st February 2019
Share this guide:

This guide presumes that you have a Chainlink node running, an active and funded GCP account and your adapter supports GCP cloud functions.

Note: Before starting on this guide, make sure you have prepared a ZIP file for serverless execution. You can follow our guide here: Prepare external adapter for AWS/GCP.

Optional  Create a new Project

The first time you get started with Google Cloud Platform (or if you want to create a new project for Chainlink activities), you will be asked to create a new project. Go ahead and give it a name that makes sense and select "No organization".

Create new project form

As long as your account is funded, we are now ready to proceed with the setup for your adapter!


Step 1  Create a new Cloud Function

From the top left "burger menu", click on Cloud Functions (under the COMPUTE section) and Create function.

Note: On the first visit, you will be asked to enable API for Google Cloud Functions. Click Enable API.

You will be presented by a form. You have to make some changes, but default for most options should be fine.

Name
Give your function a name that makes sense, so you remember it's purpose.
Memory allocated
Default is usually fine. You can increase this if your adapter requires a lot of memory.
Trigger
Set this to HTTP, and save the URL that is displayed.
Source code
Change to ZIP upload.
Runtime
Set to what's appropriate for your adapter.
ZIP file
Upload the ZIP file you created earlier (Prepare external adapter for AWS/GCP).
Stage bucket
Select a/create new bucket to store your function.
Function to execute
Check with your adapter. Usually gcpservice for Node.js adapters.
Create new cloud function form

That's it! Your external adapter has now been setup and is ready on Google Cloud Functions! You should now be ready to proceed to How to link Chainlink to URL endpoint using the URL for your cloud function.

In case you didn't get the URL for your function, check out the Trigger tab when viewing the function.

Copyright © 2021 Fiews, LLC
Privacy PolicyCookie Policy
AboutAdvertiseAPI