YungSang / coreos-cluster

CoreOS Cluster Setup with Vagrant
30 stars 5 forks source link

make parallels was wrong #10

Open alexwhen opened 9 years ago

alexwhen commented 9 years ago

coreos-cluster git:(master) make parallels vagrant destroy -f The "VBoxManage" command or one of its dependencies could not be found. Please verify VirtualBox is properly installed. You can verify everything is okay by running "VBoxManage --version" and verifying that the VirtualBox version is outputted.

If you're on Windows and just installed VirtualBox, you have to log out and log back in for the new environmental variables to take effect. If you're on Linux or Mac, verify your PATH contains the folder that has VBoxManage in it. make: *\ [clean] Error 1

alexwhen commented 9 years ago

i have fixed the "make parallels" but there is a new bug

coreos-cluster git:(master) ✗ make parallels vagrant destroy -f ==> core-3: VM not created. Moving on... ==> core-2: VM not created. Moving on... ==> core-1: VM not created. Moving on... ==> discovery: Destroying VM and associated drives... ==> discovery: Destroying unused networking interface... ==> discovery: Running cleanup tasks for 'file' provisioner... ==> discovery: Running cleanup tasks for 'shell' provisioner... vagrant up --provider parallels --no-parallel Bringing machine 'discovery' up with 'parallels' provider... Bringing machine 'core-1' up with 'parallels' provider... Bringing machine 'core-2' up with 'parallels' provider... Bringing machine 'core-3' up with 'parallels' provider... ==> discovery: Importing base box 'yungsang/coreos'... ==> discovery: Checking if box 'yungsang/coreos' is up to date... ==> discovery: Setting the name of the VM: coreos-cluster_discovery_1419542320727_22649 The specified host network collides with a non-hostonly network! This will cause your specified IP to be inaccessible. Please change the IP or name of your host only network so that it no longer matches that of a bridged or non-hostonly network. make: *\ [parallels] Error 1

YungSang commented 9 years ago

ip_addr_prefix: "192.168.65" in cluster.yaml by default.

Could you change it to another IP range and try it again?

Or try as follows.

$ BASE_IP_ADDR=192.168.66 make parallels
alexwhen commented 9 years ago

fixed,than you

alexwhen commented 9 years ago

but there is a new error? my fist VM's IP is 10.211.55.20,but etcdctl default sync cluster use 10.211.55.13?

agrant up --provider parallels --no-parallel Bringing machine 'etcd' up with 'parallels' provider... Bringing machine 'core-1' up with 'parallels' provider... Bringing machine 'core-2' up with 'parallels' provider... Bringing machine 'core-3' up with 'parallels' provider... ==> etcd: Importing base box 'yungsang/coreos'... ==> etcd: Checking if box 'yungsang/coreos' is up to date... ==> etcd: Setting the name of the VM: coreos-cluster_etcd_1419546404347_34303 ==> etcd: Preparing network interfaces based on configuration... etcd: Adapter 0: shared etcd: Adapter 1: hostonly ==> etcd: Clearing any previously set network interfaces... ==> etcd: Forwarding ports... ==> etcd: Setting power consumption mode: "Longer battery life" ==> etcd: Running 'pre-boot' VM customizations... ==> etcd: Booting VM... ==> etcd: Waiting for machine to boot. This may take a few minutes... etcd: SSH address: 10.211.55.20:22 etcd: SSH username: core etcd: SSH auth method: private key ==> etcd: Machine booted and ready! ==> etcd: Setting hostname... ==> etcd: Configuring and enabling network interfaces... ==> etcd: Running provisioner: file... ==> etcd: Running provisioner: shell... etcd: Running: inline script ==> core-1: Importing base box 'yungsang/coreos'... ==> core-1: Checking if box 'yungsang/coreos' is up to date... ==> core-1: Setting the name of the VM: coreos-cluster_core-1_1419546437989_6560 ==> core-1: Preparing network interfaces based on configuration... core-1: Adapter 0: shared core-1: Adapter 1: hostonly ==> core-1: Clearing any previously set network interfaces... ==> core-1: Forwarding ports... core-1: 4001 => 4001 ==> core-1: Setting power consumption mode: "Longer battery life" ==> core-1: Running 'pre-boot' VM customizations... ==> core-1: Booting VM... ==> core-1: Waiting for machine to boot. This may take a few minutes... core-1: SSH address: 10.211.55.21:22 core-1: SSH username: core core-1: SSH auth method: private key ==> core-1: Machine booted and ready! ==> core-1: Setting hostname... ==> core-1: Configuring and enabling network interfaces... ==> core-1: Running provisioner: file... ==> core-1: Running provisioner: shell... core-1: Running: inline script ==> core-2: Importing base box 'yungsang/coreos'... ==> core-2: Checking if box 'yungsang/coreos' is up to date... ==> core-2: Setting the name of the VM: coreos-cluster_core-2_1419546470944_769 ==> core-2: Preparing network interfaces based on configuration... core-2: Adapter 0: shared core-2: Adapter 1: hostonly ==> core-2: Clearing any previously set network interfaces... ==> core-2: Forwarding ports... core-2: 4001 => 4002 ==> core-2: Setting power consumption mode: "Longer battery life" ==> core-2: Running 'pre-boot' VM customizations... ==> core-2: Booting VM... ==> core-2: Waiting for machine to boot. This may take a few minutes... core-2: SSH address: 10.211.55.22:22 core-2: SSH username: core core-2: SSH auth method: private key ==> core-2: Machine booted and ready! ==> core-2: Setting hostname... ==> core-2: Configuring and enabling network interfaces... ==> core-2: Running provisioner: file... ==> core-2: Running provisioner: shell... core-2: Running: inline script ==> core-3: Importing base box 'yungsang/coreos'... ==> core-3: Checking if box 'yungsang/coreos' is up to date... ==> core-3: Setting the name of the VM: coreos-cluster_core-3_1419546505268_37107 ==> core-3: Preparing network interfaces based on configuration... core-3: Adapter 0: shared core-3: Adapter 1: hostonly ==> core-3: Clearing any previously set network interfaces... ==> core-3: Forwarding ports... core-3: 4001 => 4003 ==> core-3: Setting power consumption mode: "Longer battery life" ==> core-3: Running 'pre-boot' VM customizations... ==> core-3: Booting VM... ==> core-3: Waiting for machine to boot. This may take a few minutes... core-3: SSH address: 10.211.55.23:22 core-3: SSH username: core core-3: SSH auth method: private key ==> core-3: Machine booted and ready! ==> core-3: Setting hostname... ==> core-3: Configuring and enabling network interfaces... ==> core-3: Running provisioner: file... ==> core-3: Running provisioner: shell... core-3: Running: inline script ➜ coreos-cluster git:(master) ✗ etcdctl ls Error: Cannot sync with the cluster using peers 10.211.55.13:4001 ➜ coreos-cluster git:(master) ✗

