Last active
December 30, 2015 16:37
-
-
Save masato/f50498f4b9f84b9a1c48 to your computer and use it in GitHub Desktop.
IDCFクラウドのDebian JessieでMulti-Host Docker Networking - Part 4: Couchbase Serverをスケールしてみる ref: http://qiita.com/masato/items/0be8b7da012f1180c281
This file contains 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
proxy: | |
image: couchbase:enterprise | |
environment: | |
- constraint:node==minion-3 |
This file contains 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
$ mkdir ~/couch | |
$ cd !$ |
This file contains 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
$ cd ~/couch | |
$ export DOCKER_HOST=tcp://10.3.0.101:3333 | |
$ docker-compose \ | |
--x-networking \ | |
--x-network-driver=overlay \ | |
up -d |
This file contains 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 | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
4bc37df3ff03 couchbase:enterprise "/entrypoint.sh couch" 6 seconds ago Up 4 seconds 10.3.0.103:8091-8093->8091-8093/tcp, 11207/tcp, 11211/tcp, 10.3.0.103:11210->11210/tcp, 18091-18092/tcp minion-3/couch_proxy_1 | |
5c4f9006df94 couchbase:enterprise "/entrypoint.sh couch" 8 seconds ago Up 6 seconds 8091-8093/tcp, 11207/tcp, 11210-11211/tcp, 18091-18092/tcp minion-2/couch_couchbase_1 |
This file contains 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 inspect --format="{{ .NetworkSettings.Networks.couch.IPAddress }}" minion-2/couch_couchbase_1 | |
10.0.1.2 | |
$ docker inspect --format="{{ .NetworkSettings.Networks.couch.IPAddress }}" minion-3/couch_proxy_1 | |
10.0.1.3 |
This file contains 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-compose \ | |
--x-networking \ | |
--x-network-driver=overlay \ | |
scale couchbase=3 | |
Creating and starting 2 ... done | |
Creating and starting 3 ... done | |
$ docker ps | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
d0c34609c697 couchbase:enterprise "/entrypoint.sh couch" 57 seconds ago Up 56 seconds 8091-8093/tcp, 11207/tcp, 11210-11211/tcp, 18091-18092/tcp minion-3/couch_couchbase_3 | |
dd3aca431d53 couchbase:enterprise "/entrypoint.sh couch" 57 seconds ago Up 56 seconds 8091-8093/tcp, 11207/tcp, 11210-11211/tcp, 18091-18092/tcp minion-1/couch_couchbase_2 | |
4bc37df3ff03 couchbase:enterprise "/entrypoint.sh couch" 39 minutes ago Up 39 minutes 10.3.0.103:8091-8093->8091-8093/tcp, 11207/tcp, 11211/tcp, 10.3.0.103:11210->11210/tcp, 18091-18092/tcp minion-3/couch_proxy_1 | |
5c4f9006df94 couchbase:enterprise "/entrypoint.sh couch" 39 minutes ago Up 39 minutes 8091-8093/tcp, 11207/tcp, 11210-11211/tcp, 18091-18092/tcp minion-2/couch_couchbase_1 |
This file contains 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 inspect --format="{{ .NetworkSettings.Networks.couch.IPAddress }}" minion-1/couch_couchbase_2 | |
10.0.1.4 | |
$ docker inspect --format="{{ .NetworkSettings.Networks.couch.IPAddress }}" minion-3/couch_couchbase_3 | |
10.0.1.5 |
This file contains 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
┌─────────────────────────────────────────┐ ┌─────────────────────────────────────────┐ | |
│ Host OS (Linux) │ │ Host OS (Linux) │ | |
│ ┌─────────────────┐ ┌─────────────────┐ │ │ ┌─────────────────┐ ┌─────────────────┐ │ | |
│ │ Container OS │ │ Container OS │ │ │ │ Container OS │ │ Container OS │ │ | |
│ │ (Ubuntu) │ │ (Ubuntu) │ │ │ │ (Ubuntu) │ │ (Ubuntu) │ │ | |
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │ │ │ ┌───────────┐ │ │ ┌───────────┐ │ │ | |
│ │ │ Couchbase │ │ │ │ Couchbase │ │ │ │ │ │ Couchbase │ │ │ │ Couchbase │ │ │ | |
│ │ │ Server │ │ │ │ Server │ │ │ │ │ │ Server │ │ │ │ Server │ │ │ | |
│ │ └───────────┘ │ │ └───────────┘ │ │ │ │ └───────────┘ │ │ └───────────┘ │ │ | |
│ └─────────────────┘ └─────────────────┘ │ │ └─────────────────┘ └─────────────────┘ │ | |
└─────────────────────────────────────────┘ └─────────────────────────────────────────┘ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment