imdigital/magento-serverless-gcp 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

imdigital/magento-serverless-gcp

最新稳定版本:1.0.1

Composer 安装命令:

composer require imdigital/magento-serverless-gcp

包简介

Add Google Cloud functions to the serverless framework

README 文档

README

Magento logo       Google Cloud logo

Google Cloud Functions for the Magento 2 Serverless Framework

This Magento module will extend the Magento 2 serverless framework module allowing us to use Google Cloud Functions.


   


Installation

Requirements


Installing the module and enabling it

To install this module we must run the composer require command requesting its installation:

composer require imdigital/magento-serverless-gcp

Then, enable it by modifying the app/etc/config.php or running the CLI command:

php bin/magento module:enable ImDigital_ServerlessGcp


Serverless function setup

When adding a new serverless function into the serverless_functions database table, we must use gcp as the cloud provider code on the cloud_provider field.

The cloud config field expects a (encrypted) JSON on this format:

{
    "region_id": "us-central1",
    "serviceaccount_key": {
        "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
        "auth_uri": "https://accounts.google.com/o/oauth2/auth",
        "client_email": "my-service-account-email",
        "client_id": "my-client-id",
        "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/my-cert-url",
        "private_key": "my-private-key",
        "private_key_id": "my-private-key-id",
        "project_id": "my-gcp-project-id",
        "token_uri": "https://oauth2.googleapis.com/token",
        "type": "service_account"
    }
}

The region_id is the region where the cloud function is hosted. The serviceaccount_key field is a service account that we must create, and then generate a JSON service account key with access to execute the functions.

These are the permissions you must add to your service account in order to be able to execute cloud functions:


Service Account permissions
Service account permissions

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2023-03-06