From 306a7f4be68f5adb2b0470be33df2f183ca602df Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Mon, 14 Aug 2017 16:53:09 +0100 Subject: [PATCH] docs: Update Packet.net documentation Signed-off-by: Rolf Neugebauer --- docs/platform-packet.md | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) diff --git a/docs/platform-packet.md b/docs/platform-packet.md index a00d3f8bb..a9afcba0e 100644 --- a/docs/platform-packet.md +++ b/docs/platform-packet.md @@ -24,47 +24,25 @@ packet --help` for the options and environment variables. ## Boot - - LinuxKit on Packet boots the `kernel+initrd` output from moby via [iPXE](https://help.packet.net/technical/infrastructure/custom-ipxe). iPXE -booting requires a HTTP server on which you can store your images. At -the moment there is no builtin support for this, although we are -working on this too. +booting requires a HTTP server on which you can store your images. The +`-base-url` option specifies the URL to the HTTP server. -A simple way to host files is via a simple local http server written in Go, e.g.: +If you don't have a public HTTP server at hand, you can use the +`-serve` option. This will create a local HTTP server which can either +be run on another Packet machine or be made accessible with tools +like [ngrok](https://ngrok.com/). -```Go -package main - -import ( - "log" - "net/http" -) - -func main() { - // Simple static webserver: - log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir(".")))) -} -``` - -and then `go run` this in the directory with the `kernel+initrd`. - -The web server must be accessible from Packet. You can either run the -server on another Packet machine, or use tools -like [ngrok](https://ngrok.com/) to make it accessible via a reverse -proxy. - -You then specify the location of your http server using the -`-base-url` command line option. For example, to boot the -toplevel [linuxkit.yml](../linuxkit.yml) example: +For example, to boot the toplevel [linuxkit.yml](../linuxkit.yml) +example with a local HTTP server: ```sh moby build linuxkit.yml # run the web server # run 'ngrok http 8080' in another window -PACKET_API_KEY= linuxkit run packet -base-url http://9b828514.ngrok.io -project-id linuxkit +PACKET_API_KEY= linuxkit run packet -serve :8080 -base-url http://9b828514.ngrok.io -project-id linuxkit ``` **Note**: It may take several minutes to deploy a new server. If you