1. Home
  2. Docs
  3. Chainlink Adapters
  4. External Adapter on GCP

External Adapter on GCP

Originally Published @ https://chainlinkadapters.com/guides/run-external-adapter-on-gcp

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 the 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 a 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 set up 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.

Was this article helpful to you? Yes No

How can we help?