YungSang commented 9 years ago

It seems your cluster has 10.211.55.20~23. Please set ETCDCTL_PEERS again.

alexwhen commented 9 years ago

fixed!thanks!!!

is it ok?

oreos-cluster git:(master) ✗ etcdctl ls --recursive /coreos.com /coreos.com/updateengine /coreos.com/updateengine/rebootlock /coreos.com/updateengine/rebootlock/semaphore /services /services/test ➜ coreos-cluster git:(master) ✗ vagrant ssh core-3 -c "etcdctl get /services/test"

test Connection to 10.211.55.29 closed. ➜ coreos-cluster git:(master) ✗

YungSang commented 9 years ago

Yes, it looks good. The outputs in README is outdated with the very old etcdctl & fleetctl, so it may vary.

alexwhen commented 9 years ago

➜ coreos-cluster git:(master) ✗ etcdctl -C "${ETCDCTL_PEERS}" ls /coreos.com ➜ coreos-cluster git:(master) ✗ etcdctl set /services/test test test ➜ coreos-cluster git:(master) ✗ etcdctl ls --recursive /coreos.com /coreos.com/updateengine /coreos.com/updateengine/rebootlock /coreos.com/updateengine/rebootlock/semaphore /services /services/test ➜ coreos-cluster git:(master) ✗ vagrant ssh core-3 -c "etcdctl get /services/test"

test Connection to 10.211.55.29 closed. ➜ coreos-cluster git:(master) ✗ vagrant ssh-config core-1 | sed -n "s/IdentityFile//gp" | xargs ssh-add Identity added: /Users/alex/.vagrant.d/insecure_private_key (/Users/alex/.vagrant.d/insecure_private_key) ➜ coreos-cluster git:(master) ✗ export FLEETCTL_TUNNEL="$(vagrant ssh-config core-1 | sed -n "s/[ ]HostName[ ]//gp"):$(vagrant ssh-config core-1 | sed -n "s/[ ]Port[ ]//gp")" ➜ coreos-cluster git:(master) ✗ fleetctl list-machines The authenticity of host '10.211.55.27' can't be established. RSA key fingerprint is 5f:bd:58:7d:66:fe:1c:e6:d5:f7:0f:6e:47:a2:b4:43. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.211.55.27' (RSA) to the list of known hosts. MACHINE IP METADATA 776596dd... 192.168.66.2 name=core-1 a48fca19... 192.168.66.3 name=core-2 a782b807... 192.168.66.4 name=core-3 ➜ coreos-cluster git:(master) ✗ fleetctl list-units UNIT MACHINE ACTIVE SUB ➜ coreos-cluster git:(master) ✗ curl -LO https://raw.github.com/coreos/fleet/master/examples/hello.service % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0 119 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 100 119 100 119 0 0 15 0 0:00:07 0:00:07 --:--:-- 116 ➜ coreos-cluster git:(master) ✗ fleetctl submit hello.service ➜ coreos-cluster git:(master) ✗ fleetctl list-units UNIT MACHINE ACTIVE SUB ➜ coreos-cluster git:(master) ✗ _79932

alexwhen commented 9 years ago

everythin is good,thank you very much!!!

YungSang commented 9 years ago

Hmm. It seems time to update README... I haven't used the simple test with hello.service for a while.

alexwhen commented 9 years ago

This guide is the best !!!

YungSang commented 9 years ago

Thanks. :)