Commit Graph

288 Commits (0e223ec77fa51ba7055a46433aee5411ed239ec8)

Author SHA1 Message Date
q3k 0e223ec77f bgpwtf/cccampix/proto: add PGPEncryptor service
Change-Id: I932ce6bf5fdb792eb83945a8e46551f169e51c97
2019-08-09 19:02:32 +02:00
q3k d07861b7df ceph-waw1 -> ceph-waw2
Change-Id: I03d6244b9697a9efc06492114ef90cdb01e17601
2019-08-08 17:49:31 +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 2316ac0e99 bgpwtf/cccampix/irr: limit concurrency
Change-Id: I958322f33c86469f9c3e21d1bd962faede2a3fee
2019-08-03 23:49:43 +02:00
q3k e06c314e92 Merge "bgpwtf/cccampix: add IRR daemon" 2019-08-02 11:42:39 +00:00
q3k 113baaf9c1 Merge "bgpwtf/cccampix/peeringdb: allow multiple routers per peer" 2019-08-02 11:41:48 +00: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 0607abae1d bgpwtf/cccampix/peeringdb: allow multiple routers per peer
Change-Id: I84200cc0056d569e962c104cf082ce10f9c4025f
2019-08-02 13:39:41 +02:00
q3k f774f2f31d Merge "app/registry: integrate into cluster/kube" 2019-08-02 00:28:10 +00:00
q3k 9ed8b9606d Merge "bgpwtf/cccampix: add and deploy octorpki" 2019-07-30 11:09:46 +00:00
q3k 6a8f8fd28f Merge "devtools/prodimage: create" 2019-07-30 11:09:37 +00: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 169996cb5b Merge "cursed django example" 2019-07-30 11:08:53 +00:00
q3k d5c4ce7372 Merge "personal/q3k/annoyatron: init" 2019-07-28 23:22:13 +00:00
q3k 0a275da86d personal/q3k/annoyatron: init
Change-Id: I130ed08b753cad95114df48328206adc8afeb0c1
2019-07-29 01:21:31 +02:00
q3k 654c70dad7 cluster/tools/install.sh: fix nixops graceful degradation
Nixops requires nix_rules, which in turn requires a working nix
installation.

When we split tools/install.sh into tools/install.sh and
cluster/tools/install.sh [1], we accidentally made the latter always install
all cluster tools, including nixops - even if the install.sh script
detected that the system does not have Nix installed.

[1] - https://gerrit.hackerspace.pl/c/hscloud/+/81

Change-Id: Ib5357cfe125f1393b395b28062787f3f0091f549
2019-07-23 01:37:11 +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 902d86006c cursed django example
Change-Id: I09ac506f53c25f5427f3d35d5efa4f40c83f48f9
2019-07-21 17:22:40 +02:00
q3k 7fb4acb690 app/factorio -> personal/q3k/factorio
Change-Id: I92be6a726aef306f6f4de4e5a91defa86cda81fc
2019-07-21 15:07:07 +00:00
q3k c4e653ad46 app/internet -> bgpwtf/internet
Change-Id: I66740f68ebfb508d866c742d7849447a3aca45be
2019-07-21 15:06:52 +00:00
q3k 4d61d20aec app/registry: integrate into cluster/kube
This makes a registry be automatically part of the cluster
infrastructure.

Tested by running kubecfg diff, no diffs (apart from out-of-date ACLs)
found.

Change-Id: Ic0635e789cf3fb851f410bcf2865326f1fa87545
2019-07-21 16:56:41 +02:00
q3k 57efce6b02 app/{gerrit,bazel-cache} -> devtools/
Change-Id: I2a98f33c76a59392e644579a1f7064a7c8eaec7c
2019-07-21 16:40:33 +02:00
q3k c7a4755158 go: remove Gopkg leftovers
These are from pre-bazelification.

Change-Id: I6ba9aae53a3785fd612322d6f2cfb4bef7f9c832
2019-07-21 16:28:10 +02:00
q3k 1663e0e93b tools: move cluster-specific stuff to cluster/tools
Change-Id: I1813bb221d1bff0d6067eceb84d23510face60ff
2019-07-21 14:26:51 +00:00
q3k b5ad364a32 tools/workspace-status.sh -> bzl/
This is bazel-specific.

Change-Id: I2592c30f4e8f5e414d2fb6cf90f36b36e069b7cb
2019-07-21 16:26:19 +02:00
q3k 9de21db4ee Merge "Fix the shebang." 2019-07-21 14:25:45 +00:00
q3k 5b5b7c3d86 proto/infra -> dc/proto
This cleans up proto/!

Change-Id: I3e280c16deef7ad0b01e6e409062831581ec863e
2019-07-21 16:07:49 +02:00
q3k 1446e98beb proto/invoice -> bgpwtf/invoice/proto
Change-Id: I5d25864046665e4b0e57ec62a29797fbce6ed3cb
2019-07-21 16:04:23 +02:00
q3k d2c8d797d7 Merge "nix/ -> cluster/nix/" 2019-07-21 13:54:57 +00:00
q3k 66277a8562 Merge "go/svc/leasifier, proto/hswaw -> hswaw/" 2019-07-21 13:54:49 +00:00
q3k 116da981c9 nix/ -> cluster/nix/
These are related to cluster bootstrapping, not generic language
libraries (like go/ and bzl/).

