From 0a64fea18160e3cacdf026ae1edd9fafcdc5581f Mon Sep 17 00:00:00 2001 From: Edward Vielmetti Date: Mon, 12 Jun 2017 16:37:13 -0400 Subject: [PATCH 1/5] [WIP} Packet platform docs Work in progress to identify documentation needed for Packet as a linuxkit provider. --- docs/platform-packet.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index f34e22e79..74d5035c8 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -1,13 +1,32 @@ -# LinuxKit with bare metal on packet.net +# LinuxKit with bare metal on Packet -TBD +Packet is a bare metal hosting provider. + +You will need to have created a Packet account and a project to +put this new machine into. You will also need to create an API key +with appropriate permissions to + +Linuxkit on Packet boots via iPXE. This requires that you have +an HTTP server on which you can store your images. At the moment +there is no equivalent to "linuxkit push" to upload these images, +so you will have to host them yourself. ## Boot +`linuxkit run packet -api-key PACKET_API_KEY -base-url http://path-to-my-pxe-boot-server ...` + +Servers take several minutes to provision. + ## Console +Prepare an SSH public key? + ## Disks +Elastic storage, pointer to. + ## Networking +Make sure that the interfaces come up bonded? + ## Integration services and Metadata From 9cb380f927bc70fcedcd518f5ee40e757920b877 Mon Sep 17 00:00:00 2001 From: Edward Vielmetti Date: Thu, 15 Jun 2017 13:48:08 -0400 Subject: [PATCH 2/5] update with additional information Add some details and links throughout, still work in progress. --- docs/platform-packet.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index 74d5035c8..a63877ebb 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -4,26 +4,35 @@ Packet is a bare metal hosting provider. You will need to have created a Packet account and a project to put this new machine into. You will also need to create an API key -with appropriate permissions to +with appropriate read/write permissions to allow the image to boot. Linuxkit on Packet boots via iPXE. This requires that you have an HTTP server on which you can store your images. At the moment there is no equivalent to "linuxkit push" to upload these images, -so you will have to host them yourself. +so you will have to host them yourself. The images can be served +from any HTTP server, though in the interest of performance you'll +want to locate those images near the data center that you're booting in. + +Linuxkit is known to work on the Type 0 server at Packet. ## Boot `linuxkit run packet -api-key PACKET_API_KEY -base-url http://path-to-my-pxe-boot-server ...` -Servers take several minutes to provision. +Servers take several minutes to provision. During this time their +state can be seen from the Packet console. ## Console -Prepare an SSH public key? +If your LinuxKit system does not include an ssh or remote console +application, you can still connect to it via the Packet SOS ("Serial over SSH") +console. See https://help.packet.net/technical/networking/sos-rescue-mode +for details on that mode. ## Disks -Elastic storage, pointer to. +At this moment the Linuxkit server boots from RAM, with no persistent +storage. ## Networking From af87a4c7a324e5c96eef7349aacc62d2c3cdf0ae Mon Sep 17 00:00:00 2001 From: Edward Vielmetti Date: Fri, 16 Jun 2017 10:39:09 -0400 Subject: [PATCH 3/5] Update with additional details Added some details throughout to make this more informative. --- docs/platform-packet.md | 64 ++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index a63877ebb..479232380 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -1,27 +1,59 @@ # LinuxKit with bare metal on Packet -Packet is a bare metal hosting provider. +[Packet](http://packet.net) is a bare metal hosting provider. -You will need to have created a Packet account and a project to -put this new machine into. You will also need to create an API key +You will need to [create a Packet account] and a project to +put this new machine into. You will also need to [create an API key] with appropriate read/write permissions to allow the image to boot. -Linuxkit on Packet boots via iPXE. This requires that you have -an HTTP server on which you can store your images. At the moment -there is no equivalent to "linuxkit push" to upload these images, -so you will have to host them yourself. The images can be served -from any HTTP server, though in the interest of performance you'll -want to locate those images near the data center that you're booting in. +[create a Packet account]:https://app.packet.net/#/registration/ +[create an API key]:https://help.packet.net/quick-start/api-integrations -Linuxkit is known to work on the Type 0 server at Packet. +Linuxkit is known to boot on the [Type 0] server at Packet. +Support for other server types, including the [Type 2A] ARM server, +is a work in progress. + +[Type 0]:https://www.packet.net/bare-metal/servers/type-0/ +[Type 2A]:https://www.packet.net/bare-metal/servers/type-2a/ ## Boot -`linuxkit run packet -api-key PACKET_API_KEY -base-url http://path-to-my-pxe-boot-server ...` +Build an image with `moby build`. The [packet.yml](https://github.com/vielmetti/linuxkit/blob/master/examples/packet.yml) +example file provides a suitable template to start from. + +Linuxkit on Packet [boots via iPXE]. This requires that you have +an HTTP server on which you can store your images. At the moment +there is no equivalent to "linuxkit push" to upload these images, +so you will have to host them yourself. The images can be served +from any HTTP server, though in the interest of performance you may +want to locate those images near the data center that you're booting in. + +[boots via iPXE]:https://help.packet.net/technical/infrastructure/custom-ipxe Servers take several minutes to provision. During this time their state can be seen from the Packet console. +``` +$ linuxkit run packet --help +USAGE: linuxkit run packet [options] [name] + +Options: + + -api-key string + Packet API key + -base-url string + Base URL that the kernel and initrd are served from. + -hostname string + Hostname of new instance (default "moby") + -img-name string + Overrides the prefix used to identify the files. Defaults to [name] + -machine string + Packet Machine Type (default "baremetal_0") + -project-id string + Packet Project ID + -zone string + Packet Zone (default "ams1") + ``` ## Console If your LinuxKit system does not include an ssh or remote console @@ -32,10 +64,16 @@ for details on that mode. ## Disks At this moment the Linuxkit server boots from RAM, with no persistent -storage. +storage and there is no code that mounts disks. ## Networking -Make sure that the interfaces come up bonded? +Some Packet server types have bonded networks; the current code does +not support that. ## Integration services and Metadata + +Packet supports [user state](https://help.packet.net/technical/infrastructure/user-state) +during system bringup, which enables the boot process to be more informative about the +current state of the boot process once the kernel has loaded but before the +system is ready for login. From 08d26d514092c6e09b8acd86f59294edebaee3d8 Mon Sep 17 00:00:00 2001 From: Edward Vielmetti Date: Fri, 16 Jun 2017 10:56:39 -0400 Subject: [PATCH 4/5] Note that Linuxkit does not survive a reboot Signed-off-by: Edward Vielmetti --- docs/platform-packet.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index 479232380..cb5fa93bd 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -64,7 +64,8 @@ for details on that mode. ## Disks At this moment the Linuxkit server boots from RAM, with no persistent -storage and there is no code that mounts disks. +storage and there is no code that mounts disks. As a result, +when the Linuxkit image reboots, all is lost. ## Networking From 52caffb4c462172c8b9e8c421d675ca15170644a Mon Sep 17 00:00:00 2001 From: Edward Vielmetti Date: Fri, 16 Jun 2017 11:44:41 -0400 Subject: [PATCH 5/5] address questions from avsm re Type 1 servers, persistent iPXE Signed-off-by: Edward Vielmetti --- docs/platform-packet.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index cb5fa93bd..32943ff71 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -9,11 +9,13 @@ with appropriate read/write permissions to allow the image to boot. [create a Packet account]:https://app.packet.net/#/registration/ [create an API key]:https://help.packet.net/quick-start/api-integrations -Linuxkit is known to boot on the [Type 0] server at Packet. +Linuxkit is known to boot on the [Type 0] +and [Type 1] servers at Packet. Support for other server types, including the [Type 2A] ARM server, is a work in progress. [Type 0]:https://www.packet.net/bare-metal/servers/type-0/ +[Type 1]:https://www.packet.net/bare-metal/servers/type-1/ [Type 2A]:https://www.packet.net/bare-metal/servers/type-2a/ ## Boot @@ -67,6 +69,14 @@ At this moment the Linuxkit server boots from RAM, with no persistent storage and there is no code that mounts disks. As a result, when the Linuxkit image reboots, all is lost. +Packet supports a [persistent iPXE] mode through its API +which would allow a server to come back up after a reboot +and re-start the PXE process. This is great for testing your +provisioning scripts. This is not yet available directly +through Linuxkit. + +[persistent iPXE]:https://help.packet.net/technical/infrastructure/custom-ipxe + ## Networking Some Packet server types have bonded networks; the current code does