简体   繁体   English

使用Admin API的Google Cloud Appengine标准环境部署:“无法找到导入”错误

[英]Google cloud Appengine standard environment deployment using Admin API: “Cant find import” Error

I am trying to deploy a simple "hello world" application in Appengine standard - Go environment. 我正在尝试在Appengine标准-Go环境中部署一个简单的“ hello world”应用程序。 There is one source file hello.go with one import "google.golang.org/appengine" 有一个源文件hello.go和一个导入文件“ google.golang.org/appengine”

I followed the documentation here to use the Admin API for deployment. 我按照此处的文档使用Admin API进行部署。 But I got "can't find import: google.golang.org/appengine" error when I checked the status of the deployment. 但是当我检查部署状态时,出现“找不到导入:google.golang.org/appengine”错误。

So I uploaded the google.golang.org library folder to Cloud Storage, but documentation seems to only show how to include single files separately from GCS buckets, which is not feasible for big imported libraries. 因此,我将google.golang.org库文件夹上载到了Cloud Storage,但是文档似乎只显示了如何从GCS存储桶中单独包含单个文件,这对于大型导入的库而言是不可行的。

I know all this will work with "gcloud app deploy", but I have to use the Admin API and standard environment. 我知道所有这些都可以与“ gcloud app deploy”一起使用,但是我必须使用Admin API和标准环境。

  • Is there a way to tell Appengine to "go get" imported libraries? 有没有办法告诉Appengine“获取”导入的库?
  • Is there a way to include folders (not single files) from GCS bucket in deployment config files? 有没有办法将GCS存储桶中的文件夹(不是单个文件)包含在部署配置文件中?

The deployment works with gcloud because the appengine library is present in your GOPATH. 该部署可与gcloud一起使用,因为您的GOPATH中存在appengine库。 gcloud fetches them from there. gcloud从那里获取它们。

In the case of the deployment using Admin API, in order to not include one per one all files from your libraries, the packages need to be present in Google Cloud Storage for ZIP deployment or you can use Cloud Source Repositories , build it with the CREATE call and then deploy it from a container with the Cloud Build image. 在使用Admin API进行部署的情况下,为了不包含库中所有文件的一个一个,这些软件包必须存在于Google Cloud Storage中以进行ZIP部署,或者您可以使用Cloud Source Repository ,并使用CREATE进行构建调用 ,然后从带有Cloud Build映像的容器中部署它

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 node.js 标准环境在 AppEngine 上找不到模块 @google-cloud/firestore - Cannot find module @google-cloud/firestore on AppEngine using node.js standard environment 使用 Google Cloud AppEngine 管理 API 通过 Python 创建请求? - Using Google Cloud AppEngine admin API to create request with Python? 在python flex环境中导入错误google.appengine.api - Import error google.appengine.api in python flex environment 在AppEngline上运行时,将Cloud Firestore与AppEngine Go标准环境配合使用会返回rpc错误 - Using Cloud Firestore with AppEngine Go Standard Environment returns rpc error when running on AppEngline 单元测试为Google AppEngine灵活环境编写的python 3.x代码并使用Cloud Datastore Api - Unit testing a python 3.x code written for Google AppEngine flexible environment and using Cloud Datastore Api 部署到Google Appengine时发生内部错误 - Internal error on deployment to google appengine 将 Java Google AppEngine 本地标准服务器连接到云数据库 | appengine-api-1.0-sdk-1.9.84.jar | IntelliJ 和云代码 - Connect Java Google AppEngine Local Standard Server to Cloud DB | appengine-api-1.0-sdk-1.9.84.jar | IntelliJ & Cloud Code Google Cloud appengine 部署:未找到应用 - Google Cloud appengine deployment: No app found 使用 appengine “django.core.exceptions.ImproperlyConfigured:设置 SECRET_KEY 环境变量”在 Google 云上部署 Django 应用程序时出错 - Error in deploying Django app on Google cloud using appengine "django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable" 在AppEngine上使用谷歌云端点 - Using google cloud endpoints on AppEngine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM