30 Commits
Author SHA1 Message Date
Jonathan Boulle 10beb3920d build: allow setting of stage1 image path
This introduces the ability to set the default stage1 image path for
`rkt run` by setting the environment variable RKT_STAGE1_IMAGE at build
time (i.e when invoking ./build).

The variable should be set to the fully qualified path at which rkt can
find the stage1 image - for example:

	RKT_STAGE1_IMAGE=/usr/lib/rkt/stage1.aci ./build

Rocket will use this environment variable to set the default value for
the stage1-image flag. If the value is _not_ set, it will continue to
use the heuristic it does today to guess the location of the stage1
image, by looking for a file called stage1.aci that is in the same
directory as rkt itself.
2015-02-12 16:48:26 -08:00
Jimmy Zelinskie 67e4247e25 build: build network plugins only on linux
Without this, go throws an error about no source files available because
all of the source files for github.com/vishvananda/netlink/nl end in
"_linux.go".
2015-02-06 12:48:17 -05:00
Jonathan Boulle 72395d1ffa *: vendor appc spec
Take two at getting the spec vendored into Rocket with Godep.
Since actool is used during the construction of the stage1.aci, it
really needs to be vendored too to prevent any unexpected divergence
between whatever version the user happens to have in their PATH. Thus,
we introduce a silly dummy package (stage1/dummy.go) to coerce Godep
into vendoring actool. This also requires a slight rearrangement of the
appc repo, moving some functionality from actool itself into the aci
package.
2015-02-05 14:36:40 +01:00
Eugene Yakubovich 630beda3ae net: cnvt ipmanager to ipam plugin; make use of ipam plugins
- Convert ipamanager into IPAM plugin (static) that uses env
variables instead of cmd line args
- Make bridge and veth plugins call out to IPAM plugin
- Refacor code around the new IPAM plugins
2015-02-02 18:15:51 -08:00
Vito Caputo bae52e60ae *: switch stage1 to aci image format
One may now specify an alternative stage1 in a style like run and fetch:
rkt run --stage1-image foo.com/rocket/stage1 app

--stage1-image defaults to "stage1.aci" within the same directory as the rkt
binary.  This is discovered at runtime via "/proc/self/exe"; as long as the rkt
executable and stage1.aci share a directory it should "just work" regardless of
the directory's location and where rkt is executed from.
2015-01-30 10:51:15 -08:00
Vito Caputo deaf549211 build: use go-bindata -nomemcopy=true to reduce runtime memory req. 2015-01-23 14:58:46 -08:00
Eugene Yakubovich 25ecad8162 Integrate metadata service
- Move metadatasvc into rkt as a subcommand
- Add option to spawn metadatasvc from rkt run
- Register container with metadatasvc
- Removes anti-spoofing logic -- this belongs in the network plugin

