Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post/setup-kubernetes-raspberry-pi-cluster needs a bit of updating #73

Open
miekg opened this issue Dec 14, 2017 · 15 comments
Open

post/setup-kubernetes-raspberry-pi-cluster needs a bit of updating #73

miekg opened this issue Dec 14, 2017 · 15 comments

Comments

@miekg
Copy link

miekg commented Dec 14, 2017

Hi,

I went through setup-kubernetes-raspberry-pi-cluster (which is super handy). But it needs some upgrading:
In random order:

  • I've used current released flannel, 0.9.1, so no need to warn about 0.7.1 being bad
  • My nodes came up NotReady when I used --pod-network-cidr (only after flannel install they were OK)
  • flannel rbac is not(?) needed anymore (didn't double check)
  • Default flannel defaults to amd64 which is manually changed into arm. There is a not about this, but that it references is old, so I forgot to do it (took me a while to figure out this mistake)
  • the flash's -n option didn't work for me (got an error after flashing, assumed it was ok), but the hostname was still the default.
@MathiasRenner
Copy link
Collaborator

Thanks for your suggestions!! It would be awesome if you could hand in some PRs for each suggestion :-)
I am sorry but I won't take more time for this other than approving PRs if they seem OK - in the best case, one other person tests and confirms it.

@StefanScherer
Copy link
Member

@miekg Thanks for the feedback. Regarding the flash -n option: which SD card image have you used?

@miekg
Copy link
Author

miekg commented Dec 16, 2017 via email

@StefanScherer
Copy link
Member

Thanks. I checked flash -n both on macOS and Linux (only in a Vagrant VM), but couldn't find a problem with

flash -f -n mynode https://github.com/hypriot/image-builder-rpi/releases/download/v1.7.1/hypriotos-rpi-v1.7.1.img.zip

On both platforms the user-data file had the updated hostname in it.

I've merged some PR's into flash recently, also added some tests running on Circle (for Linux) and Travis (for macOS, but work is in progress here) to keep the tool working for hopefully all our users :-)

@miekg
Copy link
Author

miekg commented Dec 17, 2017

Thanks for double checking.

  • What does the -f option do? A new flag?
  • And what's user data?

I've just executed the above (minus -f) command and flashed a sd:
flash -n miek ....

% cd /media/miek
% more root/etc/hostname 
black-pearl
% more root/etc/hostname
black-pearl

And these get never overwritten on boot...

@miekg
Copy link
Author

miekg commented Dec 17, 2017

uh, second one needs to be /etc/hosts, but that also lists black-pearl as 127.0.1.1

@StefanScherer
Copy link
Member

Yes, -f is new. I had to add it to automate some BATS tests to skip the prompt. I‘ll add it to the readme.
I only tried flashing and looked at the user-data file in the FAT partition and the script has updated it.
I‘ll boot an RPi with it later and will check if it boots with the modified hostname.
With Hypriot 1.7 we switched from our own device-init to cloud-init to have more options on first boot.

@StefanScherer
Copy link
Member

I tried two RPi3 today, one with --hostname, another with --userdata and --bootconf to spin it up with WiFi enabled. Both first start booting with black-pearl, but when I then log in the new name is activated. The user-data will be executed during the first boot and the hostname will be adjusted.

So it would be good to know if the /boot/user-data got updated after you executed the flash tool to see if it is something in the flash tool or has something to do with the cloud-init first boot.

@miekg
Copy link
Author

miekg commented Dec 18, 2017 via email

@StefanScherer
Copy link
Member

Well I watched the output of the serial console. And there (probably before having network) the machine hostname is black-pearl. The serial login prompt also shows black-pearl in the prompt. But I waited a little and then logged in over serial cable and the bash prompt then shows the new hostname. So it‘s happening during the first boot and probably before you can SSH into it.
For the WiFi test I had to use SSH as the UART has to be disabled for onboard WiFi.

@miekg
Copy link
Author

miekg commented Dec 18, 2017 via email

@dvdmuckle
Copy link
Contributor

dvdmuckle commented Dec 24, 2017

Just came by to say, seconding the use of v0.9.1 for Flannel. Fixed an issue I was having with kube-dns!

EDIT: Well, maybe it didn't fix it, but, kube-dns was fixed after kubeadm reseting for the third time and using v0.9.1. Could be a coincidence, but I don't think it was.

@StefanScherer
Copy link
Member

The next HypriotOS release will have UART disabled by default ;-)

@johnwyles
Copy link

johnwyles commented Mar 26, 2019

@alexellis @StefanScherer I have created this perhaps that someone will find useful:

Which goes along with some updated YAML and stuff here:

@StefanScherer
Copy link
Member

Thanks @johnwyles that is awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants