This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ssh root@[前回作ったサーバーのグローバルIP] | |
| Permission denied (publickey). #公開鍵認証しかダメ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ dig web.fe-bc.net. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ vi provision_private_ip.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource sakuracloud_server "serverA"{ | |
| # (省略) | |
| } | |
| resource sakuracloud_server "serverB"{ | |
| # (省略) | |
| } | |
| resource "null_resource" "db_replication" { | |
| triggers{ | |
| # 依存を定義 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| health_check = { | |
| protocol = "http" # or "https" | |
| path = "/" | |
| status = "200" | |
| delay_loop = 120 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export SAKURACLOUD_ACCESS_TOKEN="取得したAPIトークン" | |
| export SAKURACLOUD_ACCESS_TOKEN_SECRET="取得したAPIシークレット" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export ARUKAS_JSON_API_TOKEN=[取得したAPIキー] | |
| export ARUKAS_JSON_API_SECRET=[取得したAPIシークレット] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker ps -a | |
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
| e57a1aca66f3 redis:3.0.5 "/entrypoint.sh redis" About a minute ago Up About a minute 6379/tcp redis.1.f1r7p3b5m3hxvi7ggd14yppxe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream hogehoge { | |
| server [agent01のIP]:20xxx; | |
| server [agent02のIP]:20xxx; | |
| server [agent03のIP]:20xxx; | |
| } | |
| server { | |
| include /etc/nginx/proxy.conf; | |
| server_name hogehoge.nomad.example.com; | |
| location / { | |
| proxy_pass http://hogehoge; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # さくらのクラウド APIキー | |
| $ export SAKURACLOUD_ACCESS_TOKEN=[取得したAPIキー] | |
| $ export SAKURACLOUD_ACCESS_TOKEN_SECRET=[取得したAPIシークレット] | |
| # Arukas APIキー | |
| $ export ARUKAS_JSON_API_TOKEN=[取得したAPIキー] | |
| $ export ARUKAS_JSON_API_SECRET=[取得したAPIシークレット] |