Fixes #33
2015-01-23 13:25:46 -08:00
Jonathan Boulle 53319e7f0d build: don't fail if GOPATH is unset
build should be callable even if the user's env has no GOPATH in it
2015-01-22 17:13:02 -08:00
Eugene Yakubovich fae32223e6 net: add --private-net to run cmd 2015-01-22 15:38:25 -08:00
Eugene Yakubovich ba9b6bc82a net: use env vars for plugin params; use stage1 rootfs for builtins
Simplifying the plugin interface. No more HTTP interface and plugin
configs. Plugin type maps to executable name in stage1 rootfs or
on host in a well known dir. Env vars are used for parameter passing
to the plugin. Also, default net conf is kept in stage1 rootfs to make
private networking work "out of the box".
2015-01-22 15:17:51 -08:00
Vito Caputo f6231f333a build/test: cleanup /tmp file and directory leaks 2015-01-21 14:17:49 -08:00
Eugene Yakubovich cda3e42555 incorporating code review feedback 2015-01-12 16:58:03 -08:00
Eugene Yakubovich 39ac3a2edf added proposed network plumbing 2015-01-12 16:58:03 -08:00
Vito Caputo 0eb317e119 stage1: componentize stage1 rootfs construction and use make
* Move stage1/*.go to stage1/init/

 * Split stage1/mkrootfs.sh's logical components into subdirs of
   stage1/rootfs:

   - Deriving tree from CoreOS image and caching: rootfs/usr
     * Cache management in cache.sh
     * File extraction and picking in mkbase.sh
     * File inclusions split under usr/manifest.d

   - Fakesdboot: rootfs/shim/
     * Renamed to 'shim' since we've gone past just tricking nspawn

   - Root compositing and aggregation of odds and ends: rootfs/aggregate

 * Introduction of Makefiles for every component and a simple recursive
   parallel-capable make for the rootfs tip.

 * Update toplevel build script to invoke make on stage1/rootfs and find
   init sources in stage1/init, .gitignore additions as well.

 * Removed stage1/mkrootfs.sh

 Since the image cache has moved there will be an image download on first build
 in the new arrangement.  The caching has also been improved to handle CoreOS
 image revision changes by naming the cached signature with a hash of the URL.
2014-12-19 16:39:44 -08:00
Jonathan Boulle a1d7eb8e9c *: move spec to new home
The appc spec has moved! Its new home is at https://github.com/appc/spec

This removes the spec (since it has already been migrated), and adds
placeholders linking to the new repo. It also updates rocket to
reference the spec repo _directly_ (i.e. NOT godepped). This means that
people will need to maintain the spec in their gopath for now when
building rocket.
2014-12-09 12:27:35 -08:00
Shaun Jackman 96243318b7 build: Fix non-POSIX commands realpath and mktemp
realpath is not POSIX and not available on all systems.
POSIX mktemp requires a mandatory template argument.
2014-12-07 17:46:33 -08:00
Jonathan Boulle 9e2c107d0f build: only build ACE validator if go linux/amd64 is available 2014-12-05 16:25:15 -08:00
Jonathan Boulle cb78269134 *: build a limited version of rkt on non-Linux
This introduces build tags to allow the actual rkt binary to be built on
platforms other than Linux. This does not change our current focus of rocket
being targeted at the Linux/amd64 platform, but means that users on e.g.
OS X and other operating systems can at least use `rkt fetch` to
retrieve ACI images and so forth.
2014-12-05 12:26:29 -08:00
Brandon Philips 915af3346a app-container: rename _ to - in validator 2014-12-01 01:41:23 -05:00
Jonathan Boulle 9b79880d91 *: cmd->rkt, split out rkt/ package 2014-11-30 11:05:35 -08:00
Vito Caputo 5ff85976d0 stage0: bundle stage1 rootfs and init binaries into rkt exe
This also runs mkrootfs.sh if necessary
2014-11-26 20:27:43 -08:00
Jonathan Boulle b128cc1218 appc: rename acfmt -> actool 2014-11-26 14:10:48 -08:00
Jonathan Boulle 049aa1e787 *: import container spec 2014-11-26 12:16:28 -08:00
Jonathan Boulle 28fff9c99d *: split out rkt executable, add CLI framework
In preparation for adding other top-level rkt commands (other than
"run"), break out stage0 and add a simple framework for adding
commmands.
2014-11-20 13:24:04 -08:00
Eugene Yakubovich 93c2ee9519 add http logging; cleanup 2014-11-18 15:59:17 -08:00
Brandon Philips acbbeae80c build: use environment GOPATH for now
until we vendor containers/standard use the user's GOPATH for now.
2014-11-18 14:10:30 -08:00
Jonathan Boulle 6dc57a7281 build: rename stage1 -> init 2014-11-13 23:38:34 -08:00
Jonathan Boulle 4b7162f8a1 *: rkt -> stage0, scf -> stage1 2014-11-13 23:33:14 -08:00
Jonathan Boulle 5b8ed9e617 build: add stage1 2014-11-13 22:09:06 -08:00
Jonathan Boulle 78c67f76cf rkt: add basic main + build script 2014-11-13 13:39:31 -08:00