1
我有一个python API,通过bdutil和gcloud命令与现有的Google Compute Engine集群交互。我试图在Google App Engine上运行这个API,并且在bdutil和gcloud命令的子进程和os系统执行过程中遇到了一些问题。例如,当本地运行如何在Google App Engine上使用Python中的bdutil和gcloud?
proc = subprocess.Popen(["gcloud compute instances list"],
stdout=subprocess.PIPE, shell=True)
out = proc.communicate()
返回活跃GCE实例的列表,但是当GAE运行失败,
AttributeError: 'module' object has no attribute 'Popen'
。
我知道第三方库必须包含在GAE项目中。我也知道上述命令也可能无法应付认证问题。如果可能的话,我正在寻求一个非常详细的新手关于如何在GAE实例上导入,验证和执行bdutil和gcloud命令的指令或“hello world”示例。