60. $ sudo ~/.nave/nave.sh usemain stable
[sudo] password for tanaka:
######################################################################## 100.0%
installed from binary
$ sudo npm install -g sacloud
$ sacloud config --apiRoot="https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1/"
/home/tanaka/.sacloudcfg.json:
{
"apiRoot": "https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1/"
}
$ sacloud config --accessToken=APIKEY --accessTokenSecret=SECRET
/home/tanaka/.sacloudcfg.json:
{
"apiRoot": "https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1/",
"accessToken": “APIKEY",
"accessTokenSecret": “SECRET"
}
$ sacloud show server
GET https://secure.sakura.ad.jp/cloud/zone/is1a/api/cloud/1.1/server.json?{} -> 200 OK (1/1) ~1.539sec
+--------------+--------------------+--------+---------------------+
| id
| name
| status | created at
|
+--------------+--------------------+--------+---------------------+
| 112400226821 | gitサーバ1
| up
| 2012-05-07 00:19:44 |
+--------------+--------------------+--------+---------------------+
| 112500271369 | www2
| up
| 2013-06-20 00:27:33 |
+--------------+--------------------+--------+---------------------+
| 112400258152 | rp1
| up
| 2012-05-28 15:35:11 |
60
61. $ sacloud show server --csv
id,name,status,created at
112400226821,gitサーバ1,up,2012-05-07 00:19:44
112500271369,www2,up,2013-06-20 00:27:33
112400258152,rp1,up,2012-05-28 15:35:11
112500271375,www1,up,2013-06-20 00:29:42
112500271998,www3,up,2013-06-20 06:58:37
112500272024,www4,up,2013-06-20 07:09:54
$ sacloud show server --tsv
id name status created at
112400226821 gitサーバ1 up 2012-05-07 00:19:44
112500271369 www2 up 2013-06-20 00:27:33
112400258152 rp1 up 2012-05-28 15:35:11
112500271375 www1 up 2013-06-20 00:29:42
112500271998 www3 up 2013-06-20 06:58:37
112500272024 www4 up 2013-06-20 07:09:54
61
72. 10/25 – アプリケーションの修正
Server 4
アプリサーバ
Server 5
アプリサーバ
Server 3
DBサーバ
現行環境
ロード
バランサー
アプリケーションの修正のためServer4とServer5を新規に立ち上げ
72
73. 10/25 – アプリケーションの修正
Server 4
アプリサーバ
ロード
バランサー
Server 5
アプリサーバ
Server 3
DBサーバ
古い環境
1/15 – DBサーバーにセキュリティパッチ適用
Server 4
アプリサーバ
Server 5
アプリサーバ
Server 6
DBサーバ
現行環境
DBサーバにセキュリティパッチをあてるべくServer6を立ち上げ
73
74. 10/25 – アプリケーションの修正
Server 4
アプリサーバ
ロード
バランサー
Server 5
アプリサーバ
Server 3
DBサーバ
古い環境
1/15 – DBサーバーにセキュリティパッチ適用
Server 4
アプリサーバ
Server 5
アプリサーバ
Server 6
DBサーバ
現行環境
3/1 – アプリサーバの設定変更&増設(予定)
Server 7
アプリサーバ
Server 8
アプリサーバ
Server 9
アプリサーバ
Server 6
DBサーバ
新しい環境
新しい環境をつくり、テストを開始
74
75. ロード
バランサー
1/15 – DBサーバーにセキュリティパッチ適用
Server 4
アプリサーバ
Server 5
アプリサーバ
Server 6
DBサーバ
古い環境
3/1 – アプリサーバの設定変更&増設
Server 7
アプリサーバ
Server 8
アプリサーバ
Server 9
アプリサーバ
Server 6
DBサーバ
現行環境
どんどん、新しい環境へ切り替えて、古い環境は捨てる
75