1
0
Fork 0
Commit Graph

70 Commits (ef3d7b89e0eaa00ecc3dd248cbafb440c1df3143)

Author SHA1 Message Date
q3k 146c99e58e devtools/gerrit: backport reviewiers column fix to 3.3.2
Gerrit 3.3.1 seems to have introduced a bug which makes the reviewers
column in the dashboard entry: https://bugs.chromium.org/p/gerrit/issues/detail?id=13899

This adds an override of gerrit.war to our Docker containers. The .war
is pulled over HTTP. It has been manually built by q3k from a source
checkout. The details on how this was done are in the WORKSPACE
http_file archive.

Once 3.3.3 lands we should get rid of it.

Change-Id: I8b64103cb87d8b185ff35165695a18cb19fea523
2021-03-18 19:51:33 +00:00
q3k dd692217c1 gerrit: bump to 3.3.2
Deployed to prod.

Change-Id: Iac1fdee4ec22e6a6d92ff31ab5535a43cfbcffb1
2021-03-11 23:31:28 +00:00
q3k 7849e8a2af WORKSPACE: bump rules_docker
This fixes a bazel_tools incompatibility with Bazel 3.x.

Change-Id: I73a5beafe03b1d8e68a1fee794961146a2f10c52
2021-03-11 23:30:52 +00:00
q3k 4b613303b1 RFC: *: move away from rules_nixpkgs
This is an attempt to see how well we do without rules_nixpkgs.

rules_nixpkgs has the following problems:

 - complicates our build system significantly (generated external
   repository indirection for picking local/nix python and go)
 - creates builds that cannot run on production (as they are tainted by
   /nix/store libraries)
 - is not a full solution to the bazel hermeticity problem anyway, and
   we'll have to tackle that some other way (eg. by introducing proper
   C++ cross-compilation toolchains and building everything from C,
   including Python and Go)

Instead of rules_nixpkgs, we ship a shell.nix file, so NixOS users can
just:

  jane@hacker:~/hscloud $ nix-shell
  hscloud-build-chrootenv:jane@hacker:~/hscloud$ prodaccess

This shell.nix is in a way nicer, as it immediately gives you all tools
needed to access production straight away.

Change-Id: Ieceb5ae0fb4d32e87301e5c99416379cedc900c5
2021-02-15 22:11:35 +01:00
q3k 55cc9ab177 third_party: bump minecraft deps
Change-Id: Ib03669eef2f535ecf6711618b960f3058337fda5
2021-02-15 22:11:00 +01:00
implr 0e2057fba9 make WORKSPACE rules reproducible
per bazel error message:
DEBUG: Rule X indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = Y

Change-Id: I1c29609197d776536b7bc0336858047d7494d795
2020-12-28 21:43:33 +01:00
q3k faa326a37d WORKSPACE: update for new gerrit
Forgot to commit in https://gerrit.hackerspace.pl/c/hscloud/+/581 .
Whoops.

Change-Id: I9605b07079e4d1a9c916e6106034f3dba98964c2
2020-12-17 22:33:32 +00:00
q3k 1572e52c19 wow: init
This is a shitty MMORPG server. Private. Do not touch.

Change-Id: Iddfce069f5895632d305a73fcaa2d963e25dc600
2020-12-03 23:21:37 +01:00
q3k 42b21ecd84 Go: bump to 1.15.5
The new Go release fixes the following security issues:

CVE-2020-28362, CVE-2020-28367, CVE-2020-28366

See https://groups.google.com/g/golang-announce/c/NpBGTTmKzpM for more
detail.

The next step will be to re-build all our production Go binaries.

Change-Id: I97e4678a2e06a9559e66c0c0db008f0b6dfd81a2
2020-11-27 10:22:17 +01:00
q3k 301435f3c3 third_party/go: pay off some technical debt and hide the bodies
This is an amalgamation of a handful of small changes to Go deps.
Notably:

 - we remove our opencensus-proto fork, use upstream, use exclude=src to
   fix the build
 - unvendorify some deps
 - bump io_rules_go to fix WKT resolution

Notably, we now do not have the 'protoc-gen-go' error when running
kubecfg/kubectl anymore.

Change-Id: I34fb9e78b2b12e4543142183d601d01987076f32
2020-11-03 21:15:41 +01:00
q3k 194b1c8e62 WORKSPACE: use nix for python/go if available
This introduces Nix, the package manager, and nixpkgs, the package
collection, into hscloud's bazel build machinery.

There are two reasons behind this:

 - on NixOS, it's painful or at least very difficult to run hscloud out
   of the box. Especially with rules_go, that download a blob from the
   Internet to get a Go toolchain, it just fails outright. This solves
   this and allows hscloud to be used on NixOS.

 - on non-NixOS platforms that still might have access to Nix this
   allows to somewhat hermeticize the build. Notably, Python now comes
   from nixpkgs, and is fabricobbled in a way that makes pip3_import
   use Nix system dependencies for ncurses and libpq.

This has been tested to run ci_presubmit on NixOS 20.09pre and Gentoo
~amd64.

Change-Id: Ic16e4827cb52a05aea0df0eed84d80c5e9ae0e07
2020-10-03 18:31:38 +02:00
q3k 1e1a4ddfc8 BUILD: fix gazelle repo file marker
Change-Id: I2ba10be7f4af784782d684b662529f926c348232
2020-08-01 12:10:19 +00:00
implr cae27ecd99 Replace rules_pip with rules_python; use bazel built upstream grpc
instead of Python packages

As usual with Python sadness, the @pydeps wheels are built on the bazel
host, so stuffing them inside a container_image (or py_image) will cause
new and unexpected kinds of misery.

Change-Id: Id4e4d53741cf2da367f01aa15c21c133c5cf0dba
2020-07-08 18:55:34 +02:00
implr 7418a5a963 Add shallow_since to WORKSPACE git_repository rules
per bazel warning
DEBUG: Rule 'com_apt_itude_rules_pip' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1564255337 -0400"

Change-Id: I6564e8325aa31bbd156ffdf85854f3f5459bd4df
2020-07-01 05:43:28 +02:00
q3k 0c3b9a570e WORKSPACE: cleanup
This removes some old skylib/zlib deps, moves all Go repositories to a
separate file, and in general does a small cleanup pass on external
repository magic.

Change-Id: Ic9700ee4c40cdb2e5a68e4fc7c6b3e386a109f8a
2020-06-25 19:54:25 +02:00
q3k 0037edaa5b cluster/tools/rook-s3cmd-config: build using bazel
This turns the existing script into a proper sh_binary, and injects
dependencies (kubectl and jq) as deps into it.

This change also pulls in BUILDfiles for jq, and a dep (oniguruma) into
//third_party, and adds buildable external repositories for them.

The jq/oniguruma BUILDfiles are lifted from
https://github.com/attilaolah/bazel-tools/.

Change-Id: If2e548bd60a8fd34e4f3be767ae59c6b2f2286d9
2020-06-13 22:46:41 +02:00
q3k 66a26a8f02 WORKSPACE: remove nixpkgs/rules_nix
We're not using them for anything. Initially they were going to be used
for nixops, but nixops is not very good, so let's just drop them.

We still have a Nix dependency for clustercfg.py when provisioning
nodes, but rules_nix/nixpkgs in WORKSPACE were unrelated to that.

Change-Id: I28c249507d1be9c5dbbd1ee764deccd9ab038549
2020-06-07 02:22:14 +02:00
patryk 30f9d03106 WORKSPACE: Shuffle things around to fix tools build on macOS
Change-Id: I281c1209620e9f3a017718fda1401d1ead9c52a4
2020-06-05 23:37:34 +02:00
q3k 0ae0728ea8 Merge "third_party/factorio: init" 2020-06-04 21:45:55 +00:00
q3k de3d3fa641 bgpwtf/invoice: hide invoicee VAT number when not given
Also re-add go-bindata to WORKSPACE, something nuked it.

Change-Id: I723ebee7f843d0135a3e1121e2e93ae5fe56bc4b
2020-05-31 00:12:11 +02:00
q3k 32f8a58236 personal/q3k: add minecraft plugins
Also drive-by modify WORKSPACE to add required deps.

Also drive-by update deps in WORKSPACE.

Also drive-by remove old stackb/proto library from WORKSPACE (only used
in cccampix, which is dead, and stackb/proto should be replaceable by
the main grpc lib by this point).

Change-Id: I7ac7fe2237e859dc1c45bf41a016174ed8e9ee71
2020-05-17 23:06:42 +00:00
q3k 480505768d third_party/factorio: init
We turn the existing experimental BUILD file into a nicely abstracted
starlark rule generator, for generating both external repositories and
container build rules from a single source of truth.

We also add 0.18.22 (which we already pushed via :push_latest).

