Welcome to my Christmas post for 2016!

 

 

                                                         _v
                                                     __* (__)
             ff     ff     ff     ff                {\/ (_(__).-.
      ff    <_\__, <_\__, <_\__, <_\__,      __,~~.(`>|-(___)/ ,_)
    o<_\__,  (_ ff ~(_ ff ~(_ ff ~(_ ff~~~~~@ )\/_;-"``     |
      (___)~~//<_\__, <_\__, <_\__, <_\__,    | \__________/|
      // >>     (___)~~(___)~~(___)~~(___)~~~~\\_/_______\_//
                // >>  // >>  // >>  // >> jgs `'---------'`

(picture from http://www.chris.com/ascii/joan/www.geocities.com/SoHo/7373/xmas.html#sleighreindeer)

 

So, we do all remember cold winters, right? Snow for Christmas?

If we ever want to have some snow again, we'll need to become much more conservative in our power spendings.

One thing we can do is to make sure we run some more power efficient servers than we do now. ARM CPUs, much like the ones in your phone, currently lead the race for power efficience.

After years of promises they actually start to be useful, beyond what a RaspBerry Pi can do.

 

So do you want to try out the super-efficient 96 Core 64bit ARM CPU monsters at packet.net?

 

 (Picture is a similar Gigabyte board)

 

Maybe test starting your RPi3 minecraft instance? Or how about running a decent-sized cloud, like a little 1820-core setup for an hour or two? Put your homepage on 20Gbps for some time? Run Docker because you need DOCKERDOCKERDOCKER? Test out something really new and interesting, rebuild and test a Unikernel-based webserver?

This is how...!

 

 

 

Getting an account

Registration

Go to www.packet.net and select SIGNUP

This is a full registration.

Select a payment method (Credit Card, PayPal)

  • Give an address
  • Add your Coupon Code to get your Usage Credit
  • Use a non-mass hosted email address (not gmail etc)
  • If asked for phone verification, add your phone number 
  • Enter the validation code as it arrives on your phone

Validation

In my case the validation took about 15 minutes.

 

Logon

After your account is enabled, you can login at app.packet.net (https)

You should see this exact screen:

 

Check that it displays a non-zero credit balance in the lower left corner.

Setting up an infrastructure

SSH Keys

If you're doing unix day-to-day you'll already have a SSH key already, otherwise you need to create one.

There's no way around that. :-)

Howto for PuTTY users:

https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps (English)

https://www.howtoforge.de/anleitung/key-basierte-ssh-logins-mit-putty/ (German)

 

Projects

After storing a public key, go to "Manage" again and create your first Project.

A project is an entity which contains servers and users able to access them.

The users are invited via mail, and have different permissions. Only special users have access to billing info.

Servers are created with specific types and datacenters.

Running Servers

Let's add servers, it's the next thing they ask you about and there's really nothing you can miss by doing it right away.

There's datacenters in four different continents you can deploy to.

There's 4 types of servers, 3 different sizes of Intel-based, from E3 to medium-large E5 systems, and one ARM-based.

 

The creation dialog is important, since you can't "abort" if you made a mistake here.

You get asked for the hostname, try to use a FQDN, even myserver.local is better than myserver.

Pick the Type 2A to get the 128GB RAM, 96 Core Cavium 2x10GE dream machine. It's at a discount price of $0.50 per hour.

Sadly, so far only Ubuntu 16 is supported at the moment. On the good side it comes fully patched, so you'll not have too much trouble.

Chose any datacenter - but trust me, the one in Japan is cool but using SSH to Japan is not fast.

If you press manage, you get the chance to store a cloud-init script or add a special SSH key.

If you press the system will duplicate your entry, adding an incrementing number to the host name.

 

 

 

Deployment status

 

When you start your deployment, you'll get a status page like this:

 

 

Since these are physical servers you need to allow a few minutes for them to install. Less than 10 most likely.

You'll also notice there's a "Password" field here. Those passwords are valid for 24 hours upon your system install.

After that they aren't accessible in the web UI anymore.

 

The Icon in the upper right corner will show any notifications you receive as the servers are installing.

 

Status notifications:

 

Successfully installed servers look like this:

 

 

Accessing servers

Overview

Check out the management page and select your server.

 

If you look at the IP details you'll notice 3 IP addresses, the third one is the internal IP.

Each Project shares a private network among all nodes, so using these adresses you can access the other nodes.


Connectivity

Console Access

Let's see how to access the console:

First, grab your root password, then look up the ssh address to connect to.

 

Load your ssh key before trying to access the console.

Then ssh (using any user name) to the console address.

Once connected, press enter as advised, and then log in using root + the password you gathered.

 

To disconnect, try typing ~. or close your window.

SSH Access

Here an example using the IPv6 address. If your internet provider isn't V6 ready yet, use the V4 address.

Here's a plain SSH connect.

The default user you need to use is "root". If you want to use your server for longer, create a local user and disallow root login.

Since this is an Ubuntu 16 install, there is no active firewall. This means we can immediately start to launch things on our unprotected server :-)

 

Demo Projects for the winter days

Virtual Hello World 

Docker things

Since we've got the most modern ARM based server you can find in any commercial offering, lets go to full hipster mode and put up a hello world website using Docker.

root@merry:~# apt-get -y install docker.io
[...]
root@merry:~# systemctl start docker
root@merry:~# docker info | grep -E '^(CPUs|Name|Total Memory)'
WARNING: No swap limit support
CPUs: 96
Total Memory: 125.9 GiB
Name: merry.xmas.cx.local.lan

Running a hello world container

We need to make sure we use an image built for our - ARM!! CPU. The right architecture is "aarch64".

 

More practical ideas plus an example project are described in this nice introduction post:

http://blog.alexellis.io/get-started-with-docker-on-64-bit-arm/

 

KVM

I heard different things about KVM on ARM, ranging from it being a clusterfuck to ARM being much better of a virtual platform than x86.

Rest assured the documentation is more than lacking. I would not be surprised if it only stabilizes after Xen has paved the way doing all hard work :-)

Xen

Xen is supporting Cavium Thunder since apparently 2014!

(ARM support in various flavours is nothing new at all, going back to 2009-ish)

Nonetheless this might be a quite challenging task still.

A heads up, the Qemu packages for i386 are needed for device emulation: https://lists.xenproject.org/archives/html/xen-devel/2015-06/msg00200.html

And an Ubuntu bug, which is, per Ubuntu standards, unassigned and unloved: https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1560342

So the essence of this: You'll likely will make it work but don't bother trying to use distro packages.

Launching Unikernels

To do something really modern, try the same using a Unikernel, have a look at this post:

https://github.com/ianmiell/shutit-unikernel-walkthrough 

and this GitHub project

https://github.com/FlorianHeigl/dockage (forked because I also want to play with that)

 

Plain and fast

Of course you don't need to put anything in a container. You have a server right there!

Let's put up a webserver

Say hi to the world, little webserver

Double-check your public IP. It's on bond0, as a gentle reminder this system runs over a 2x 10Gigabit link ;-)

And here in your browser you'll see it's online now:

If you want full system specs as HTML, install cfg2html and just replace your index.html with the output.

I hope you will have some fun there!

 

Teardown

Deleting Servers

If you're done using a system, delete it using this option.

Keep your budget in mind :-)

 

Deleting Projects

Most important sysadmin task: Housekeeping.

Don't let old stuff drag you down, so let's delete our project once it's empty and any testing credits were used up :-)