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-machine ip sakura01 |
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接続 | |
| $ docker-machine ssh sakura01 | |
| # PPA追加 | |
| $ sudo apt-get install software-properties-common | |
| $ sudo add-apt-repository ppa:linbit/linbit-drbd9-stack | |
| $ sudo apt-get install drbdmanage-docker-volume |
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
| # ApacheベースのPHPコンテナを利用 | |
| FROM php:apache | |
| # contentsディレクトリ配下をドキュメントルートへ配置 | |
| ADD contents/ /var/www/html/ |
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
| package main | |
| import ( | |
| "net/http" | |
| "github.com/bfirsh/go-dcgi" | |
| "github.com/docker/engine-api/client" | |
| "github.com/docker/engine-api/types/container" | |
| ) |
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
| func resourceSakuraCloudServer() *schema.Resource { | |
| return &schema.Resource{ | |
| // 以下は通常のリソースとしてCRUDを定義 | |
| Create: resourceSakuraCloudServerCreate, | |
| Update: resourceSakuraCloudServerUpdate, | |
| Read: resourceSakuraCloudServerRead, | |
| Delete: resourceSakuraCloudServerDelete, | |
| // インポートをサポートするリソースでは以下のようにImporterを実装 | |
| Importer: &schema.ResourceImporter{ | |
| State: schema.ImportStatePassthrough, |
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
| /************************ | |
| Server | |
| ************************/ | |
| resource "sakuracloud_server" "server01" { | |
| name = "server01" | |
| disks = ["${sakuracloud_disk.disk01.id}"] | |
| tags = ["@virtio-net-pci"] | |
| connection { | |
| user = "root" |
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
| package main | |
| import ( | |
| "os" | |
| "log" | |
| "github.com/mitchellh/goamz/aws" | |
| "github.com/mitchellh/goamz/s3" | |
| ) |
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 run -it --rm -e ACCESS_KEY -e SECRET_KEY -v $PWD:/work \ | |
| sacloud/s3cmd ls |
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
| # ----------------------------------------------------------------------------- | |
| # 変数定義(ログイン情報など) | |
| # ----------------------------------------------------------------------------- | |
| # L2TP/IPSec 事前共有キー | |
| variable pre_shared_secret { default = "PutYourSecret" } | |
| # L2TP/IPSec ユーザー名/パスワード | |
| variable vpn_username { default = "PutYourName" } | |
| variable vpn_password { default = "PutYourPassword" } |
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
| terraform # core binary | |
| terraform-provider-* # provider plugins | |
| terraform-provisioner-* # provisioner plugins |