hypriot / cluster-lab

Hypriot Cluster Lab
http://blog.hypriot.com
MIT License
156 stars 18 forks source link

Is it possible for Cluster Lab on wlan0 instead of eth0? #52

Open oktak opened 8 years ago

oktak commented 8 years ago

Hello, I've followed the instructions in this Hypriot Blog Post. Could that be setup Cluster Lab using Pi 3's wifi chip instead of using eth0 (Ethernet)?

I tried to edit /etc/cluster-lab/cluster.conf manually. When I cluster-lab stop and then start. It shows me:

Got more than one IP address on wlan0.200: 192.168.200.1

Is that a bad idea to build a cluster using wlan? If not, how to config Cluster Lab on the Pi 3? Thanks!

Govinda-Fichtner commented 8 years ago

@firecyberice Can you guide @oktak through this?

firecyberice commented 8 years ago

@oktak You just need to change these three parameters:

oktak commented 8 years ago

Thanks for @firecyberice help. I got cluster-lab health all [PASS] now :D

Here is my journey: Before I open an issue here, I used --clusterlab true flag (with ssid, password, hostname together) to flash the microSD Card for the Pi 3.

I found its default is using eth0. I have not much LAN cable in hands, so I tried to modify /etc/cluster-lab/cluster.conf manually to "wlan0". Doing this I got error message above.

I tried to follow the steps and changes those parameters. However I got 'No route to Host' when I connect the Pi 3 via SSH. I tried several times for different values.

Finally, I start it over, I flash the microsSD again, without --clusterlab true flag.

  1. Boot HypriotOS Cluster Lab on Pi 3 and SSH connect to it.
  2. I change value of INTERFACE in /etc/cluster-lab/cluster.conf to "wlan0" (I changed only this one for my "incremental test" purpose), and save it.
  3. I use VERBOSE=true cluster-lab start to see what happens.
  4. Oh yeah! almost all [PASS]. I can access at http://{IP of the node}:8500 to see the Consul web interface.
  5. To see if there are any [FAIL]s, I typed cluster-lab health, this time, really all [PASS]. Thanks so much :)

I suspected that --clusterlab true flag would go for some config assuming eth0 in use for the first boot. Also, it appeared that it also appends some docker related values in device-init.yaml (this point I am not sure, could be I wrongly added to it...oops)