Categories
Uncategorized

Building a Raspberry PI cluster – software

  1. Building a Raspberry PI cluster
  2. Building a Raspberry PI cluster – software (this)
The last time I was writing about the hardware aspect of building a Rasberry PI based cluster. Here I’ll describe the software aspect. The installation is based on blog post by Hypriot guys. I’ll just describe my experience and changes I had to make to make it

Ingredients

First I had to configure mikrotik router to act like DHCP server for Rasbperry PIs and to map different ports to connected Raspberry PI’s port 22 (SSH). So I can access them through SSH and they are behind the router.

Burning Hypriot OS image to 4 SD cards

and afterwards assign each on proper hostname (master, node1 .. 3). The later is a bit different if you do it on Windows (you have to modify the configuration on each SD card instead of passing parameters to flashing tool).

Kubernetes installation

Pretty much as blog post. However, the first time I did it it wouldn’t install. Installation was stuck at waiting for kubeadm init.
The best way to figure out is to look at Docker logs for problematic containers (you’ll see them marked as restarted or failed) and inspecting kubeadm logs.
Categories
.net Visual Studio

Switching from packages.config to PackageReference for .NET projects

Recently NuGet introduced a new way of handling packages within a project. Instead of stuffing references in a separate packages.config file, it introduced storing package references right in the project file instead.

There are several benefits (really, read the hyperlinked document) to that, the biggest one from my perspective is that it doesn’t pollute NuGet packages list anymore. Previously, if you installed a package that referenced many transitive packages, then the package manager would show all of them at the same level. The worse case was when you referenced a .NET Standard package to a Xamarin application – in that case you could end up with like 20+ additional packages.

Example: adding (my favorite IoC container) Autofac to a Xamarin Android project would yield all these guys:

Not funny, eh?

So, the PackageReference way will still reference all those but it won’t pollute your NuGet packages list anymore. Plus it clearly shows the top level packages under references, like this:

How does one turn on PackageReference mode?

For new projects

I suggest you set PackageReference as default mode using Tools/Options…/NuGet Package Manager window. Note that default is still package.config.

For existing projects

you should migrate packages.config file as described here. You need Visual Studio 2017 Preview 3 or newer.
That’s it – no more polluted lists and many other benefits!