Commit Graph

238 Commits

Author SHA1 Message Date
Rolf Neugebauer
358a020b1a cmd: Update vendored google cloud API
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-17 11:30:44 +00:00
Rolf Neugebauer
63ec7f58c0 vendor: Update moby tool to latest
This includes support for CPU microcode handling

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-16 10:27:58 +00:00
Ian Campbell
6483a2e6dc linuxkit: print response status, not the response object when validating a URL
go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit)
reported:

    error: arg resp for printf verb %s of wrong type: *net/http.Response (vet)

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-15 17:24:36 +00:00
Avi Deitcher
6c015141f5 Split linuxkit run -data options into string and file
Signed-off-by: Avi Deitcher <avi@deitcher.net>
2018-01-15 16:57:03 +02:00
Ian Campbell
57cf8df3b2 Revendor moby tool to f816553d2f
Pulls in:

f816553 Merge pull request #195 from ijc/prepend-rootfs-mounts
0a6d69d Prepend the rootfs mounts to the user specified runtime.mounts.

Signed-off-by: Ian Campbell <ijc@docker.com>
2018-01-11 12:22:34 +00:00
Rolf Neugebauer
cd1a472678 Merge pull request #2852 from rn/pktpxe
Improve packet.net support
2018-01-11 12:12:47 +00:00
thebsdbox
8b9eddf6f6 Added capability to find a host if -hostname isn't specified
Will return the list of all hosts that are part of a vCenter DataCenter
and choose one at random to use.

Signed-off-by: Dan Finneran <daniel.finneran@gmail.com>
2018-01-10 19:44:18 +00:00
Rolf Neugebauer
1cef947ee1 cmd/serve: Add a new 'linuxkit serve' command
This simply starts a web server serving the specified directory.
It's useful for PXE booting.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:48:47 +00:00
Rolf Neugebauer
16ae50b593 cmd/packet: Add linuxkit push packet support
This currently just copies the kernel/initrd to a destination
and writes the iPXE script there as well. The scheme is flexible
enough to support scp or other means for pushing in the future.

The kernel/initrd are conditionally decompressed (default for arm64).

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:35 +00:00
Rolf Neugebauer
2431dd9950 cmd/packet: Use IPXEScriptURL instead of passing script via Userdata
Using the userdat to pass the iPXE script precludes us from passing
actual userdata to the instance. Instead pass a URL to the iPXE script.
The script is expected to be a <base-url>/<name>-packet.ipxe.

When starting a server also serve the iPXE script from memory (not
the file system). The http server needed extending to differentiate
between the serving files and the iPXE script and ServeMux is used
to differentiate based on path.

A subsequent commit will provide an option to write the iPXE script
to disk.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:34 +00:00
Rolf Neugebauer
8ae4f5bc86 cmd/packet: Factor out the iPXE script creation
Subsequent commits will use it in other places.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:24 +00:00
Rolf Neugebauer
90510777ad cmd/packet: Tidy up the code
prefix packet.net specific functions with 'packet' and make
non-packet specific functions, such as validateHTTPURL()
more generic so that they can easily be moved to 'utils.go'
should they be needed elsewhere.

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:24 +00:00
Rolf Neugebauer
50c4eb5461 cmd/packet: Actually use the -serve argument
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:24 +00:00
Rolf Neugebauer
007854f85e cmd/packet: Fix API changes in the new version of the go bindings
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:23 +00:00
Rolf Neugebauer
b272819540 cmd/packet: Update the vendored packet.net go binding
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2018-01-10 17:45:23 +00:00
Justin Cormack
baac3e98c9 Update linuxkit deps in line with moby
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-04 13:55:42 +00:00
Justin Cormack
b0ea58bd90 Update Moby tool
- containerd 1.0 vendoring
- yaml omitempty
- null pointer dereference

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-01-04 12:14:51 +00:00
Justin Cormack
9e65276160 Merge pull request #2821 from rgl/master
add the -gui flag to vbox run
2018-01-02 11:06:22 +00:00
Justin Cormack
1e97929ec5 Fix sriov flag on AWS
This needs to be set to nil if empty.

Signed-off-by: Justin Cormack <justin@specialbusservice.com>
2017-12-27 18:17:45 +00:00
Rui Lopes
f36b4a7e59 add the -gui flag to vbox run
Signed-off-by: Rui Lopes <rgl@ruilopes.com>
2017-12-24 10:15:02 +00:00
Ilya Dmitrichenko
142ebf6f82 Improve error message for new packages
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
2017-12-18 16:46:00 +00:00
Ian Campbell
dd799eb230 Bump moby tool to d9d2a91780
656bd87fd2...d9d2a91780

d9d2a91 Merge pull request #193 from ijc/bugfix-191
307f13b Defer dockerRm until we are finished with the contents
ebd7228 Merge pull request #191 from ijc/reduce-memory-via-tempfiles
3045a80 Stream `docker export` directly to consumer
9f44acf Generate intermediate image into a temp file
9558740 Add cpu and mem profiling options

Reduces the memory usage substantially.

While here make some notes about the need to update src/cmd/linuxkit/build.go
where people might see them.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-14 10:34:23 +00:00
Rolf Neugebauer
0e1133281b Update all YAML files with new packages
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Rolf Neugebauer
9f175e1e6c Update the use of linuxkit/qemu to the alpine:3.7 base
Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
2017-12-08 16:25:13 +00:00
Rolf Neugebauer
86f12e15f0 Merge pull request #2796 from pcfdev-forks/master
Ensure VPNKit process is properly killed when errors occur
2017-12-08 11:26:49 +00:00
Rolf Neugebauer
4a5e06a033 Merge pull request #2797 from pcfdev-forks/vpnkit-path
Allow vpnkit executable path to be specified
2017-12-06 13:23:45 +00:00
Justin Cormack
241e3a1bdb Connect cable on virtualbox networking
fix #2798

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-12-05 16:03:47 -06:00
Dave Protasowski
2d6f4c5484 Allow vpnkit executable path to be specified
Signed-off-by: Steve Hiehn <shiehn@pivotal.io>
Signed-off-by: Dave Protasowski <dprotaso@gmail.com>
2017-12-05 10:06:58 -05:00
Steve Hiehn
ec45349638 Register vpnkit publish port clean up function as a logrus.ExitHandler
Signed-off-by: Dave Protasowski <dprotaso@gmail.com>
2017-12-05 10:05:23 -05:00
Dave Protasowski
c9b4f8306a Ensure VPNKit process is properly killed when errors occur
The log.Fatal* calls will leak the vpnkit process since
defer functions are not invoked when os.Exit(int) is invoked

We register an ExitHandler with logrus - that'll be invoke when
log.Fatal* is called

Signed-off-by: Steve Hiehn <shiehn@pivotal.io>
Signed-off-by: Dave Protasowski <dprotaso@gmail.com>
2017-12-05 09:48:09 -05:00
Ian Campbell
ce639e8080 linuxkit: implement docker image dependencies for pkg build.
This allows the `linuxkit/kubernetes` "image-cache" packages to use a standard
`linuxkit pkg build` based flow rather than requiring surrounding scaffolding.

Fixes #2766. Compared with the original (actually, the second) proposal made in
issue #2766, the field is `docker-images` rather than `images` to allow for
future inclusion of e.g. `containerd-images`.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-04 14:14:45 +00:00
Ian Campbell
98d46945d1 linuxkit: Use docker image «foo» consistently
In preference to the `docker «foo»` shortcut/aliases.

Better to be more specific.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-04 12:12:41 +00:00
Ian Campbell
8eed6a4b38 linuxkit: Rename Pkg.pkgPath to Pkg.path
Previous name a bit stuttery.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-04 12:12:41 +00:00
Justin Cormack
090abf3254 Merge pull request #2790 from justincormack/vbox
Add VirtualBox support to linuxkit run
2017-12-02 11:01:51 +00:00
Justin Cormack
3251f67015 Add VirtualBox support to linuxkit run
You can use `linuxkit run vbox ...` to run using Oracle VirtualBox.
ISO or raw should be supported, and you can specify EFI.

