简体   繁体   English

Google容器引擎节点可以访问数据存储区吗?

[英]Can a Google Container Engine node access Datastore?

I've built systems on top of Google's App Engine and leveraged Google's Datastore, but for my new project I'm considering a containerized solution (using Google's Container Engine). 我已经在Google App Engine之上构建了系统,并利用了Google的数据存储,但是对于我的新项目,我正在考虑使用容器化解决方案(使用Google的Container Engine)。 Does anyone with experience using both technologies together know: 有使用过这两种技术的经验的人是否知道:

  1. if this is possible to use Container Engine with Datastore? 是否可以在数据存储中使用容器引擎?
  2. if it's easy to set up a local containerized dev environment with gcd? 用gcd设置本地容器化开发环境是否容易?
  3. if there are some serious headaches I should consider before going down this route? 如果在走这条路线之前我应该​​考虑一些严重的头痛?
  1. Absolutely! 绝对! You can run any code you want in Container Engine, and if you add the datastore scope to your cluster when you create it, authentication to the Datastore API will be automatic if you're using Datastore's client libraries or tools. 您可以在Container Engine中运行所需的任何代码,如果在创建集群时将datastore范围添加到集群中,则在使用数据存储的客户端库或工具时,对数据存储API的身份验证将自动进行。

  2. I'm not familiar with the local gcd environment, so I can't help much here. 我对本地gcd环境不熟悉,所以在这里我无济于事。 Testing Docker containers locally before pushing them to the cloud works great, so the only question will be making sure the gcd dev environment can be exposed to your local containerized app. 在将Docker容器推送到云之前对其进行本地测试非常有效,因此唯一的问题是确保gcd开发环境可以暴露给本地容器化的应用程序。

  3. The dev environment is the one issue I'm not sure of. 开发环境是我不确定的一个问题。 Using Datastore from Container Engine should work fine. 从Container Engine使用数据存储应该可以正常工作。

  1. What I have done is just created a service account and use the json key to access datastore when I am working locally. 我所做的只是创建了一个服务帐户,并在本地工作时使用json键访问数据存储区。 It seems to work pretty well. 看来效果很好。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM