3 node core-os cluster

mohammedrafi@NOC-RAFI:~$ sudo apt-get install git

mohammedrafi@NOC-RAFI:~$ git –version
git version 1.9.1

mohammedrafi@NOC-RAFI:~$ vagrant –version
Vagrant 1.4.3

mohammedrafi@NOC-RAFI:~$ VBoxManage –version
4.3.36_Ubuntur105129
mohammedrafi@NOC-RAFI:~$ mkdir gitdata && cd gitdata
mohammedrafi@NOC-RAFI:~/gitdata$ git clone https://github.com/coreos/coreos-vagrant.git
Cloning into ‘coreos-vagrant’…
remote: Counting objects: 448, done.
remote: Total 448 (delta 0), reused 0 (delta 0), pack-reused 448
Receiving objects: 100% (448/448), 110.64 KiB | 0 bytes/s, done.
Resolving deltas: 100% (202/202), done.
Checking connectivity… done.
mohammedrafi@NOC-RAFI:~/gitdata$ ls -l
total 4
drwxrwxr-x 3 mohammedrafi mohammedrafi 4096 Mar 31 14:52 coreos-vagrant
mohammedrafi@NOC-RAFI:~/gitdata$ cd coreos-vagrant/

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ ls -l
total 52
-rw-rw-r– 1 mohammedrafi mohammedrafi 3378 Mar 31 14:52 config.rb.sample
-rw-rw-r– 1 mohammedrafi mohammedrafi 2448 Mar 31 14:52 CONTRIBUTING.md
-rw-rw-r– 1 mohammedrafi mohammedrafi 1422 Mar 31 14:52 DCO
-rw-rw-r– 1 mohammedrafi mohammedrafi 11325 Mar 31 14:52 LICENSE
-rw-rw-r– 1 mohammedrafi mohammedrafi 104 Mar 31 14:52 MAINTAINERS
-rw-rw-r– 1 mohammedrafi mohammedrafi 126 Mar 31 14:52 NOTICE
-rw-rw-r– 1 mohammedrafi mohammedrafi 4150 Mar 31 14:52 README.md
-rw-rw-r– 1 mohammedrafi mohammedrafi 1349 Mar 31 14:52 user-data.sample
-rw-rw-r– 1 mohammedrafi mohammedrafi 4900 Mar 31 14:52 Vagrantfile

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ mv config.rb.sample config.rb
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ mv user-data.sample user-data

—————————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ cat Vagrantfile
# -*- mode: ruby -*-
# # vi: set ft=ruby :

require ‘fileutils’

Vagrant.require_version “>= 1.6.0”

CLOUD_CONFIG_PATH = File.join(File.dirname(__FILE__), “user-data”)
CONFIG = File.join(File.dirname(__FILE__), “config.rb”)

# Defaults for config options defined in CONFIG
$num_instances = 1
$instance_name_prefix = “core”
$update_channel = “alpha”
$image_version = “current”
$enable_serial_logging = false
$share_home = false
$vm_gui = false
$vm_memory = 1024
$vm_cpus = 1
$vb_cpuexecutioncap = 100
$shared_folders = {}
$forwarded_ports = {}

# Attempt to apply the deprecated environment variable NUM_INSTANCES to
# $num_instances while allowing config.rb to override it
if ENV[“NUM_INSTANCES”].to_i > 0 && ENV[“NUM_INSTANCES”]
$num_instances = ENV[“NUM_INSTANCES”].to_i
end

if File.exist?(CONFIG)
require CONFIG
end

# Use old vb_xxx config variables when set
def vm_gui
$vb_gui.nil? ? $vm_gui : $vb_gui
end

def vm_memory
$vb_memory.nil? ? $vm_memory : $vb_memory
end

def vm_cpus
$vb_cpus.nil? ? $vm_cpus : $vb_cpus
end

Vagrant.configure(“2”) do |config|
# always use Vagrants insecure key
config.ssh.insert_key = false
# forward ssh agent to easily ssh into the different machines
config.ssh.forward_agent = true

config.vm.box = “coreos-%s” % $update_channel
if $image_version != “current”
config.vm.box_version = $image_version
end
config.vm.box_url = “https://storage.googleapis.com/%s.release.core-os.net/amd64-usr/%s/coreos_production_vagrant.json” % [$update_channel, $image_version]

[“vmware_fusion”, “vmware_workstation”].each do |vmware|
config.vm.provider vmware do |v, override|
override.vm.box_url = “https://storage.googleapis.com/%s.release.core-os.net/amd64-usr/%s/coreos_production_vagrant_vmware_fusion.json” % [$update_channel, $image_version]
end
end

config.vm.provider :virtualbox do |v|
# On VirtualBox, we don’t have guest additions or a functional vboxsf
# in CoreOS, so tell Vagrant that so it can be smarter.
v.check_guest_additions = false
v.functional_vboxsf = false
end

# plugin conflict
if Vagrant.has_plugin?(“vagrant-vbguest”) then
config.vbguest.auto_update = false
end

(1..$num_instances).each do |i|
config.vm.define vm_name = “%s-%02d” % [$instance_name_prefix, i] do |config|
config.vm.hostname = vm_name

if $enable_serial_logging
logdir = File.join(File.dirname(__FILE__), “log”)
FileUtils.mkdir_p(logdir)

serialFile = File.join(logdir, “%s-serial.txt” % vm_name)
FileUtils.touch(serialFile)

[“vmware_fusion”, “vmware_workstation”].each do |vmware|
config.vm.provider vmware do |v, override|
v.vmx[“serial0.present”] = “TRUE”
v.vmx[“serial0.fileType”] = “file”
v.vmx[“serial0.fileName”] = serialFile
v.vmx[“serial0.tryNoRxLoss”] = “FALSE”
end
end

config.vm.provider :virtualbox do |vb, override|
vb.customize [“modifyvm”, :id, “–uart1”, “0x3F8”, “4”]
vb.customize [“modifyvm”, :id, “–uartmode1”, serialFile]
end
end

if $expose_docker_tcp
config.vm.network “forwarded_port”, guest: 2375, host: ($expose_docker_tcp + i – 1), host_ip: “127.0.0.1”, auto_correct: true
end

$forwarded_ports.each do |guest, host|
config.vm.network “forwarded_port”, guest: guest, host: host, auto_correct: true
end

[“vmware_fusion”, “vmware_workstation”].each do |vmware|
config.vm.provider vmware do |v|
v.gui = vm_gui
v.vmx[‘memsize’] = vm_memory
v.vmx[‘numvcpus’] = vm_cpus
end
end

config.vm.provider :virtualbox do |vb|
vb.gui = vm_gui
vb.memory = vm_memory
vb.cpus = vm_cpus
vb.customize [“modifyvm”, :id, “–cpuexecutioncap”, “#{$vb_cpuexecutioncap}”]
end

ip = “172.17.8.#{i+100}”
config.vm.network :private_network, ip: ip

# Uncomment below to enable NFS for sharing the host machine into the coreos-vagrant VM.
#config.vm.synced_folder “.”, “/home/core/share”, id: “core”, :nfs => true, :mount_options => [‘nolock,vers=3,udp’]
$shared_folders.each_with_index do |(host_folder, guest_folder), index|
config.vm.synced_folder host_folder.to_s, guest_folder.to_s, id: “core-share%02d” % index, nfs: true, mount_options: [‘nolock,vers=3,udp’]
end

if $share_home
config.vm.synced_folder ENV[‘HOME’], ENV[‘HOME’], id: “home”, :nfs => true, :mount_options => [‘nolock,vers=3,udp’]
end

if File.exist?(CLOUD_CONFIG_PATH)
config.vm.provision :file, :source => “#{CLOUD_CONFIG_PATH}”, :destination => “/tmp/vagrantfile-user-data”
config.vm.provision :shell, :inline => “mv /tmp/vagrantfile-user-data /var/lib/coreos-vagrant/”, :privileged => true
end

end
end
end

——————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ cat config.rb
# Size of the CoreOS cluster created by Vagrant
$num_instances=1

# Used to fetch a new discovery token for a cluster of size $num_instances
$new_discovery_url=”https://discovery.etcd.io/new?size=#{$num_instances}”

# Automatically replace the discovery token on ‘vagrant up’

if File.exists?(‘user-data’) && ARGV[0].eql?(‘up’)
require ‘open-uri’
require ‘yaml’

token = open($new_discovery_url).read

data = YAML.load(IO.readlines(‘user-data’)[1..-1].join)

if data.key? ‘coreos’ and data[‘coreos’].key? ‘etcd’
data[‘coreos’][‘etcd’][‘discovery’] = token
end

if data.key? ‘coreos’ and data[‘coreos’].key? ‘etcd2’
data[‘coreos’][‘etcd2’][‘discovery’] = token
end

# Fix for YAML.load() converting reboot-strategy from ‘off’ to `false`
if data.key? ‘coreos’ and data[‘coreos’].key? ‘update’ and data[‘coreos’][‘update’].key? ‘reboot-strategy’
if data[‘coreos’][‘update’][‘reboot-strategy’] == false
data[‘coreos’][‘update’][‘reboot-strategy’] = ‘off’
end
end

yaml = YAML.dump(data)
File.open(‘user-data’, ‘w’) { |file| file.write(“#cloud-config\n\n#{yaml}”) }
end

#
# coreos-vagrant is configured through a series of configuration
# options (global ruby variables) which are detailed below. To modify
# these options, first copy this file to “config.rb”. Then simply
# uncomment the necessary lines, leaving the $, and replace everything
# after the equals sign..

# Change basename of the VM
# The default value is “core”, which results in VMs named starting with
# “core-01” through to “core-${num_instances}”.
#$instance_name_prefix=”core”

# Change the version of CoreOS to be installed
# To deploy a specific version, simply set $image_version accordingly.
# For example, to deploy version 709.0.0, set $image_version=”709.0.0″.
# The default value is “current”, which points to the current version
# of the selected channel
#$image_version = “current”

# Official CoreOS channel from which updates should be downloaded
#$update_channel=’alpha’

# Log the serial consoles of CoreOS VMs to log/
# Enable by setting value to true, disable with false
# WARNING: Serial logging is known to result in extremely high CPU usage with
# VirtualBox, so should only be used in debugging situations
#$enable_serial_logging=false

# Enable port forwarding of Docker TCP socket
# Set to the TCP port you want exposed on the *host* machine, default is 2375
# If 2375 is used, Vagrant will auto-increment (e.g. in the case of $num_instances > 1)
# You can then use the docker tool locally by setting the following env var:
# export DOCKER_HOST=’tcp://127.0.0.1:2375′
#$expose_docker_tcp=2375

# Enable NFS sharing of your home directory ($HOME) to CoreOS
# It will be mounted at the same path in the VM as on the host.
# Example: /Users/foobar -> /Users/foobar
#$share_home=false

# Customize VMs
#$vm_gui = false
#$vm_memory = 1024
#$vm_cpus = 1
#$vb_cpuexecutioncap = 100

# Share additional folders to the CoreOS VMs
# For example,
# $shared_folders = {‘/path/on/host’ => ‘/path/on/guest’, ‘/home/foo/app’ => ‘/app’}
# or, to map host folders to guest folders of the same name,
# $shared_folders = Hash[*[‘/home/foo/app1’, ‘/home/foo/app2’].map{|d| [d, d]}.flatten]
#$shared_folders = {}

# Enable port forwarding from guest(s) to host machine, syntax is: { 80 => 8080 }, auto correction is enabled by default.
#$forwarded_ports = {}
—————————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ cat user-data
#cloud-config

coreos:
etcd2:
#generate a new token for each unique cluster from https://discovery.etcd.io/new
#discovery: https://discovery.etcd.io/<token&gt;
# multi-region and multi-cloud deployments need to use $public_ipv4
advertise-client-urls: http://$public_ipv4:2379
initial-advertise-peer-urls: http://$private_ipv4:2380
# listen on both the official ports and the legacy ports
# legacy ports can be omitted if your application doesn’t depend on them
listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
listen-peer-urls: http://$private_ipv4:2380,http://$private_ipv4:7001
fleet:
public-ip: $public_ipv4
flannel:
interface: $public_ipv4
units:
– name: etcd2.service
command: start
– name: fleet.service
command: start
– name: flanneld.service
drop-ins:
– name: 50-network-config.conf
content: |
[Service]
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config ‘{ “Network”: “10.1.0.0/16” }’
command: start
– name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Description=Docker Socket for the API

[Socket]
ListenStream=2375
Service=docker.service
BindIPv6Only=both

[Install]
WantedBy=sockets.target
—————————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vim config.rb

$num_instances=1 ——> $num_instances=3
$update_channel=’alpha’ —> $update_channel=’stable’
$vm_memory = 1024 ——> $vm_memory = 756

—————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant up
Vagrant failed to initialize at a very early stage:

This Vagrant environment has specified that it requires the Vagrant
version to satisfy the following version requirements:

>= 1.6.0

You are running Vagrant 1.4.3, which does not satisify
these requirements. Please change your Vagrant version or update
the Vagrantfile to allow this Vagrant version. However, be warned
that if the Vagrantfile has specified another version, it probably has
good reason to do so, and changing that may cause the environment to
not function properly.

mohammedrafi@NOC-RAFI:~$ wget https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
–2017-03-31 15:10:01– https://releases.hashicorp.com/vagrant/1.8.1/vagrant_1.8.1_x86_64.deb
Resolving releases.hashicorp.com (releases.hashicorp.com)… 151.101.61.183
Connecting to releases.hashicorp.com (releases.hashicorp.com)|151.101.61.183|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 75496368 (72M) [application/x-debian-package]
Saving to: ‘vagrant_1.8.1_x86_64.deb’

100%[======================================================================================================>] 7,54,96,368 531KB/s in 2m 22s

2017-03-31 15:12:25 (520 KB/s) – ‘vagrant_1.8.1_x86_64.deb’ saved [75496368/75496368]

mohammedrafi@NOC-RAFI:~$ sudo dpkg -i vagrant_1.8.1_x86_64.deb

mohammedrafi@NOC-RAFI:~$ vagrant –version
Vagrant 1.8.1

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant up
Vagrant is upgrading some internal state for the latest version.
Please do not quit Vagrant at this time. While upgrading, Vagrant
will need to copy all your boxes, so it will use a considerable
amount of disk space. After it is done upgrading, the temporary disk
space will be freed.

Press ctrl-c now to exit if you want to remove some boxes or free
up some disk space.

Press the Enter or Return key to continue.
Bringing machine ‘core-01’ up with ‘virtualbox’ provider…
Bringing machine ‘core-02’ up with ‘virtualbox’ provider…
Bringing machine ‘core-03’ up with ‘virtualbox’ provider…
==> core-01: Box ‘coreos-stable’ could not be found. Attempting to find and install…
core-01: Box Provider: virtualbox
core-01: Box Version: >= 0
==> core-01: Loading metadata for box ‘https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json&#8217;
core-01: URL: https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json
==> core-01: Adding box ‘coreos-stable’ (v1298.6.0) for provider: virtualbox
core-01: Downloading: https://stable.release.core-os.net/amd64-usr/1298.6.0/coreos_production_vagrant.box
core-01: Calculating and comparing box checksum…
==> core-01: Successfully added box ‘coreos-stable’ (v1298.6.0) for ‘virtualbox’!
==> core-01: Importing base box ‘coreos-stable’…
==> core-01: Matching MAC address for NAT networking…
==> core-01: Checking if box ‘coreos-stable’ is up to date…
==> core-01: Setting the name of the VM: coreos-vagrant_core-01_1490953765022_5703
==> core-01: Clearing any previously set network interfaces…
==> core-01: Preparing network interfaces based on configuration…
core-01: Adapter 1: nat
core-01: Adapter 2: hostonly
==> core-01: Forwarding ports…
core-01: 22 (guest) => 2222 (host) (adapter 1)
==> core-01: Running ‘pre-boot’ VM customizations…
==> core-01: Booting VM…
==> core-01: Waiting for machine to boot. This may take a few minutes…
core-01: SSH address: 127.0.0.1:2222
core-01: SSH username: core
core-01: SSH auth method: private key
==> core-01: Machine booted and ready!
==> core-01: Setting hostname…
==> core-01: Configuring and enabling network interfaces…
==> core-01: Running provisioner: file…
==> core-01: Running provisioner: shell…
core-01: Running: inline script
==> core-02: Box ‘coreos-stable’ could not be found. Attempting to find and install…
core-02: Box Provider: virtualbox
core-02: Box Version: >= 0
==> core-02: Loading metadata for box ‘https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json&#8217;
core-02: URL: https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json
==> core-02: Adding box ‘coreos-stable’ (v1298.6.0) for provider: virtualbox
==> core-02: Importing base box ‘coreos-stable’…
==> core-02: Matching MAC address for NAT networking…
==> core-02: Checking if box ‘coreos-stable’ is up to date…
==> core-02: Setting the name of the VM: coreos-vagrant_core-02_1490953810965_48169
==> core-02: Fixed port collision for 22 => 2222. Now on port 2200.
==> core-02: Clearing any previously set network interfaces…
==> core-02: Preparing network interfaces based on configuration…
core-02: Adapter 1: nat
core-02: Adapter 2: hostonly
==> core-02: Forwarding ports…
core-02: 22 (guest) => 2200 (host) (adapter 1)
==> core-02: Running ‘pre-boot’ VM customizations…
==> core-02: Booting VM…
==> core-02: Waiting for machine to boot. This may take a few minutes…
core-02: SSH address: 127.0.0.1:2200
core-02: SSH username: core
core-02: SSH auth method: private key
==> core-02: Machine booted and ready!
==> core-02: Setting hostname…
==> core-02: Configuring and enabling network interfaces…
==> core-02: Running provisioner: file…
==> core-02: Running provisioner: shell…
core-02: Running: inline script
==> core-03: Box ‘coreos-stable’ could not be found. Attempting to find and install…
core-03: Box Provider: virtualbox
core-03: Box Version: >= 0
==> core-03: Loading metadata for box ‘https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json&#8217;
core-03: URL: https://storage.googleapis.com/stable.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json
==> core-03: Adding box ‘coreos-stable’ (v1298.6.0) for provider: virtualbox
==> core-03: Importing base box ‘coreos-stable’…
==> core-03: Matching MAC address for NAT networking…
==> core-03: Checking if box ‘coreos-stable’ is up to date…
==> core-03: Setting the name of the VM: coreos-vagrant_core-03_1490953858401_37835
==> core-03: Fixed port collision for 22 => 2222. Now on port 2201.
==> core-03: Clearing any previously set network interfaces…
==> core-03: Preparing network interfaces based on configuration…
core-03: Adapter 1: nat
core-03: Adapter 2: hostonly
==> core-03: Forwarding ports…
core-03: 22 (guest) => 2201 (host) (adapter 1)
==> core-03: Running ‘pre-boot’ VM customizations…
==> core-03: Booting VM…
==> core-03: Waiting for machine to boot. This may take a few minutes…
core-03: SSH address: 127.0.0.1:2201
core-03: SSH username: core
core-03: SSH auth method: private key
==> core-03: Machine booted and ready!
==> core-03: Setting hostname…
==> core-03: Configuring and enabling network interfaces…
==> core-03: Running provisioner: file…
==> core-03: Running provisioner: shell…
core-03: Running: inline script
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant status
Current machine states:

core-01 running (virtualbox)
core-02 running (virtualbox)
core-03 running (virtualbox)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant ssh
This command requires a specific VM name to target in a multi-VM environment.

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant ssh core-01
Last login: Fri Mar 31 09:49:51 UTC 2017 from 10.0.2.2 on ssh
Container Linux by CoreOS stable (1298.6.0)
core@core-01 ~ $

core@core-01 ~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2f:c5:52 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
valid_lft 85791sec preferred_lft 85791sec
inet6 fe80::a00:27ff:fe2f:c552/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:09:ab:12 brd ff:ff:ff:ff:ff:ff
inet 192.168.56.101/24 brd 192.168.56.255 scope global dynamic eth1
valid_lft 581sec preferred_lft 581sec
inet 172.17.8.101/24 brd 172.17.8.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe09:ab12/64 scope link
valid_lft forever preferred_lft forever
4: flannel0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1472 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.1.13.0/16 scope global flannel0
valid_lft forever preferred_lft forever
inet6 fe80::78d5:b41b:5d25:a7a1/64 scope link flags 800
valid_lft forever preferred_lft forever

—————————-
mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant ssh core-02
Last login: Fri Mar 31 09:50:36 UTC 2017 from 10.0.2.2 on ssh
Container Linux by CoreOS stable (1298.6.0)
core@core-02 ~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2f:c5:52 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
valid_lft 85577sec preferred_lft 85577sec
inet6 fe80::a00:27ff:fe2f:c552/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:85:56:2c brd ff:ff:ff:ff:ff:ff
inet 192.168.56.102/24 brd 192.168.56.255 scope global dynamic eth1
valid_lft 369sec preferred_lft 369sec
inet 172.17.8.102/24 brd 172.17.8.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe85:562c/64 scope link
valid_lft forever preferred_lft forever
4: flannel0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1472 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.1.64.0/16 scope global flannel0
valid_lft forever preferred_lft forever
inet6 fe80::f7c5:e7a3:ab63:4283/64 scope link flags 800
valid_lft forever preferred_lft forever

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant ssh core-03
Last login: Fri Mar 31 09:51:32 UTC 2017 from 10.0.2.2 on ssh
Container Linux by CoreOS stable (1298.6.0)

core@core-03 ~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:2f:c5:52 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic eth0
valid_lft 85042sec preferred_lft 85042sec
inet6 fe80::a00:27ff:fe2f:c552/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:6c:92:73 brd ff:ff:ff:ff:ff:ff
inet 172.17.8.103/24 brd 172.17.8.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe6c:9273/64 scope link
valid_lft forever preferred_lft forever
4: flannel0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1472 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.1.43.0/16 scope global flannel0
valid_lft forever preferred_lft forever
inet6 fe80::ebdf:fcc2:374f:bd13/64 scope link flags 800
valid_lft forever preferred_lft forever
————-
core@core-01 ~ $ fleetctl list-machines
MACHINE IP METADATA
0589cb6e… 172.17.8.102 –
cb31de94… 172.17.8.101 –

core@core-02 ~ $ fleetctl list-machines
MACHINE IP METADATA
0589cb6e… 172.17.8.102 –
cb31de94… 172.17.8.101 –

core@core-03 ~ $ fleetctl list-machines
MACHINE IP METADATA
0589cb6e… 172.17.8.102 –
cb31de94… 172.17.8.101 –

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant box list
centos (virtualbox, 0)
coreos-stable (virtualbox, 1298.6.0)
precise32 (virtualbox, 0)

mohammedrafi@NOC-RAFI:~/gitdata/coreos-vagrant$ vagrant status
Current machine states:

core-01 running (virtualbox)
core-02 running (virtualbox)
core-03 running (virtualbox)

This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

coreos-cluster.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s