Commit Graph

17 Commits

Author SHA1 Message Date
Andrew Dryga
52b284abd9 Terraform improvements for production (#2873) 2023-12-11 19:41:01 -06:00
Gabi
aec5b97012 Add performance tests for client-gateway communication (#2655) 2023-11-17 00:32:34 -06:00
Andrew Dryga
8b8881f415 Make CodeQL a part of CI workflow (#2492) 2023-10-23 16:16:09 -06:00
Gabi
cc65a63c63 Update Dockerfile (#2490)
When moving from debian to alpine we stopped installing `curl` and it's
needed to get the public ipv4 and ipv6 of the relay in the
`docker-init.sh`

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
2023-10-23 18:44:39 +00:00
Jamil
fa57d66965 Publish Releases (#2344)
- rebuild and publish gateway and relay binaries to currently drafted
release
- re-tag current relay/gateway images and push to ghcr.io

Stacked on #2341 to prevent conflicts

Fixes #2223 
Fixes #2205 
Fixes #2202
Fixes #2239 

~~Still TODO: `arm64` images and binaries...~~ Edit: added via
`cross-rs`
2023-10-20 14:20:43 -07:00
Thomas Eizinger
2cfe7befef refactor(connlib): remove ControlSignal (#2321) 2023-10-18 17:28:04 +11:00
Thomas Eizinger
ecae222674 fix(rust): install toolchain in base layer (#2258)
Copying the `rust-toolchain.toml` file in is one thing but if we want to
avoid repeatedly installing it, we should do that in the same layer too.

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2023-10-06 14:12:58 -06:00
Thomas Eizinger
9a41983447 ci: optimize caching further (#2246)
This patch-set aims to make several improvements to our CI caching:

1. Use of registry as build cache: Pushes a separate image to our docker
registry at GCP that contains the cache layers. This happens for every
PR & main. As a result, we can restore from **both** which should make
repeated runs of CI on an individual PR faster and give us a good
baseline cache for new PRs from `main`. See
https://docs.docker.com/build/ci/github-actions/cache/#registry-cache
for details. As a nice side-effect, this allows us to use the 10 GB we
have on GitHub actions for other jobs.
2. We make better use of `restore-keys` by also attempting to restore
the cache if the fingerprint of our lockfiles doesn't match. This is
useful for CI runs that upgrade dependencies. Those will restore a cache
that is still useful although doesn't quite match. That is better[^1]
than not hitting the cache at all.
3. There were two tiny bugs in our Swift and Android builds:
a. We used `rustup show` in the wrong directory and thus did not
actually install the toolchain properly.
b. We used `shared-key` instead of `key` for the
https://github.com/Swatinem/rust-cache action and thus did not
differentiate between jobs properly.
5. Our Dockerfile for Rust had a bug where it did not copy in the
`rust-toolchain.toml` file in the `chef` layer and thus also did not use
the correctly toolchain.
6. We remove the dedicated gradle cache because the build action already
comes with a cache configuration:
https://github.com/firezone/firezone/actions/runs/6416847209/job/17421412150#step:10:25

[^1]: Over time, this may mean that our caches grow a bit. In an ideal
world, we automatically remove files from the caches that haven't been
used in a while. The cache action we use for Rust does that
automatically:
https://github.com/Swatinem/rust-cache?tab=readme-ov-file#cache-details.
As a workaround, we can just purge all caches every now and then.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-10-05 06:26:56 -07:00
Jamil
80234f9c71 Github Actions cache on main and scope caches for all languages/runtimes (#2233) 2023-10-04 17:29:04 -07:00
Jamil
c4c6f3e4ca refactor(portal): Don't pin session token to user_agent or remote_ip (#2195)
Removing the check to get Rust PRs to pass.

**Note**: #2182 was dependent on this one, and has since merged into
this one.
2023-09-30 07:40:57 -07:00
Jamil
a98f30a8dd fix(ci): Fix flaky integration tests (#2190) 2023-09-29 01:12:29 -07:00
Thomas Eizinger
6681301166 fix(relay): use system cert store for root certificates (#1999) 2023-09-08 01:32:48 -06:00
Gabi
7d0e0acfe9 fix(connlib): assorted fixes (#1953)
* single stack ipv6/ipv4
* set mtu for linux connlib
* add iperf3 resource on dev docker-compose

---------

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-08-28 23:47:00 +00:00
Andrew Dryga
9e17352fd6 Deploy relays (#1706)
Will finish once #1705 is merged and stable.

cc @thomaseizinger
2023-08-08 17:15:33 -05:00
Gabi
720b2f8cd9 Fix/docker compose up (#1705)
This PR fixes `docker compose up` but it doesn't have the test client ->
resource flow working but it prevent anything from erroring at startup.

This fixes:
* tokens (use the correct token for the client user agent we are using)
* randomize `name_suffix` at start up for connlib (we will eventually
allow options to set it manually)
* remove port ranges for relay (see firezone/product#613)
2023-06-28 18:48:33 +00:00
Gabi
1d50883dbd rust: fix dockerfile for building multiple images in parallel (#1699)
When using `docker compose build` or any other way of building docker
images in parallel the way the cache was working with the rust's
Dockerfile made the caches between images overlap and corrupt each
other. We add a `locked` which prevents multiple writers to the same
cache to fix this behaviour.
2023-06-26 13:46:20 -06:00
Gabi
e9be4b9ef5 connlib: moves it to the main firezone library
This brindgs connlib from its own separated repo to firezone's monorepo.
    
 On top of bringing connlib we also add and unify the Dockerfile for all
 rust binaries and add a docker-compose that can run a headless client, a
 relay and a gateway which eventually will test the whole flow between a
 client and a resource. For this to work we also incorporated some elixir
 scripts to generate portal tokens for those components.
2023-06-23 16:39:58 -06:00