Some more options may be useful in future.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-12-01 21:48:21 +00:00
Ian Campbell
d03e6d65e2 linuxkit pkg: include linuxkit tool's version info in labels
Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-01 13:59:45 +00:00
Ian Campbell
13adecbc3e linuxkit: move version info to subpackage
Will avoid circular includes when I reference from pkglib too.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-12-01 13:55:43 +00:00
Rolf Neugebauer
9a83407986 Merge pull request #2782 from ijc/hyperkit-net-fix
hyperkit: split network option into 3
2017-12-01 11:06:19 +00:00
Ian Campbell
0d9de644b8 hyperkit: split network option into 3
vpnkit mode has one or two arguments (eth socket and port control socket).

If splitting into only 2 then
    vpnkit,vpnkit-state/eth.sock,vpnkit-state/port.sock
becomes
    2: vpnkit
    1: vpnkit-state/eth.sock,vpnkit-state/port.sock
rather than
    0: vpnkit
    1: vpnkit-state/eth.sock
    2: vpnkit-state/port.sock
as desired.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-29 15:12:30 +00:00
Justin Cormack
6e9b1bb09a Add support for newer AWS networking types
- ENA networking is what the very new (and bare metal) machines have
- sriov "simple" mode is Intel VF passthrough

I reflect the underlying APIs, which is bool for ENA and a string
for sriov even though there is currently only one valid sriov option...

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-29 14:46:48 +00:00
Ian Campbell
1f6c1a59ca linuxkit pkg: Add config field to build.yml
This is a `moby.ImageConfig` struct which is marshalled into JSON and added as
the `org.mobyproject.config` label on the built image.

Convert `pkg/sysctl` as PoC.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-28 12:01:39 +00:00
Ian Campbell
ae53577078 linuxkit pkg: allow skipping build before push
If doing the build separately from pushing (as I am intending in
https://github.com/linuxkit/kubernetes/pull/8/) it is desirable to avoid a
second build when pushing.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-24 09:52:27 +00:00
Justin Cormack
83522d81fd Merge pull request #2761 from justincormack/restore-build
Restore linuxkit build
2017-11-21 10:21:39 +00:00
Justin Cormack
ca0b1309b0 Update vendoring for moby/tool
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 17:06:47 +00:00
Ian Campbell
cef9d11f58 Only create metadata if file is non-zero sized
The recent iso9660wrap vendoring bump means this does now work, but it seems
pointless in this case so skip.

Relates to https://github.com/linuxkit/kubernetes/issues/4

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-20 15:26:51 +00:00
Ian Campbell
a5e5d42368 Move metadata ISO creation to common code
This code was identical in the QEMU and HyperKit cases. Move it to util.go and
wrap it in a function, with minimal changes for returning an error.

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-20 15:22:02 +00:00
Ian Campbell
db9a783821 Bump iso9660wrap to baf8d62ad315
Reduces the linuxkit binary by 12k by removing The Raven. Also allows zero
sized files to be created, see https://github.com/linuxkit/kubernetes/issues/4

4606f848a0...baf8d62ad3

Signed-off-by: Ian Campbell <ijc@docker.com>
2017-11-20 15:17:57 +00:00
Justin Cormack
eef8ab7757 Add linuxkit build, using vendored moby/tool as a library
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-20 14:48:48 +00:00
Justin Cormack
a8dacba2c5 Only add in ttyS1 to kernel cmdline on Packet if not there already
This is not in most examples, but is in the Packet example, and
causes a duplicated console.

fix #2735

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2017-11-15 15:39:08 +00:00
Dave Protasowski
f598d9aff2 allow hyperkit console input/output to be redirected
Signed-off-by: Dave Protasowski <dprotaso@gmail.com>
Signed-off-by: Steve Hiehn <shiehn@pivotal.io>
2017-11-14 11:44:51 -05:00