Change-Id: I03a83c64f3e0fa6cb615d36b4e618f5e92d886ec
2019-07-21 15:53:20 +02:00
q3k f3dd382eed Merge "app/gerrit: fix advertised address" 2019-07-21 13:38:40 +00:00
q3k 9b5359d0f4 app/gerrit: fix advertised address
This should get rid of some :29418 ports publically visible.

Change-Id: Ied3114888ccfdea494580d19e04d88a847d96cfe
2019-07-21 15:38:21 +02:00
q3k 2da126caff go/svc/leasifier, proto/hswaw -> hswaw/
Continued from https://gerrit.hackerspace.pl/c/hscloud/+/73 .

Change-Id: Ie761c2af588e06739de94fa1eff4f715d1f9b145
2019-07-21 15:36:27 +02:00
q3k cea71e3be8 go/svc/{invoice,speedtest} -> bgpwtf/
Continued from https://gerrit.hackerspace.pl/c/hscloud/+/71 .

Change-Id: I5aef587c7e9a4cec301e3c95530c33914851ad44
2019-07-21 15:30:08 +02:00
Robert Gerus f1bdb9a984 Fix the shebang.
First step on the path of making bazel work here on NixOS.

Change-Id: Icc264dac250e116f4835a135f47423740a2e5096
2019-07-21 15:24:52 +02:00
q3k 61594bb088 go/svc/(dc stuff) -> dc/
We want to start keeping codebases separated per 'team'/intent, to then
have simple OWNER files/trees to specify review rules.

This means dc/ stuff can all be OWNED by q3k, and review will only
involve a +1 for style/readability, instead  of a +2 for approval.

Change-Id: I05afbc4e1018944b841ec0d88cd24cc95bec8bf1
2019-07-21 15:20:51 +02:00
q3k 96a528b2c9 personal/q3k: add django-admin
Also add Django and uwsgi to requirements, and bump rules_pip to fix https://github.com/apt-itude/rules_pip/issues/14

Change-Id: I78eb3af019897c4c9630987649a9ffacd979145c
2019-07-21 15:11:18 +02:00
q3k e653e6a620 bgpwtf/cccampix/peeringdb: init
First pass at a proxy to expose PeeringDB data.

Change-Id: I844973755473b3abc5d334586744004b86d1c3a3
2019-07-20 18:03:35 +02:00
q3k 57be3f7c40 bgpwtf/cccampix: init
Add sync script for camp IX.

This will likely be triggered externally from some sort of long-running
service.

Change-Id: I4ead566e4308d24fdb64e789a7ca0e3dbf0214fb
2019-07-19 21:05:15 +02:00
q3k ebee511732 pip/requirements: add requests
Change-Id: Ie213a2a3bf618fd03cf802e4aed76c69de0f1cd5
2019-07-19 20:54:50 +02:00
q3k d5ac5d112f WORKSPACE: bump rules_pip
Change-Id: I8e5ed9ab7743a71de0c216fa425fe2ecb1bbca81
2019-07-19 20:53:21 +02:00
Serge Bazanski 2ce367681a *: move away from python_rules
python_rules is completely broken when it comes to py2/py3 support.

Here, we replace it with native python rules from new Bazel versions [1] and rules_pip for PyPI dependencies [2].

rules_pip is somewhat little known and experimental, but it seems to work much better than what we had previously.

We also unpin rules_docker and fix .bazelrc to force Bazel into Python 2 mode - hopefully, this repo will now work
fine under operating systems where `python` is python2 (as the standard dictates).

[1] - https://docs.bazel.build/versions/master/be/python.html

[2] - https://github.com/apt-itude/rules_pip

Change-Id: Ibd969a4266db564bf86e9c96275deffb9610dd44
2019-07-16 22:22:05 +00:00
Serge Bazanski 38aea81f64 bzl/rules.bzl: fix incompatibilities
Counteracts:

 - --incompatible_depset_is_not_iterable=false
 - --incompatible_new_actions_api=false

Change-Id: Ib0e63b717f643e4e3b57684b53d3165d5925daac
2019-07-16 22:21:55 +00:00
q3k 838cf6526a go/svc: finish porting services to Bazel
The following services were never ported:
 - cmc-proxy
 - arista-proxy
 - m6220-proxy
 - topo

They now build.

Change-Id: I0688bfe43cdff946e6662e21969ef539382c0e86
2019-07-16 23:31:25 +02:00
q3k 3e21233b14 go/svc/speedtest: prod deploy
This is deployed on https://speedtest.hackerspace.pl/

Change-Id: I510d98535ae64d13e745613c49acf96b4d7e90c9
2019-07-13 18:11:11 +02:00
q3k b4f6fb3c3b app/registry: allow inf and q3k to push to app/* and go/svc/*
We have quite a bit of them at this point, and we're likely going to use
app/* and go/svc/* for 'core' services only anyway.

Change-Id: Ic315fbd2d672e525439992bfcd9ead730d1a1b71
2019-07-13 17:13:09 +02:00
q3k f448f99385 go/svc/speedtest: bazelify
Change-Id: If83422929432a316c11e25c7dda68d8172f25167
2019-07-13 16:28:14 +02:00