9. DigitalOcean
“ We’re simplifying the cloud by providing
an infrastructure experience that developers love.”
( twitter profile @digitalocean )
私達は開発者が好むインフラのユーザ経験を提供することで
クラウドを簡素化する
10. Who is DigitalOcean for?
“ DigitalOcean is a platform created for developers
who need to launch and scale their applications quickly.
Additionally, DigitalOcean provides the perfect environment
for developers to play around on the command line
and learn more about customizing their own servers”
( https:/ / www.digitalocean.com/ help/ )
DigitalOceanは、アプリケーションを迅速に起動してスケールする
必要がある開発者向けに作られたプラットフォームです。もう1つ。
DigitalOceanが提供するのは、開発者がコマンドライン上から操作でき、
自分自身のサーバーをカスタマイズする方法を学ぶための完全なる環境です。
14. シンガポール
Equinix
ニューヨーク
Equinix, Telx
サンフランシスコ
Telx
ロンドン
Equinix
アムステルダム
TelecityGroup
- NYC1 facility is SSAE16 SOC-1 Type II certified.
- NYC2 facility is SSAE16 SOC-2 Type II certified.
- NYC3 facility is SSAE16 SOC-2 and SOC-3 compliant.
- AMS1 and AMS2 facilities are ISO27001:2005 and ISO9001 certified.
- AMS3 facility is ISO9001, ISO27001, and SSAE16 Type II certified
- SFO1 facility is SSAE16 SOC-1 Type II certified.
- SGP1 facility is ISO27001:2005 certified.
- LON1 facility is ISO9001:2008, ISO27001, and SSAE16 / ISAE 3402 certified.
15. 今日から始める DigitalOcean
15 / 99
• 55秒以内に仮想サーバ起動
使いたいとき、すぐに起動して、使い終わったら廃棄。かつ課金は時間単位 $0.007/時間~(月上限 $5 ~)
• 全ての環境が SSD ( Solid State Drive )
低いディスクのレイテンシ(応答速度の遅延)、かつ、CPUはディスクI/Oに使用率を奪われにくい
• シンプルなコントロールパネルと API
直感的に使えるウェブ・インターフェース、豊富な API はブラウザから行える全ての機能をプログラム的に実行
DigitalOcean 特長
73. 今日から始める DigitalOcean
73 / 99
• ログインユーザは「 core 」なので注意
CoreOS にログイン
$ ssh -l core 128.199.237.114
The authenticity of host '128.199.237.114 (128.199.237.114)' can't be established.
RSA key fingerprint is 02:59:20:26:64:f9:e2:96:13:f6:22:a7:05:ee:2b:6b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '128.199.237.114' (RSA) to the list of known hosts.
CoreOS stable (607.0.0)
core@coreos ~ $
これだけで、直ぐに docker
fleet, etcd が使えます
74. 今日から始める DigitalOcean
74 / 99
• ログインユーザは「 core 」なので注意
CoreOS にログイン
$ ssh -l core 128.199.237.114
The authenticity of host '128.199.237.114 (128.199.237.114)' can't be established.
RSA key fingerprint is 02:59:20:26:64:f9:e2:96:13:f6:22:a7:05:ee:2b:6b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '128.199.237.114' (RSA) to the list of known hosts.
CoreOS stable (607.0.0)
core@coreos ~ $
core@coreos ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
core@coreos ~ $ docker run -it centos /bin/bash
Unable to find image 'centos:latest' locally
511136ea3c5a: Pull complete
b6718650e87e: Pull complete
493bab5fff45: Pull complete
9dbcac75201e: Pull complete
centos:latest: The image you are pulling has been verified. Important: image verification is a tech preview
feature and should not be relied on to provide security.
Status: Downloaded newer image for centos:latest
[root@6c00e23717a7 /]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@6c00e23717a7 /]# core@coreos ~ $
core@coreos ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
6c00e23717a7 centos:latest "/bin/bash" 20 seconds ago Up 20 seconds
stupefied_mclean
これだけで、直ぐに docker
fleet, etcd が使えます
応用:kubernetes クラスタを構築する方法
How To Install and Configure Kubernetes on top of a CoreOS Cluster | DigitalOcean
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-kubernetes-on-top-of-a-coreos-cluster
94. $ ./terraform show ./terraform.tfstate
digitalocean_droplet.web:
id = 4796394
image = centos-6-5-x64
ipv4_address = 128.199.91.76
ipv4_address_private = 10.130.137.240
locked = false
name = terraform.zem.jp
private_networking = true
region = sgp1
size = 512mb
ssh_keys.# = 1
ssh_keys.0 = 737302
status = active
$ ssh -l root 128.199.91.76
The authenticity of host '128.199.91.76 (128.199.91.76)' can't be established.
RSA key fingerprint is d3:a7:64:79:49:53:ca:66:d3:05:43:63:9e:d1:17:93.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '128.199.91.76' (RSA) to the list of known hosts.
reverse mapping checking getaddrinfo for terraform.zem.jp [128.199.91.76] failed - POSSIBLE BREAK-
IN ATTEMPT!
[root@terraform ~]# hostname
terraform.zem.jp
95. $ ./terraform destroy -var "do_token=${TOKEN}"
Do you really want to destroy?
Terraform will delete all your managed infrastructure.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
digitalocean_droplet.web: Refreshing state... (ID: 4796394)
digitalocean_droplet.web: Destroying...
digitalocean_droplet.web: Destruction complete
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
Terraformは環境を構築するだけでなく、変更や破棄 (destroy)を
迅速かつ確実にこなします。DigitalOceanの他にAWSやGCE等にも対応