标签: cloud

gcloud 会显示图像系列选项吗?

我如何获得选项列表image-family?

--image-family IMAGE_FAMILY
    The family of the image that the boot disk will be initialized with. When a family is specified instead of an image, the latest non-deprecated image associated with that family is used.

    By default, debian-8 is assumed for this flag. 
Run Code Online (Sandbox Code Playgroud)

https://cloud.google.com/sdk/gcloud/reference/compute/instances/create

linux cloud vps google-compute-engine gcloud

4
推荐指数
1
解决办法
4524
查看次数

在python中使用azure sdk从VM对象获取IP

我正在尝试从 azure 订阅获取所有 IP(附加到虚拟机)。

我已经使用以下命令拉取了所有虚拟机

compute_client = ComputeManagementClient(credentials, subscription_id)
network_client = NetworkManagementClient(credentials,subscription_id)


 for vm in compute_client.virtual_machines.list_all():
      print(vm.network_profile.network_interface)
Run Code Online (Sandbox Code Playgroud)

但network_profile对象似乎只是一个指针,我已通读文档,但无法弄清楚如何将每个虚拟机链接到其附加的IP地址

我遇到了这个:Is there any python API that can get the IP address (internal or external) of Virtual machine in Azure

但似乎有些事情发生了变化。

仅当我知道 Public_IP 地址对象的名称(并非所有机器都有公共 IP)时,我才能解析机器的 IP。

我需要能够获取此网络接口并解析其上的 IP

python cloud azure

4
推荐指数
1
解决办法
6509
查看次数

Python 创建 Google 存储桶

我正在尝试使用 python 在 Google Cloud 上创建一个存储桶,以自学 Python 和云计算。

我创建了下面的脚本并且运行良好:

"""Creates a new bucket."""
import gcloud
from gcloud import storage

client = storage.Client(project='boot-script-test')

bucket_name = 'test-bucket-7283428'

bucket = client.create_bucket(bucket_name)
Run Code Online (Sandbox Code Playgroud)

我的问题是存储桶是作为我不喜欢的存储类创建的,并且位于错误的“位置”。我询问如何在 Google 网上论坛上指定存储类别和位置,并收到了回复说无法直接使用 Python(?):

https://groups.google.com/forum/#!topic/gce-discussion/s-TJZrYihw0

我的理解是,如果我想要更多地控制云和创建存储桶的命令,我需要使用 JSON 或 XML Api 并以某种方式将它们“适合”我的 python 代码。它是否正确?

使用其中之一与 Google Storage 连接有什么优势吗?

使用 JSON API(例如)是否意味着每次我想做任何涉及与云交互的事情时都需要“编码”请求/帖子并解码响应?

如果我的查询没有多大意义,我很抱歉 - 我对云和 Python 都很陌生!

感谢您的任何帮助!

保罗

python cloud json google-cloud-storage

4
推荐指数
1
解决办法
5713
查看次数

RunKit 如何制作虚拟服务器?

有许多网站提供云编码,例如Cloud9,repl.it. 他们必须使用服务器虚拟化技术。例如,Cloud9 的工作区由 Docker Ubuntu 容器提供支持。每个工作区都是一个完全独立的虚拟机(请参阅详细信息)。

我想知道是否还有其他技术可以制作沙盒环境。例如,RunKit似乎有一个轻量级的解决方案:

它在专为您创建的虚拟服务器上运行完全标准的 Node.js 副本。npm 的 300,000 多个软件包中的每一个都已预先安装,因此请尝试一下

有谁知道 RunKit 是如何实现这一目标的?

cloud virtual-server node.js docker cloud9

4
推荐指数
1
解决办法
1139
查看次数

firebase 云函数 - https.onCall(....) 可以使用 Context.Auth 吗?

我需要建议,因为我从未尝试过这种组合:

  1. firebase 应用程序 + 实时数据库 这个应用程序将成为我的后端并提供一些云功能。
  2. android 应用程序将调用这些云功能。

我想使用 google auth2 身份验证并“保护”仅由 android 应用程序调用的云功能,并且仅当 atuh 有效时。

最好的问候伊万

例如,这是我的“addTickets”场景的云函数:

=== index.js: ===

exports.addTickets = functions.https.onCall((data, context) => {
 // data comes from client app
 const buyingRecord = data;
 console.log(‘buyingRecord: ‘ + JSON.stringify(buyingRecord));

return tickets.updateTicketsAmmount(buyingRecord)
 .then((result)=>{
 tickets.addTicketsBuyingRecord(buyingRecord);
 result.userid = buyingRecord.userid;
 result.ticketsCount = buyingRecord.ticketsCount;
 return result;
 });
});
Run Code Online (Sandbox Code Playgroud)

