Commit Graph

263 Commits

Author SHA1 Message Date
mpl 69a68e7e91 misc/docker/go: update to Go 1.11
Change-Id: Ia4c4826a572e3317460d6a71af19e9885fe72926
2018-09-26 02:52:53 +02:00
mpl 4866c7c62e misc/docker/synology: tag images and build stages
Tagging images depending on the selected arch allows us to preserve
docker caching even when switching arches.

Also, since the first build stage was not tagged, it was considered as
dangling, so it was getting removed by 'docker rmi'. So we now tag it as
well to keep it cached.

Change-Id: I0c36c625e7bd459192f97052d26d76084a03bea7
2018-08-06 19:52:33 +02:00
Euan Kemp 90042fe296 pkg/blobserver/s3: use official aws client
vendor: add github.com/aws/aws-sdk-go at rev bc3f534c19ffdf835e524e11f0f825b3eaf541c3

This changes all uses of the s3 client to be the official aws-sdk-go. As
such, it also deletes the previous client maintained in internal.

There are a few notable changes that come with this:

1. An 'aws_region' key is added to the low-level config. The
   'get-bucket-location' call is used to identify the correct region
   rather than using the redirect returned to determine it.
2. Deleting multiple objects at once is much faster (batches of up to
   1000 vs 1 at a time).
