Help us understand the problem. What is going on with this article?

Docker swarm mode お試し環境を Vagrantで作る(CentOS7)

More than 3 years have passed since last update.

docker swarm mode を試すには
docker 1.12RCのインストール、
Firewallへの穴あけが必要なのでサクッと作る。
vagrantでログインすればdockerが使えます。

sshのポートとかは個人の好みです。

あらかじめCentOS7のboxを用意しておきましょう。
(ここではcent7という名前で用意されている前提で書いています)

Vagrantfile

Vagrant.configure(2) do |config|
  @docker=<<-EOL
  curl -fsSL https://test.docker.com/ | sh
  sudo usermod -g docker vagrant
  sudo systemctl enable docker
  sudo systemctl start docker
  sudo firewall-cmd --add-port=2377/tcp --permanent
  sudo firewall-cmd --add-port=7496/tcp --permanent
  sudo firewall-cmd --add-port=7496/udp --permanent
  sudo firewall-cmd --add-port=4789/tcp --permanent
  sudo firewall-cmd --add-port=4789/udp --permanent
  sudo firewall-cmd --reload
  EOL

  (1..3).each do |i|
    config.vm.define "node-0#{i}" do |box|
      box.vm.box = "cent7"
      box.vm.hostname= "node-0#{i}"
      box.vm.network "private_network", ip: "192.168.56.#{i}0"
      box.vm.network :forwarded_port, id:"ssh",guest:22, host:2200+i
      box.vm.provision "shell", inline: @docker
    end
  end
end

http://qiita.com/zembutsu/items/6fb6eface38d62b3584d

このチュートリアルが試したければ、

sudo firewall-cmd --add-port
が並んでいるあたりに
sudo firewall-cmd --add-service=http --permanent
を追加しましょう。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away