======门票.js ========

exports.updateTicketsAmmount = function(buyingRecord) {
 var userRef = db.ref(‘users/’ + buyingRecord.userid);
 var amountRef = db.ref(‘users/’ + buyingRecord.userid + ‘/ticketsAmount’);
 return amountRef.transaction((current)=>{
 return (current || …
Run Code Online (Sandbox Code Playgroud)

cloud function oauth firebase

4
推荐指数
1
解决办法
5456
查看次数

GCP:实例创建失败

我最近尝试在 Google Cloud Platform (GCP) 上创建一个实例组,n1-standard-1在 zone 中有 50 个实例us-east1-b,每个实例都有P100GPU。我200在该区域申请并获得了P100 GPU 的批准。My CPU, IP addresses, 和Routes对于该区域以及全局都满足此页面上列出的配额。

但是,现在,我只创建了这 50 个实例中的 21 个,其余实例带有黄色危险标志和随附的警告消息: Instance 'instance-group-1-<name>' creation failed: The zone 'projects/<project>/zones/us-east1-b' does not have enough resources available to fulfill the request. '(resource type:compute)'.

配额页面上是否有任何地方可以让我获得有关compute我忘记询问更多配额的确切信息?不幸的是,错误消息不是很具有描述性。

注意:我怀疑这可能是对超过 Compute Engine API 查询限制访问2000每秒最多查询的引用100。该7 day peak usage列确实显示我在高峰时间超过了它。但是,我的每秒查询数Current Usage少于70查询数1000。当我查看随时间绘制的计算引擎查询使用情况时,看起来我已经2000超过了几个小时的速率限制。但是,实例组仍然无法完全填充到所有50实例。

cloud quota google-compute-engine google-cloud-platform

4
推荐指数
1
解决办法
705
查看次数

Helm v3 在私人仓库中找不到我的图表

我有一个使用 apache 的私有 helm repo,在迁移到 helm3 后,我无法再安装/搜索图表。

使用 helm v3

helm repo list
NAME    URL
mas     http://localhost:8080/charts/

helm search repo mas/devops-openshift
No results found
Run Code Online (Sandbox Code Playgroud)

使用掌舵 2.*

helm search -r mas/devops-openshift
NAME                    CHART VERSION          APP VERSION    DESCRIPTION       
mas/devops-openshift    7.0.0                                 Devops (OpenShift)
Run Code Online (Sandbox Code Playgroud)

使用“helm install”命令时也会发生同样的情况,它找不到图表。

我想这可能与 helm repo 索引文件有关。也许 helmv3 期待不同的结构?但是从 helmv3 生成索引文件时也会发生同样的情况。

cloud charts kubernetes kubernetes-helm

4
推荐指数
1
解决办法
1919
查看次数

不断收到错误消息,指出 localhost 的 Server App Engine Standard 无法启动

尝试在 Eclipse 中启动 Google App Engine 项目时,我不断收到错误消息,说 localhost 的 Server App Engine Standard 无法启动(错误日志如下)。

有没有人以前遇到过这个问题,问题的原因是什么。

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.appengine.tools.development.StreamHandlerFactory (file:/C:/Users/AppData/Local/google/ct4j-cloud-sdk/LATEST/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/impl/appengine-local-runtime.jar) to method java.net.URL.getURLStreamHandler(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.google.appengine.tools.development.StreamHandlerFactory
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jan 05, 2020 3:13:54 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
INFO: Overwriting system property key 'java.util.logging.config.file', …
Run Code Online (Sandbox Code Playgroud)

java eclipse cloud google-app-engine nullpointerexception

4
推荐指数
1
解决办法
944
查看次数

类似于amazon ses的google smtp服务是什么,是gmail smtp吗?

类似于amazon ses的google smtp服务是什么,是gmail smtp吗?我已经使用 amazon ses smtp 通过在我的服务器中进行配置来发送营销电子邮件。所以google有类似的服务,还是和smtp.gmail.com一样?

cloud smtp smtpclient amazon-web-services google-cloud-platform

4
推荐指数
1
解决办法
2107
查看次数

Error when trying to call setData(from: ) in the Cloud Firestore ios API. How can i fix it?

Working in Swift..

I'm trying to call .setData(from: ) to write a Codable struct to a document in the cloud firestore database as outlined in the Firebase docs here to:

https://firebase.google.com/docs/firestore/manage-data/add-data#custom_objects

However, I'm getting the error: "Argument labels '(from:)' do not match any available overloads"

The odd thing is I was able to build and run on the simulator once, and successfully posted a document, but now obviously the compiler is calling this error and causing the build to fail. …

cloud ios firebase swift google-cloud-firestore

4
推荐指数
1
解决办法
742
查看次数