Change-Id: I521d6e5cb9447eaf6f237671b7ef07d621cd9c77
2020-05-18 00:46:31 +02:00
q3k 222a00a25a devtools/gerrit: bump to 3.0.8, add OWNERS plugins
Change-Id: I161ca0339bec0486c9b1446b141ecf1424112d9c
2020-04-12 18:37:21 +02:00
q3k 8adbd49051 *: more hackdoc updates
Change-Id: Ib9830c66fe36c423d38f447905c470b67cde5399
2020-04-10 22:10:18 +02:00
q3k 4c0e9b52c0 devtools/depotview: init
This is a small service for accessing git repos read-only over gRPC.

It's going to be used to allow hackdoc to render arbitrary versions of
hscloud.

Change-Id: Ib3c5eb5a8bc679e8062142e6fa30505d9550e2fa
2020-04-08 22:42:33 +02:00
q3k c881cf3c22 devtools/hackdoc: init
This is hackdoc, a documentation rendering tool for monorepos.

This is the first code iteration, that can only serve from a local git
checkout.

The code is incomplete, and is WIP.

Change-Id: I68ef7a991191c1bb1b0fdd2a8d8353aba642e28f
2020-04-08 20:03:12 +02:00
q3k 59786c5dfa personal/q3k/factorio: bump, add ds
Change-Id: I15dbbfdd911fb61fc5769443ef4f2e862cf6c7e1
2020-04-01 02:05:42 +02:00
q3k 540663904b personal/q3k/factorio: bump
Change-Id: I2a93d24f85d7517a1e2b6247668c5ae63f4e2732
2020-03-25 10:48:52 +01:00
q3k 9d738cedc3 k8s.io/apimachinery: bypass https://github.com/kubernetes/kubernetes/issues/87675
For us this manifests when doing

   kubecfg update cluster/kube/cluster.libsonnet

To be precise: when hitting the Ceph/Rook CRD definition.

This is a weird bug. I've seen it manifest earlier on NixOS, but I am
now also seeing it on Gentoo. I've thought that it was because of Go API
breakage, but I've quickly tried to specify older toolchain versions,
but that didn't seem to help? :/

Regardless, I've applied a patch by rnb [1] that seems to fix this. I
also have a suspicion that updating to a newer k8s version might just
fix this, that's why I'm not not too concerned about this for now.

[1] - a32521024f

Change-Id: Id66e3c0bd56e84d785e1baeca86373aa2d0eb6f9
2020-02-21 12:54:05 +01:00
q3k e03c217cc1 go: bump rules_go, autodetect nix for go toolchains
Change-Id: If10a7843e5e54ade82fbeec85f4e6727e4d2a117
2020-02-15 01:04:38 +01:00
q3k 9937146d25 personal/q3k: bump factorio
Change-Id: Id472ad9fffd09917b040ce8572b760862b4fcd2f
2020-01-14 13:47:26 +01:00
q3k a885488fd0 lelegram: init
This is an IRC/Telegram bridge.

It does multi-account puppet-like access to IRC making everyone's life
easier.

Compared to teleirc it also:
 - is smarter about converting messages
 - uses teleimg for public image access
 - is not written in JS

Experimental for now.

Change-Id: I66ba3f83abdfdea6463ab3be5380d8d3f2769291
2020-01-05 21:01:07 +01:00
q3k c315aaccc7 teleimg: init
This is a shitty small proxy to unfuck telegram's bot image URLs, ie. do
not add content-disposition and send a proper MIME in content-type.

It also does some local caching and hides the Telegram API token.

Change-Id: I0afb29ca3f1807a13fa157fdcf486ee4c857f08d
2020-01-05 20:59:17 +01:00
q3k e5a956a1c8 *: bump to q3k's kubecfg, kubernetes 1.16
Change-Id: I302876d5a45cbfb63d87ad9f6ea9aaeff7bec17d
2019-11-17 22:38:40 +01:00
q3k 96c428f7d7 nixops: fix
Change-Id: I15ebde319fcae3f9771da6a549e52783e0ec4409
2019-11-17 19:00:46 +01:00
q3k 47b7e850e7 dc/arista-proxy: fix by using github.com/q3k/cursedjson
Change-Id: Id9657a30af8c16afe4ddde7e2ac04f4508a2fd18
2019-09-26 18:32:39 +02:00
q3k 5f9b1ecd67 rules_pip: update to new version
rules_pip has a new version [1] of their rule system, incompatible with the
version we used, that fixes a bunch of issues, notably:
 - explicit tagging of repositories for PY2/PY3/PY23 support
 - removal of dependency on host pip (in exchange for having to vendor
   wheels)
 - higher quality tooling for locking

