使用传统的HTTP请求以更大的灵活性管理水滴. 使用curl命令执行任意数量的操作或请求,或使用188BETAPP的官方API包装器, 包括创建多个液滴, 调整, 重新启动, 启用备份, 和更多的.
API文档droplet = DropletKit:: droplet.new(
names: ['sub-01.例子.com', “sub-02.例子.com'],
地区: 'nyc3',
size: '1gb',
image: “ubuntu-14-04-x64”,
ipv6: true,
tags: ["web"]
)
client.滴.create_multiple(滴)
curl - h “application / json内容类型: \
-H “授权:持有人b7d03a6947b217efb6f3ec3bd3504582” \
-d '{"names":["sub-01.例子.com",“sub-02.例子.com"],“地区”:"nyc3","size":"1gb",“图像”:“ubuntu-14-04-x64”}' \
- x的帖子 “http://api.mediterraneanroots.com/v2/滴”
都会:= &godo.DropletMultiCreateRequest {
名字:[]string{"sub-01.例子.com",“sub-02.例子.com"},
Region: "nyc3",
Size: "1gb",
图片:戈蓝.DropletCreateImage {
Slug: “ubuntu-14-04-x64”,
},
IPv6: true,
标签:[]string{"web"},
}
doctl 计算液滴创建 "sub-01.例子.com" “sub-02.例子.com" \
--region nyc3 --size 1Gb——image ubuntu-14-04-x64 ——enable-ipv6
使用Terraform像对待代码一样对待您的基础设施. Create, manage, 并操作包括物理机器在内的资源, VMs, 网络交换机, 容器, etc.
探索Hashicorp Terraform集成资源“digitalocean_tag”“web”{
name = "web"
}
资源“digitalocean_droplet”“web”{
count = 2
image = “ubuntu-14-04-x64”
name = “子- ${计数.索引+ 1}.例子.com"
region = "nyc3"
size = "1gb"
ipv6 = true
tags = [“$ {digitalocean_tag.web.id}"]
}
DC/OS(数据中心操作系统)是开源的, 基于Apache Mesos分布式系统内核的分布式操作系统. DC/OS manages multiple machines – in the cloud or on-site – from a single interface; it also deploys 容器, 分布式服务, 将遗留应用程序导入这些机器并提供网络, 服务发现, 以及资源管理,以保持服务的运行和相互通信.