Commit Graph

74 Commits

Author SHA1 Message Date
mpl 753bd38ca9 misc/docker/server: build with make.go
So far, when building camlistored docker image for CoreOS, we were not
using make.go, and we were neither running gopherjs nor embedding the
resources (but rather provide the UI resources at their default
filesystem location).

Now that we're using gopherjs for the web UI, it is a hard dependency
for the camlistore server.
We could reproduce the steps in make.go to build gopherjs, run it to
build the web ui resources, and then move the resources at the right
place, but since make.go already does the equivalent work it seems
to make more sense to use it, which is the main point of this CL.

Similarly, it seems to make more sense to now build a binary with the
resources embedded, which is the default make.go behaviour, instead of
building a "raw" camlistored, and provide the resources as additional
directories in the container image, so this CL takes that approach too.

Finally, it was necessary to add the "-static" flag to make.go, so we
can keep on building a static camlistored binary, that does not rely on
libc for DNS. Because our container image is FROM SCRATCH, with just the
necessary binaries, in order to get a container image of a reasonable
size.

One drawback of now using make.go in
misc/docker/server/build-camlistore-server.go is we're doing some
unnecessary (since we're already running in the isolation of a
container) copying to the virtual gopath, but that seems a very tiny
price to pay. Especially considering how rarely we run that code.

Change-Id: I416c86d366cd4ed2d3b8b1636a6a65a83b9f15d7
2017-04-05 02:10:12 +02:00
mpl 0167d40164 vendor: update gopherjs to 1.8-1
rev b9bcb1da229a59cc1e1d168401662cb6450aae08

Also added pkg/misc/fakefsnotify just so we only have to do:
-       "github.com/fsnotify/fsnotify"
+       fsnotify "camlistore.org/pkg/misc/fakefsnotify"
in vendor/github.com/gopherjs/gopherjs/build/build.go
in order to avoid vendoring fsnotify, without having to grossly
patch the gopherjs code as we previously did.

Change-Id: Ic106a6afa1117d2061415355c236433f835895f1
2017-02-18 01:06:58 +01:00
mpl c35cd68b5c make.go: switch to Go 1.8
Same with friends under misc/, and travis CI.

Change-Id: Iadf67a81b0eb044684f3acf24415ccf12dc24e96
2017-02-17 00:23:03 +01:00
mpl 02548899a8 make.go: increase, and enforce, git rev to 10 chars
Issue #839 suggests to not cut the rev at all, and let it be user
defined. I have no good argument against, but I'm taking the more
conservative approach suggested by others in issue #888.

Fixes #888

Change-Id: Id65b1b074e6646a756353119a12081330775e066
2017-01-30 17:35:33 +01:00
mpl 85ebd80247 misc/docker: bucket.List + CAMLI_GOPHERJS_GOROOT fixes
Change-Id: Id2d8a7328fdc9d9c41fec479d9a81e51235a3bed
2017-01-20 20:28:14 +01:00
mpl d96bdbdf41 misc/docker/go: go1.8rc2
Change-Id: I4086f506841722e085f302c9578d558c9a4fb2d9
2017-01-19 23:18:57 +01:00
mpl b0b6a0a89e vendor: update go4.org/wkfs/gcs
Requires updating vendor/cloud.google.com/go/storage because of the
BucketHandle.List removal, which in turns triggers a bunch of other
updates or additions.

cloud.google.com/go/internal/optional
cloud.google.com/go/storage
at rev 641b1469e744485a8e6235bffc3b7bf366758a85

github.com/googleapis/gax-go
at rev da06d194a00e19ce00d9011a13931c3f6f6887c7