3. Retriable errors are retried automatically (see #1184).
4. Newer APIs are used for some operations (v2 / batch apis).

An unfortunate result of 4 is that this is technically a backwards
incompatible change. An IAM policy which used to be sufficient for
perkeep may no longer permit some of the new api calls (even if they're
not doing anything different really).

Fixes #1184, #911

Change-Id: I077fe88def18b7e9a14267820773245e7003634c
2018-07-31 15:51:31 -07:00
mpl 61d5e4e05d misc/docker/synology: package Perkeep for Synology
Fixes #986

Change-Id: I63b506944e3d71a3e864d9f4b37a1e0b1abd8b9c
2018-07-25 20:36:46 +02:00
mpl 18a9f6fc93 misc/release: enable upload of existing archives
Change-Id: Ic1bbb50448734cb68a8eed72ea9a90de4e9fbc76
2018-05-15 01:54:53 +02:00
mpl e27e2302a4 misc/release: update release tools
misc/docker/release moved to misc/release because it did not really have
anything to do with making docker images, it just happens to use them.

misc/monthly.go has been moved to misc/release/make-release.go, and
reworked to be more generic.

misc/docker/dock.go has been trimmed down to only deal with creating
docker images

Fixes #1153

Change-Id: I4cb566551007300aefa6cb23714b90461f0e3e51
2018-05-11 02:51:55 +02:00
mpl 6a04db2f5d misc/docker: make release tools work with latest version mechanism
Change-Id: Id2081c2f0047621fa929baeba684de219eb869ff
2018-05-02 19:04:40 -07:00
mpl c39f4cabd4 misc/docker/go: bump to 1.10.2 for release
Change-Id: I98b2f85533615d3cfdc1f657d9f675f352febbd4
2018-05-01 21:57:37 -07:00
mpl 507684d5ee misc/docker: fix release tools
Change-Id: Ie7e75d88a4fbc7df753aedbfb00d77d1899962e1
2018-05-01 16:03:27 -07:00
mpl 4d16a0e5c3 server/perkeepd: self-fix instance user-data
Since we renamed Camlistore to Perkeep, we also renamed the docker image
deployed by the launcher, as well as the systemd service that this
docker image runs in.
This means existing users on GCE do not get updates when they restart
the service or reset their instance.

This change adds a check and a function that allows perkeepd to fix the
user-data metadata of its own GCE instance, which is where the names
mentioned above are defined.

Therefore, if we deploy a new camlistore docker image containing that
code, the existing users should get a server capable of self-fixing its
own instance into a perkeep one.

Change-Id: I9ff66f684f0ad647d15e5fcdd08d26c524a18329
2018-04-30 15:58:26 -07:00
Brad Fitzpatrick c698ff5add misc/docker/heiftojpeg: switch to ImageMagick
Still slow, but no more ffmpeg child processes, and I'm confident
ImageMagick will improve over time. There are actually ImageMagick
commits in the past few hours that look promising. We have a demo
tomorrow, so we're not going to bump our git rev & Docker image to the
latest ImageMagick master yet.

Updates #969

Change-Id: I7a8545821cae4214ea521d7cb46aa235ae3f0ed3
2018-04-27 16:26:14 -07:00
mpl 4ed26b3d04 misc/docker: fix expected output binaries location
Change-Id: I3f7f30580a513602e0091269163af9618926623a
2018-04-23 13:59:06 -07:00
mpl 3dc471f790 misc/docker: bump go image to 1.10.1
Change-Id: I993ff0606e0cbd6a6e816df35e5ca4eda3896cfc
2018-04-23 13:47:56 -07:00
mpl 7a27eb42eb cmd: rename camget to pk-get, and make it a mode of pk
A couple of related fixes and renames too.

Updates #981
Fixes #1056

Change-Id: Id47a933c77422edfb9db41d34c38ed9d0d7a1846
2018-04-22 20:50:54 -07:00
mpl 2bb666ccf6 all: rename remaining occurrences of camput
Also removed misc/buildbot while at it (which contained camput
references) since we don't use it anymore at all.

TODO: the OSX app seems to be relying on finding a binary in ../bin,
which we do not use anymore. This will probably need fixing.

Updates #981

Change-Id: I14220fbad2e81181330fca4bb2d2e5fe170e1bd6
2018-04-21 16:20:24 -07:00
Brad Fitzpatrick ca76a40bbc Rename camlistored to perkeepd.
Updates #981

Change-Id: I8fe43c240c149074c23128a89ab426af9cbf94b4
2018-04-21 11:06:09 -07:00
mpl ce4658abfc cmd: rename camput to pk-put, and make "pk put" call it
A new "put" mode is added to the pk command, so that the "pk put"
command can be used to create and upload blobs.

What this command does is actually just call the previously named
"camput" executable, which is renamed to "pk-put" in this change.

This involves adding a new way to register a mode in cmdmain, when such
a mode is just meant to call an external binary. To emphasize the
distinction, the existing func (to register a sub-command, or a mode) is
renamed from RegisterCommand to RegisterMode, and RegisterCommand is now
the name of the new func/way.

Updates #981
Updates #1056

Change-Id: Ief954c17aa88a376f551df7de4b4e9fe41ad96d1
2018-04-21 10:26:55 -07:00
Brad Fitzpatrick 6af54cc882 misc/docker/heiftojpeg: rearrange Dockerfile, add README
Change-Id: Ic5bdbeca75ede15cfdbd569c533f66c24810cdae
2018-04-20 14:06:15 -07:00
Brad Fitzpatrick a19c831ed6 misc/docker/heiftojpeg: switch to our fork with rotation support
Fixes #1094
Updates #969

Change-Id: I75f6b7433bbc2dac1ccc800696969e18164a514d
2018-04-20 13:55:34 -07:00
Brad Fitzpatrick dd3516c6ee Remove some ancient Perl scripts.
Change-Id: If98021d39eb8560913bc1ba35f4cb7f29f25974c
2018-04-17 15:11:07 -07:00
mpl d9237d42b5 misc/docker: add heiftojpeg Dockerfile
multi-stage Alpine image.
static building is a pain, so we instead copy all the shared libs from
the builder stage to the final stage.

Udates #969
Fixes #1087

Change-Id: I05377fdafd6db13d04d4970ec2d52b68a53fa22b
2018-04-16 22:42:03 +02:00
mpl 6dcbe2ee9c cmd/camtool: rename from camtool to pk
Updates #981
Updates #1056

Change-Id: Ib78c47a69fa9816d5ac6cc547586a2af321005e3
2018-03-06 16:20:59 +01:00
Paul Lindner 459c75410e all: more renaming of Camlistore to Perkeep
Change-Id: I118e3cbcf20d80afeffc84f001388c4556f21628
2018-01-30 03:02:56 -08:00
Paul Lindner 6d2d9714de all: simpify constructs by running gofmt -s on all code
Change-Id: Idc12ddcfe8f735d77c6baa942f5bb7a2c7d9b40b
2018-01-21 10:27:12 -08:00
Brad Fitzpatrick 617ac40512 all: rename cammount to pk-mount
Updates #981

Change-Id: Ie1d2e3c0fd7e2b7a7801ceac0fd8f93f62d56651
2018-01-08 09:54:41 -08:00
Brad Fitzpatrick 9265c980de all: change github.com/camlistore/camlistore to github.com/perkeep/perkeep
Change-Id: I0d612bf450e9e8d9ce0767c5a0cb0c44c0d8704f
2018-01-05 19:49:59 -08:00
mpl 4ca45d928b misc/docker/dock.go: update to build from perkeep.org
Change-Id: Ie2a995c603a7714979d9967964e6b4c83f4886d4
2018-01-05 20:34:17 +01:00
Brad Fitzpatrick 57648c6b83 all: update copyright holder from Google Inc to The Perkeep Authors
The AUTHORS file is the list of copyright holders.
2018-01-03 16:52:49 -08:00
Brad Fitzpatrick c3d05cdce9 Move more packages out of pkg/ and into internal/
Moved hashutil, httputil, osutil, netutil,
images, media, magic, video, and rollsum.
2018-01-02 21:03:30 -08:00
Brad Fitzpatrick d6a0b05df0 Rename import paths from camlistore.org to perkeep.org.
Part of the project renaming, issue #981.

After this, users will need to mv their $GOPATH/src/camlistore.org to
$GOPATH/src/perkeep.org. Sorry.

This doesn't yet rename the tools like camlistored, camput, camget,
camtool, etc.

Also, this only moves the lru package to internal. More will move to
internal later.

Also, this doesn't yet remove the "/pkg/" directory. That'll likely
happen later.

This updates some docs, but not all.

devcam test now passes again, even with Go 1.10 (which requires vet
checks are clean too). So a bunch of vet tests are fixed in this CL
too, and a bunch of other broken tests are now fixed (introduced from
the past week of merging the CL backlog).

Change-Id: If580db1691b5b99f8ed6195070789b1f44877dd4
2018-01-01 16:03:34 -08:00
Paul Lindner c58e07942e all: lint fixes for "if block ends with a return statement"
Change-Id: I1c244f14995478860c19695695f287d541a7a39c
2017-12-13 11:31:25 -08:00
Paul Lindner ba92702834 all: lint fixes for "should omit 2nd value from range"
Change-Id: I7bb19d376f96a39ecae7dbdb4d6808f704bae5fb
2017-12-13 11:31:25 -08:00
Paul Lindner 15feaeb24c all: lint fixes for 'error strings should not be capitalized or end with punctuation or a newline'
Change-Id: I9c3766a51ac8be694ae76befff4b6fa9a85e34eb
2017-12-11 06:13:25 -08:00
Paul Lindner b09cd377d7 Switch to stdlib context from golang.org/x/net/context
This switches most usages of the pre-1.7 context library to use the
standard library.  Remaining usages are in:

  app/publisher/main.go
  pkg/fs/...

Change-Id: Ia74acc39499dcb39892342a2c9a2776537cf49f1
2017-11-26 01:12:26 -08:00
mpl 00bc12d403 misc/docker/go: update to go1.9
Change-Id: I3c0adb33918df1553ec8e935bca4d50f01816c06
2017-10-04 01:35:55 +02:00
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 5146f917eb misc/monthly.go: add blank lines to release notes source
Change-Id: Ia3ef2b037ad20b7b75f52609f1a2b1c1010b642f
2017-02-27 20:43:56 +01: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 97c10ecc7d misc: monthly.go: more grouping of release notes
Change-Id: Ib5673cd70da94bedec777df53c5e90ad8300cd95
2017-01-24 14:52:51 +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 89f50dcf69 misc/monthly.go: improve download boxes style
Issue #858

Change-Id: I65aa6b0d2c60d7ed273679d30f148566750badbe
2016-10-31 16:53:51 +01:00
mpl dd727e0a73 misc/monthly.go: generate raw release notes
Issue #858

Change-Id: Ic94f796c3bbb7528d70af6ae60a7d93a3247eeba
2016-10-27 16:10:46 +02:00
mpl 64e5765804 misc/monthly.go: generate commit statistics
Issue #858

Change-Id: Id82266bda35147d8e456addc3809acce624633ca
2016-10-27 01:20:55 +02:00
mpl 669fe90534 misc/monthly.go: use release date in files names
Issue #858

Change-Id: Idac0f556ff13a40ca8eb656706c8a7050081be95
2016-09-28 01:31:00 +02:00