Add moby run packet to boot on baremetal Packet.net hosts

This uses the Packet.net API and iPXE to boot a Moby host.
There are several enhancements coming soon, such as SSH key
customisation, but this PR is sufficient to boot a host and
then use the web interface to get console access.

The user must currently upload the built artefacts to a public
URL and specify it via --base-url, e.g.:
moby run packet --api-key <key> --project-id <id> \
  --base-url http://recoil.org/~avsm/ipxe --hostname test-moby packet

See #1424 #1245 for related issues.

Signed-off-by: Anil Madhavapeddy <anil@docker.com>
This commit is contained in:
Anil Madhavapeddy
2017-04-12 12:48:09 +01:00
parent 09e7b15dd9
commit e61941999f
20 changed files with 1828 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ func runUsage() {
fmt.Printf(" hyperkit [macOS]\n")
fmt.Printf(" qemu [linux]\n")
fmt.Printf(" vmware\n")
fmt.Printf(" packet\n")
fmt.Printf("\n")
fmt.Printf("'options' are the backend specific options.\n")
fmt.Printf("See 'moby run [backend] --help' for details.\n\n")
@@ -43,6 +44,8 @@ func run(args []string) {
runGcp(args[1:])
case "qemu":
runQemu(args[1:])
case "packet":
runPacket(args[1:])
default:
switch runtime.GOOS {
case "darwin":