We update to the newer version of pip_rules, rename the external
repository to pydeps and move requirements.txt, the lockfile and the
newly vendored wheels to third_party/, where they belong.

[1] - https://github.com/apt-itude/rules_pip/issues/16

Change-Id: I1065ee2fc410e52fca2be89fcbdd4cc5a4755d55
2019-09-25 14:05:07 +02:00
q3k b13b7ffcdb prod{access,vider}: implement
Prodaccess/Prodvider allow issuing short-lived certificates for all SSO
users to access the kubernetes cluster.

Currently, all users get a personal-$username namespace in which they
have adminitrative rights. Otherwise, they get no access.

In addition, we define a static CRB to allow some admins access to
everything. In the future, this will be more granular.

We also update relevant documentation.

Change-Id: Ia18594eea8a9e5efbb3e9a25a04a28bbd6a42153
2019-08-30 23:08:18 +02:00
Serge Bazanski ec71cb50bd Draw the actual rest of the fucking owl.
Change-Id: Ia04fb49ebbe3a5afccc57e62f6335e35b45192fe
2019-08-22 18:14:35 +02:00
Serge Bazanski bfcaedcf2b prodimage: add gnpug, use pl mirrors
Change-Id: I6245e9b1b127c5db574d58e35b5f3006551d795b
2019-08-14 19:21:48 +02:00
q3k 1fad2e5c6e bgpwtf/cccampix: draw the rest of the fucking owl
Change-Id: I49fd5906e69512e8f2d414f406edc0179522f225
2019-08-11 23:43:25 +02:00
q3k ddfd6591f8 *: bump docker images and storage pools
This brings all core services back to life after The Failure.

Change-Id: I98b0c104c66fa11f646864018356e9c3a226a1f9
2019-08-11 23:42:47 +02:00
q3k 30317b4278 go/mirko: add SQL migrations machinery
This uses github.com/golang-migrate/migrate and adds a Source that
allows using go_embed data files.

We also provide a test/example.

Change-Id: Icd2b6c7f7d0f728073b3fdf39b432b33ce61a3cd
2019-08-03 23:49:43 +02:00
q3k 6eaaaf9bab bgpwtf/cccampix: add IRR daemon
We add a small IRR service for getting a parsed RPSL from IRRs. For now,
we only support RIPE and ARIN, and only the following attributes:
 - remarks
 - import
 - export

Since RPSL/RFC2622 is fucking insane, there is no guarantee that the
parser, especially the import/export parser, is correct. But it should
be good enough for our use. We even throw in some tests for good
measure.

    $ grpcurl -format text -plaintext -d 'as: "26625"' 127.0.0.1:4200 ix.IRR.Query
    source: SOURCE_ARIN
    attributes: <
      import: <
        expressions: <
          peering: "AS6083"
          actions: "pref=10"
        >
        filter: "ANY"
      >
    >
    attributes: <
      import: <
        expressions: <
          peering: "AS12491"
          actions: "pref=10"
        >
        filter: "ANY"
      >
    >

Change-Id: I8b240ffe2cd3553a25ce33dbd3917c0aef64e804
2019-08-02 13:39:42 +02:00
q3k beefe44228 bgpwtf/cccampix: add and deploy octorpki
Change-Id: I8d5de697925b65d8f0e762b2f2acad3a7e560fe6
2019-07-30 13:09:26 +02:00
q3k b2d6b112b5 devtools/prodimage: create
We start having the need to have our own production image instead ofjust
a bare Ubuntu image. For instance, octorpki will need rync and TLS CA
bundles.

Change-Id: Ia8d9604ae8c320f858cfe8a2dc21ddcc321017ff
2019-07-30 13:09:26 +02:00
q3k 356ea8bc3a devtools/bazel-cache: build from source, use docker_push
Change-Id: Ie889372b9a7b439e04c1899c90753349440e727a
2019-07-22 00:01:20 +02:00
q3k 8fe651b569 go/{mirko,statusz}: better status, kubernetes client
Change-Id: I66753a79eaf36529aee508d2b7782aab00de1498
2019-07-21 23:54:41 +02:00
q3k 57efce6b02 app/{gerrit,bazel-cache} -> devtools/
Change-Id: I2a98f33c76a59392e644579a1f7064a7c8eaec7c
2019-07-21 16:40:33 +02:00
q3k d5ac5d112f WORKSPACE: bump rules_pip
Change-Id: I8e5ed9ab7743a71de0c216fa425fe2ecb1bbca81
2019-07-19 20:53:21 +02:00