google.golang.org/api/*
at rev f7e067168bd43883b2156f16b6c2fd91beec76e2

Fixes #884

Change-Id: I7e27a24fa2ffbb747e66bde0d10dabaad1ac60d6
2017-01-05 16:58:18 +01:00
mpl 7254e81560 pkg/misc/amazon/s3: test against fake-s3 in docker
Fixes #424

Change-Id: Ib13946df3a5d868e10519576725e4d365ce27f64
2016-11-17 17:01:11 +01:00
mpl 5f699042cf misc/docker: restore check that we run in docker
Fixes #744

Change-Id: Ide28a48c229c71a4305a507bb5a6671910d6a1ab
2016-11-09 18:35:03 +01:00
mpl af3d4ad0f5 misc: fix google cloud use for release tools
Follow up of ab06dbd80d

Change-Id: Ifc71cc6cfcd5223f8789c7173a8046bfab45ac85
2016-09-27 20:01:34 +02:00
mpl a75f7e6c63 misc/docker: gensearchtypes.sh does not exist anymore
follow-up of f802f031cc

Change-Id: I4b30e84b98292bc79e2e4b55708711f30ec94fb6
2016-09-05 16:50:06 +02:00
mpl 2f4a94bca6 misc/docker: chmod u+x on gensearchtypes.sh
Because docker unpacks the file without its +x, which makes go generate
fail when trying to execute it.

Change-Id: I9998b849110437c6faff89090f5dbe98fe2f2c9b
2016-08-31 02:29:10 +02:00
mpl cda8c932d6 misc/docker: Go1.7
Change-Id: I861c91e919b46862037b1fad8cc89e964d4f221c
2016-08-31 01:20:34 +02:00
mpl 1037a9c730 misc/docker: update VERSION file when pushing new image
cf rev 72c6f6adcf

Change-Id: Ibd4037e669ec9387e5bd0935bfbeb98338ed9880
2016-07-26 16:41:42 +02:00
mpl dec44e57fe misc/docker: add zoneinfo to GCE docker image
Fixes #736

Change-Id: Ie58719716e1b4759ccec99a46ecc104eb86449ce
2016-05-11 16:55:02 +02:00
mpl 93a7f46720 make.go: remove --use_gopath
Because it makes full integration with gopherjs impossible (without
polluting the user's GOPATH), as long as
https://github.com/gopherjs/gopherjs/issues/415 is not fixed.

Also it is kind of antithetical with the point of make.go anyway.

We still rely on CAMLI_MAKE_USEGOPATH for the integration tests that run
make.go to know that they shouldn't recursively create another temp
GOPATH (when they're already in such a temp dir, because they're started
through devcam test).

Change-Id: Icc6af46ec5976fdf08e9b8bf4249e307a15499cf
2016-05-09 17:22:39 +02:00
mpl f7cee61985 misc/docker: update zip-source.go
Because some files have been renamed/deleted.

Change-Id: I7c09e44f8bcb07d8fd0440bc02f6ba25a450928a
2016-05-05 17:17:21 +02:00
mpl 6a80dd874d misc/docker/go: go 1.6.2
Change-Id: Ib1e479f02f1b103b371ca80d9f8a511f4f398e1a
2016-04-29 12:20:09 -07:00
mpl a0276d4f9d misc/docker: replace CopyObject calls
storage.Client.CopyObject does not exist anymore. Replaced with CopyTo
calls.

Also removed checks based on the presence of /.dockerinit to know
whether we're on docker because apparently they're gone or something.
I'll investigate why and a replacement later; we want a new GCE docker
image asap and I'm pressed for time.

Change-Id: I6b3ebcb048f03bdf53db94b41fe96ddcb6ed7537
2016-04-29 11:48:50 -07:00
mpl b43cfe22b9 misc/docker: build ignore for standalone programs
Fixes #713

Change-Id: I964939a3d5de6eb0f3ab0321fd7447774751c92d
2016-04-22 16:15:04 -07:00
mpl d2f50293cd misc/docker: rm third_party in zip-source
Change-Id: Ica0c61e164390a19944a0b3448b8468761f58402
2016-04-21 15:09:03 -07:00
mpl 07c0c9c797 misc/docker: fix third_party move for docker image
Change-Id: Id8146b3555c2758871e6d13474595165bee646a2
2016-04-21 14:58:19 -07:00
mpl 95ff1f0b8a misc/docker: go 1.6.1
Change-Id: Ib03d0ba711464b4fc18d899ee21fac6195f037ae
2016-04-13 16:35:03 +02:00
Mathieu Lonjaret 4f8911ba92 Merge "misc/docker/release: zip-source.go" 2016-04-11 20:26:18 +00:00
mpl 97d9ab6fe4 misc/docker/release: zip-source.go
Program to create the zip file containing the Camlistore source for a
release.

Issues #690 and #688

Change-Id: Ibbd3596a6c76cf70c2c29a415c3098bedf48b17f
2016-03-14 17:45:17 +01:00
Will Norris 77ed42edf8 add canonical import paths
The import path was added to the go file that included the package
documentation if one existed.  Otherwise, I used what seemed to be the
primary file for the package.

Fixes #689

Change-Id: If51be0e86529fd6f179e80af6781e639f8550fd2
2016-03-13 19:57:14 -07:00
Mathieu Lonjaret 1d7df7ceb4 Merge "misc/docker: stamp version as well to binaries" 2016-03-11 16:10:23 +00:00
mpl 35c1e2feb5 docker/go: bump to Go1.6
Change-Id: I03d015ef7cf51477626e9a80762580f3ee22cfef
2016-03-02 19:07:26 +01:00
mpl 21604dbe56 misc/docker: stamp version as well to binaries
Version in binaries will now be:
"X.Y (git rev xxxxx)"
if X.Y is specified with --tarball_version,
"xxxx"
otherwise.

Also uniformized the flags names and use in other programs.

Fixes #665

Change-Id: I958094f69b279437504854a3ff10e924d42c4fb6
2016-02-09 17:31:29 +01:00
mpl 58af581a24 dock.go: print binaries tarball path
Fixes issue #664

Change-Id: I8af4882be32c9452726a40f468b408367705a04c
2016-01-20 00:13:19 +01:00
mpl 0b1fbe5b5e dock.go: fix flag doc typo for version
Change-Id: Ic390de75f579892855688a832008678c607084b7
2016-01-07 00:15:47 +01:00
Brad Fitzpatrick 01eb400955 misc/docker/dock.go: make final download tarballs public
Change-Id: I842b76ce68fe99530bd0a85f0dbdcdd6925e1b5a
2015-12-30 10:50:42 -08:00
Brad Fitzpatrick 9d6fba7ea3 misc/docker/dock.go: make the copied Docker image also public
Change-Id: I8c292605b17efe5e285ea399cd32ba053d9728ad
2015-12-30 09:24:34 -08:00
Brad Fitzpatrick fbbbc8a81f Merge branch 'master' of https://camlistore.googlesource.com/camlistore 2015-12-30 09:07:10 -08:00
Brad Fitzpatrick 8888d4256f misc/docker/dock.go: fail if tarball_version and build_image both set
Change-Id: I985cba6a8de0eb9f5e5e008ea0153d4a417991da
2015-12-30 09:07:07 -08:00
mpl 3a902458ef misc/docker: TODOs for public link and version stamping
Change-Id: Ic1573ffa85e10e8f330676bfd7a19369763e4a4d
2015-12-30 11:58:01 +01:00
mpl f755ea4d4e misc/docker: bump Go to 1.5.2
Change-Id: Ida1ccb619ba4fceb0ce9ce813f03a5637040ba02
2015-12-29 02:00:52 +01:00
mpl 8759680c65 misc/docker: fix for new ldflags syntax
Change-Id: I047bed1b6d0a05597808265590c2216a7836cc77
2015-12-29 01:23:15 +01:00
mpl b5fe755da4 misc/docker/dock.go: add -version and -upload for release tarball
Change-Id: I74023e568861e163373e96e561bf7a1718bd868a
2015-12-27 23:39:36 +01:00
mpl d9a3bbc73a pkg/vendor: update google.golang.org/cloud/storage
rev 2375e186ca77be721a7c9c7b13a659738a8511d2

This is so we can use storage.Client in pkg/wkfs/gcs (and later in
other places) instead of pkg/googlestorage

Change-Id: I1d0eafbffd40e0326c41214692754f6671ec1d5d
2015-12-03 00:55:53 +01:00
Salman Aljammaz c90ae0219c add makefile to build systemd-docker from source
The systemd-docker image on Docker Hub uses an out of date version
of the Docker client. We build our own to get the version required
by recent CoreOS releases. See #646.

Change-Id: I0b1dc6c70f44055c8f92be44cf16269df8a63f0e
2015-10-19 20:52:48 +01:00
mpl a87632f593 dock.go: do not overwrite "production" tarball with WORKINPROGRESS
Change-Id: Ib71eaf028b56bc440a24d63af2f33156cb9935c6
2015-10-16 23:24:20 +02:00
mpl dc38e21fb1 dock.go: update CopyObject
its signature changed with last update of google.golang.org

Change-Id: I318f8966d3ced374607211c7ff27abe1ed30d28d
2015-10-16 23:03:21 +02:00
Mathieu Lonjaret 4c7a2b4aee Merge "dock.go: build windows tarball too" 2015-09-16 19:55:40 +00:00
mpl b432bf01c7 misc/docker: Go1.5 update + related simplifications
Update our Go image to use Go1.5.

Also, with Go1.5, we can compile static binaries (with CGO_ENABLED=0 and
--tags=netgo) without having to first rebuild Go itself from source with
CGO_ENABLED=0.

Finally, with Go1.5, we can now cross-compile straight outta the (linux)
binary tarball (without having to first build the necessary runtime in
src).

For both these above reasons, we don't need to use the Go -src tarball,
and we don't need to have a dedicated Go docker image for each GOOS we
cross-compile too.

Yay, progress!

Change-Id: Ibafb542a4771b151638e796ad3df78e0c8f1a4bf
2015-09-14 16:21:40 +02:00
mpl 14c87ca673 dock.go: build windows tarball too
Change-Id: I0b0f60828949fd321f99fc12eeef5d8e22d3cbc1
2015-08-25 19:26:55 +02:00
mpl 4d5cfb81c7 deploy, docker: go 1.5 tweaks for GCE launcher
Change-Id: Id1bae51742cb3efbb580181dc3c2ae6814fcab65
2015-08-18 15:01:04 +02:00
Brad Fitzpatrick 6f58fc2426 Fix build, move more stuff from third_party to vendor. 2015-08-18 10:19:49 +02:00
Brad Fitzpatrick 06f7accf31 Require Go 1.5 (due out soon), start move from third_party to vendor.
See https://golang.org/s/go15vendor

This commit moves the google.golang.org/cloud/... packages. The rest
of third_party will move later.

This commit is a dependency for some cloud logging work which we'll
develop in Camlistore's tree.
2015-08-15 22:45:11 +02:00
mpl e12d2aa765 misc/docker/dock.go: bump default rev
Some new features (build binaries tarballs) added in commit
988fc8a43c depend on some files that were
added to the camli repo in that very commit.
So for these new features to work, the Camlistore source used must be >=
to that revision, hence that bump.

Change-Id: Ibb68c0f1a1c85277becc02ad73b902d77b5bc465
2015-07-21 16:57:39 +02:00