Skip to content

Dockerize application and add integration tests - #890

Merged
mxsasha merged 1 commit into
mainfrom
docker
Sep 19, 2023
Merged

Dockerize application and add integration tests#890
mxsasha merged 1 commit into
mainfrom
docker

Conversation

@aequitas

@aequitas aequitas commented Mar 8, 2023

Copy link
Copy Markdown
Collaborator

Getting started documentation on setting up a developer environment and integration tests: https://github.com/internetstandards/Internet.nl/blob/docker/documentation/Docker-getting-started.md

Other documents can be found at: https://github.com/internetstandards/Internet.nl/blob/docker/documentation/Docker.md

Collective todo:

  • Test the setup with a production size dataset

Edit: to 'fix' the hundreds hidden items, Load more… a poor man's solution is this js:

function loadAllComments() {
    let needRescheduling = false;
    const buttons = Array.from(document.querySelectorAll('button'));
    buttons.forEach((button) => {
        if (button.classList.contains('ajax-pagination-btn')) {
            if(!button.hasAttribute('disabled') && button.innerText === 'Load more…') {
                console.log("found", button);
                needRescheduling = true;
                button.dispatchEvent(new MouseEvent('click', {
                    bubbles: true,
                    cancelable: true
                }));                
            }
            else if(button.hasAttribute('disabled') && button.innerText === 'Loading…') {
                console.log("waiting", button);
                needRescheduling = true;
            }
            else {
                console.log("unrecognized 'Load more' button", button);
            }
        }
    });
    if (needRescheduling) {
        setTimeout(loadAllComments, 200)
    }
    else {
        console.log("all comments loaded");
    }
}

loadAllComments();

@aequitas
aequitas force-pushed the docker branch 30 times, most recently from 640c4f9 to 4b68438 Compare March 10, 2023 17:08
@aequitas

aequitas commented Jun 2, 2023

Copy link
Copy Markdown
Collaborator Author

It's on my list for next week to fix the resolving with BATCH enabled. But it's strange Docker isn't picking up on the changes you are making to the settings file. Do you by any chance have the ENABLE_BATCH variable exported in your shell (env | grep ENABLE_BATCH should be empty)?

@atjn

atjn commented Jun 2, 2023

Copy link
Copy Markdown

Ah! It turned out to be importing the env file from the wrong repo (I have 6 copies now, from testing git clone). With BATCH disabled, I am able to run the tests!

One bit of feedback: Most of the test results are worse than they should be because the IPv6 routing doesn't work, making the code think that I have a misconfigured IPv6 site. This makes it a bit hard to debug changes to the scoring. It would be nice if we could have an option that just ignores IPv6 results :)

@aequitas

aequitas commented Jun 5, 2023

Copy link
Copy Markdown
Collaborator Author

@atjn I'm curious. How did you end up importing te env file from the wrong repo? Do you maybe have shell settings that source them automatically from a project directory?

@atjn

atjn commented Jun 6, 2023

Copy link
Copy Markdown

To be more precise, when opening the env file in VSCode to edit it, VSCode opened the file from the wrong repo, so I never actually edited the file that Docker was importing 😅
While debugging the issue, I called cat on the env file from inside the shell that I ran Docker in, and was surprised to see that the value wasn't edited, and that's how I figured it out.

@aequitas

Copy link
Copy Markdown
Collaborator Author

Hi @atjn, besides the point you mentioned above. Where you able to use the Docker environment to develop/test your changes or did you run into any more issues?

@atjn

atjn commented Jun 13, 2023

Copy link
Copy Markdown

@aequitas my other issues are mainly with understanding the code base, not anything specific to the docker image. I would like to have a fully configurable test website where I can quickly change values and see the outcome in a test. That does not seem to exist, or at least I can't find proper documentation for it.

Other than that, I have not come much further, because the IPv6 issue is a pretty big blocker. When I can't find any detailed documentation for the inner workings of INL, I have to manually try things and see what the result is, but I can't do that because of the IPv6 issue :)

@aequitas

Copy link
Copy Markdown
Collaborator Author

I'm working on that this week, so I'll let you know if I have an update on that regard.

@aequitas

aequitas commented Jun 28, 2023

Copy link
Copy Markdown
Collaborator Author

@atjn

Other than that, I have not come much further, because the IPv6 issue is a pretty big blocker. When I can't find any detailed documentation for the inner workings of INL, I have to manually try things and see what the result is, but I can't do that because of the IPv6 issue :)

What kind of system are you developing on? Linux, Mac? Depending on that I might already have a solution to get IPv6 working.

@atjn

atjn commented Jun 28, 2023

Copy link
Copy Markdown

@aequitas Linux debian/ubuntu

@aequitas

Copy link
Copy Markdown
Collaborator Author

@atjn in that case you may want to refer to this chapter of the development environment docs: https://github.com/internetstandards/Internet.nl/blob/docker/documentation/Docker-development-environment.md#ipv6-subnet-forwarding-linux-only

I have not had the chance to test this extensively on desktop. So there might be some things missing, let me know if your run into issues.

@bwbroersma

bwbroersma commented Jun 30, 2023

Copy link
Copy Markdown
Collaborator

Just had a discussion with @baknu about HSTS, we should add a comment not to use includeSubdomains in the HSTS before #324 is fixed:
https://github.com/internetstandards/Internet.nl/blob/98911cc340e85c8e105cf69d5bee36a73c781251/docker/webserver/nginx_templates/app.conf.template#L14C1-L14C85

add_header 'Strict-Transport-Security' 'max-age=31536000; includeSubdomains' always;

Update: see #1010 (a3035fc) for the comment to add around this setting.

@baknu

baknu commented Jun 30, 2023

Copy link
Copy Markdown
Contributor

For the relevant Apache setting (without includeSubdomains) see:

Header always set Strict-Transport-Security "max-age=36817200"

It should be made explicit in the the documentation to not use this includeSubdomains HSTS directive.

@mxsasha

mxsasha commented Jul 19, 2023

Copy link
Copy Markdown
Collaborator

Did a bunch more testing on the latest status and docs. Switched to Colima on my mac (0.5.5) and also tested on an Arch linux with Docker 24.0.2.

  • On the mac setup, the worker fails to start because it can't resolve the Redis host. Curious, because from what I can see they are on the same network and the app container does not have any issue. Log below. This spontaneously fixed itself after another down/up. Which I had already done numerous times without improvement? Any further debugging tips?
  • On the linux instance, the static files URLs 404. The static files are in /app/static/ in the container. I tried debugging it for a while and it seemed like django.contrib.staticfiles.finders.FileSystemFinder wanted them in /app/assets. Copying them there did fix it but if there were an actual configuration issue, I'd expect it to fail on mac as well, but there static files are fine (and /app/assets in the container almost empty).
  • Should the ENABLE_BATCH setting be in develop.env? Sounds like a local setting to me that should not be in git.
  • RabbitMQ CPU usage still seems high while idle. Perhaps this is out of our scope, but I attached some graphs as we discussed it a few times.
  • Will try to get IPv6 on the linux box set up too. Works, was very smooth.

Redis issue log:

internetnl-dev-worker-1     | 2023-07-13 11:12:53	DEBUG    - Running interface startup checks.
internetnl-dev-worker-1     | 2023-07-13 11:12:53	DEBUG    - Loading autoconf into redis cache.
internetnl-dev-worker-1     | Batch enabled, single domain scanning via User Interface not available.
internetnl-dev-worker-1     | Traceback (most recent call last):
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 698, in connect
internetnl-dev-worker-1     |     sock = self.retry.call_with_retry(
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/retry.py", line 46, in call_with_retry
internetnl-dev-worker-1     |     return do()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 699, in <lambda>
internetnl-dev-worker-1     |     lambda: self._connect(), lambda error: self.disconnect(error)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 955, in _connect
internetnl-dev-worker-1     |     for res in socket.getaddrinfo(
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/eventlet/support/greendns.py", line 569, in getaddrinfo
internetnl-dev-worker-1     |     raise socket.gaierror(socket.EAI_NONAME, 'No address found')
internetnl-dev-worker-1     | socket.gaierror: [Errno -2] No address found
internetnl-dev-worker-1     |
internetnl-dev-worker-1     |
internetnl-dev-worker-1     | During handling of the above exception, another exception occurred:
internetnl-dev-worker-1     |
internetnl-dev-worker-1     |
internetnl-dev-worker-1     | Traceback (most recent call last):
internetnl-dev-worker-1     |   File "/usr/local/bin/celery", line 8, in <module>
internetnl-dev-worker-1     |     sys.exit(main())
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/__main__.py", line 15, in main
internetnl-dev-worker-1     |     sys.exit(_main())
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/bin/celery.py", line 235, in main
internetnl-dev-worker-1     |     return celery(auto_envvar_prefix="CELERY")
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1130, in __call__
internetnl-dev-worker-1     |     return self.main(*args, **kwargs)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1055, in main
internetnl-dev-worker-1     |     rv = self.invoke(ctx)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1657, in invoke
internetnl-dev-worker-1     |     return _process_result(sub_ctx.command.invoke(sub_ctx))
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1404, in invoke
internetnl-dev-worker-1     |     return ctx.invoke(self.callback, **ctx.params)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 760, in invoke
internetnl-dev-worker-1     |     return __callback(*args, **kwargs)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/click/decorators.py", line 26, in new_func
internetnl-dev-worker-1     |     return f(get_current_context(), *args, **kwargs)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/bin/base.py", line 134, in caller
internetnl-dev-worker-1     |     return f(ctx, *args, **kwargs)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/bin/worker.py", line 348, in worker
internetnl-dev-worker-1     |     worker = app.Worker(
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/worker/worker.py", line 93, in __init__
internetnl-dev-worker-1     |     self.app.loader.init_worker()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/loaders/base.py", line 110, in init_worker
internetnl-dev-worker-1     |     self.import_default_modules()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/loaders/base.py", line 104, in import_default_modules
internetnl-dev-worker-1     |     raise response
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/utils/dispatch/signal.py", line 276, in send
internetnl-dev-worker-1     |     response = receiver(signal=self, sender=sender, **named)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/fixups/django.py", line 97, in on_import_modules
internetnl-dev-worker-1     |     self.worker_fixup.validate_models()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/fixups/django.py", line 135, in validate_models
internetnl-dev-worker-1     |     self.django_setup()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/celery/fixups/django.py", line 131, in django_setup
internetnl-dev-worker-1     |     django.setup()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/django/__init__.py", line 24, in setup
internetnl-dev-worker-1     |     apps.populate(settings.INSTALLED_APPS)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/django/apps/registry.py", line 122, in populate
internetnl-dev-worker-1     |     app_config.ready()
internetnl-dev-worker-1     |   File "/app/interface/apps.py", line 163, in ready
internetnl-dev-worker-1     |     _load_padded_macs_in_cache()
internetnl-dev-worker-1     |   File "/app/interface/apps.py", line 47, in _load_padded_macs_in_cache
internetnl-dev-worker-1     |     red.hmset(redis_id.padded_macs.id, json.load(f))
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/commands/core.py", line 4961, in hmset
internetnl-dev-worker-1     |     return self.execute_command("HMSET", name, *items)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/client.py", line 1255, in execute_command
internetnl-dev-worker-1     |     conn = self.connection or pool.get_connection(command_name, **options)
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 1442, in get_connection
internetnl-dev-worker-1     |     connection.connect()
internetnl-dev-worker-1     |   File "/usr/local/lib/python3.9/dist-packages/redis/connection.py", line 704, in connect
internetnl-dev-worker-1     |     raise ConnectionError(self._error_message(e))
internetnl-dev-worker-1     | redis.exceptions.ConnectionError: Error -2 connecting to redis:6379. No address found.

RabbitMQ CPU usage:
Screenshot 2023-07-13 at 13 58 50

@mxsasha

mxsasha commented Jul 19, 2023

Copy link
Copy Markdown
Collaborator

Perhaps related to my earlier redis host resolution issue, here's an integration test on the linux instance failing at least in part due to host resolution errors: https://gist.github.com/mxsasha/72cb79584dcceebb012c017374df838a

On my colima mac instance, there are connection timeouts and the test never finished: https://gist.github.com/mxsasha/dd63303a7c02439d9fbb63a6234b4108

Command was make up integration-tests env=test, git diff was clean.

@bwbroersma

bwbroersma commented Aug 8, 2023

Copy link
Copy Markdown
Collaborator

Post-it reminders:

Some other notes:

  • ideally fix the Makefile to explicitly error on a make build (no env set), or default to some env
  • I would prefer having the main 5 console steps (git clone, cd, git submodule update, make build, make up) and visit http://localhost:8080 in one 'Getting started' block
  • add can we add some console output about accessible port, e.g. some 🚀 Running on http://localhost:8080?
  • maybe suggest ip -6 addr | grep global -B1?
  • use the curl arguments curl -sSfO --output-dir "docker" --compressed URL instead of curl -s URL > docker/basename.env? To the unfamiliar curl user, here these arguments do the following things:
    • -S, --show-error When used with -s, --silent, it makes curl show an error message if it fails.
    • -f, --fail (HTTP) Fail silently (no output at all) on server errors.
    • -O, --remote-name Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
    • --output-dir <dir> This option specifies the directory in which files should be stored, when -O, --remote-name or -o, --output are used.
    • --compressed (HTTP) Request a compressed response using one of the algorithms curl supports, and automatically decompress the content.
  • add reference to HE (https://tunnelbroker.net) option
  • explicitly state {"experimental":true,"ip6tables":true} for /etc/docker/daemon.json

For the 'known issues/improvements' ticket:

  • higher load on development is due to worker health test (worker + rabbitmq)
  • document option to use RIPE routinator for ROUTINATOR_URL in develop (to speedup / use less resources)
  • add routinator issue for the docker-compose comment # TODO: convert to service_healthy when healthcheck is added to routinator

@aequitas aequitas mentioned this pull request Aug 10, 2023
@mxsasha

mxsasha commented Aug 22, 2023

Copy link
Copy Markdown
Collaborator

Built a setup using the docs on a fresh Ubuntu 22 box. I've fixed and improved a number of things:

  • Documented that IPv6 addresses must be compressed (for nginx host matching) and IPV6_SUBNET_PUBLIC must not contain host's own IP.
  • Fixed ACME challenges for conn domain.
  • Fixed incorrect redirect due to regex in nginx config, which was breaking ACME challenges.
  • Added IPv6 address to ALLOWED_HOSTS for conntest.
  • Made certbot check separately whether either of the two certificate steps are needed. Otherwise it would only make one attempt, then never again try to extend the certificate with the additional domains.

Builds are failing, but that's our legacy build because zlib deleted their tarball because they released a new version.

My unbound/web IPv6 address wasn't reachable from outside, as the host was not responding to ND requests. I fiddled with sysconf settings for a while, but it did not work. I ended up running ndppd with the following config, which fixed it. Not sure if this is the best approach or I missed something else:

proxy <external interface name> {
     rule <$IPV6_SUBNET_PUBLIC> {
        auto;
    }
}

Also noticed logs like these in the host's journal:

Aug 21 17:38:14 id dockerd[879]: time="2023-08-21T17:38:14.906599747Z" level=error msg="[resolver] failed to query DNS server: 108.61.10.10:53, query: ;celery-exporter.\tIN\t AAAA" error="read udp 192.168.42.111:45740->108.61.10.10:53: i/o timeout"
Aug 21 17:38:14 id dockerd[879]: time="2023-08-21T17:38:14.924006993Z" level=error msg="[resolver] failed to query DNS server: 108.61.10.10:53, query: ;celery-exporter.\tIN\t A" error="read udp 192.168.42.111:44951->108.61.10.10:53: i/o timeout"
Aug 21 17:38:15 id dockerd[879]: time="2023-08-21T17:38:15.914125590Z" level=error msg="[resolver] failed to query DNS server: 8.8.8.8:53, query: ;celery-exporter.\tIN\t AAAA" error="read udp 192.168.42.111:44659->8.8.8.8:53: i/o timeout"

@mxsasha

mxsasha commented Aug 22, 2023

Copy link
Copy Markdown
Collaborator

I am also noticing some flakiness in the integration test on CI, e.g.: https://github.com/internetstandards/Internet.nl/actions/runs/5938938158/job/16104534541?pr=890

@aequitas

Copy link
Copy Markdown
Collaborator Author

I am also noticing some flakiness in the integration test on CI, e.g.: https://github.com/internetstandards/Internet.nl/actions/runs/5938938158/job/16104534541?pr=890

This is a known problem which I'm still investigating, no solution in sight yet, but often restarting the CI run make it pass.

@aequitas

Copy link
Copy Markdown
Collaborator Author

My unbound/web IPv6 address wasn't reachable from outside, as the host was not responding to ND requests. I fiddled with sysconf settings for a while, but it did not work. I ended up running ndppd with the following config, which fixed it. Not sure if this is the best approach or I missed something else:

Which sysconf settings did you try?

Also noticed logs like these in the host's journal:

Aug 21 17:38:14 id dockerd[879]: time="2023-08-21T17:38:14.906599747Z" level=error msg="[resolver] failed to query DNS server: 108.61.10.10:53, query: ;celery-exporter.\tIN\t AAAA" error="read udp 192.168.42.111:45740->108.61.10.10:53: i/o timeout"
Aug 21 17:38:14 id dockerd[879]: time="2023-08-21T17:38:14.924006993Z" level=error msg="[resolver] failed to query DNS server: 108.61.10.10:53, query: ;celery-exporter.\tIN\t A" error="read udp 192.168.42.111:44951->108.61.10.10:53: i/o timeout"
Aug 21 17:38:15 id dockerd[879]: time="2023-08-21T17:38:15.914125590Z" level=error msg="[resolver] failed to query DNS server: 8.8.8.8:53, query: ;celery-exporter.\tIN\t AAAA" error="read udp 192.168.42.111:44659->8.8.8.8:53: i/o timeout"

These queries should not have to be forwarded as they are resolved internally. Do you see these coming back all the time or only at startup? Might be a race condition.

@mxsasha

mxsasha commented Aug 28, 2023

Copy link
Copy Markdown
Collaborator

Which sysconf settings did you try?

net.ipv6.conf.all.proxy_ndp for all interfaces, made no difference.

These queries should not have to be forwarded as they are resolved internally. Do you see these coming back all the time or only at startup? Might be a race condition.

Not only at startup, but also not continuously: https://gist.github.com/mxsasha/b35ee26a9090f0e4c6b2a8eda4de678b
Docker and all containers have been running for 4 days.

@aequitas

Copy link
Copy Markdown
Collaborator Author

@mxsasha what version of Docker are you running? Did you configure the ip6tables and experimental settings in the daemon.json and stopped/started Docker? Could you try setting sysctl net.ipv6.conf.eth0.accept_ra=2 (or other network interface that is your primary)?

@mxsasha

mxsasha commented Aug 28, 2023

Copy link
Copy Markdown
Collaborator

@mxsasha what version of Docker are you running? Did you configure the ip6tables and experimental settings in the daemon.json and stopped/started Docker? Could you try setting sysctl net.ipv6.conf.eth0.accept_ra=2 (or other network interface that is your primary)?

Yes, those settings are set. Running Docker version 24.0.5, build ced0996. accept_ra makes no difference. I can see the local router's NDP attempts, but my server just does not respond:

13:41:17.634078 enp1s0 M   IP6 fe80::fc00:4ff:fe88:e1f3 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2001:19f0:6c01:1ec3:42::1000, length 32
13:41:18.655547 enp1s0 M   IP6 fe80::fc00:4ff:fe88:e1f3 > ff02::1:ff00:1000: ICMP6, neighbor solicitation, who has 2001:19f0:6c01:1ec3:42::1000, length 32

@baknu

baknu commented Sep 3, 2023

Copy link
Copy Markdown
Contributor

What is our backup procedure when we run on Docker? Is this documented?

@aequitas

aequitas commented Sep 4, 2023

Copy link
Copy Markdown
Collaborator Author

@baknu there is not a proper procedure yet. But all stateful data is stored in /var/lib/docker/volumes/internetnl_* (see: https://github.com/internetstandards/Internet.nl/blob/docker/documentation/Docker-deployment.md#statebackupsrestoresmigration). So these could be snapshotted/backed up depending on what the hosting provider can offer.

[1.7.x] Ref #941 - Quick fix for sectxt translation mixup

Manage external repositories through submodules and include other external sources in this repository

Refactor settings to be configurable by environment variables

Remove old docker implementation

Add Dockerfile for application and docker-compose.yml for application stack.

Add integration test suite

Miscellaneous cleanup

Github action for integration tests

Improve logging during tests

Allow local development in Docker Compose

Add unbound resolver for connection test

Add test target for domain and mail tests

Httpd webserver for testing against current configuration, to be replaced with nginx config

WIP: Split workers into multiple services

WIP: Use nginx as webserver instead of apache2/httpd

WIP: beat scheduler/batch?

WIP: testsuite

WIP: connection test

Add integration tests that test against live running instances instead of controlled environment.

WIP: temporary letsencrypt TLS certs

TODO: autoreload fix?

Use test target that complies with current main branch CSP header rules

WIP: disable advanced checks until test environment is fully simulated

Test targets healthcheck

Make Unbound use Docker resolver during tests

Adjust test scores

wip

Add public suffix list to integration test environment for mail test

TODO: why is this resolved during tests

Further isolate DNS in test environment to speed up testing

Disable forwarding of all DNS requests not explicitly handled by dnsmasq so tests won't wait for resolving. This speeds up the test suite from minutes to seconds.

Add target for testing all browsers

Used fixed ip for mail test target

Use .test tld for test targets

Unbound logging

wip

wip

Keep docker images locally so they don't have to be pulled in the next steps

Enable batch API

Documentation

Add monitoring

Statsd monitoring examples

Settings file for locohost.nl

Make integration tests code configurable

Remove the need for dist settings

Disable tracking on test/development

Fix connection test IPv6 resolving

Skip test we expect to fail to improve test suite speed

Add dependencies for integration test

Add live tests

TODO: fix unbound for batch on staging

Add security and robots .txt files

Add favicon

Split integration tests into multiple files

Split live tests into files

Cleanup testsuite

Deployment documentation

Make live/integration tests more similar

Split live tests

Enable linting on integration tests code

Move integration tests docker resources to docker folder and naming consistency

Deployment docs

IPv6 dev env docs

Fix batch by enabling scheduler which kicks of tasks

Add container logging to integration tests

Development docs

Switch from Apache to Nginx webserver, add letsencrypt, https in integration test environment

Reduce expected test score after rebase

Don't let build fail if Github has issues with their caching system

Split build from test and make concurrent

Split image pins in separate file, build versioned images in github actions

Make compose project names more distinct

Make reboot proof

Production settings

Celery exporter

Metrics documentation

Test connection test redirect, don't redirect for trailing slashes, redirect for subdomains as well

Fix race condition for certbot

Non conflicting address for staing unbound

Add worker healthcheck

Docs

Run integration tests without DEBUG, serve static files from Django in production, add static files caching and expires.

Solve redis connection leak issue, deprecate 3.7 build.

Add short commands

Move assets files out of python source directories, to improve docker build cache

Small improvements in docker image build speed

404's should return proper status code, because otherwise they might be cached

Work around precondition failed issue with celery workers and rabbitmq

Use correct path for development volume mounts

Fix grafana authenticaton nagging from websockets

Disable includeSubdomains on HSTS header, add docs.

Use Zone file notation for DNS example

Use Dockerfile as extension

Lower default healthcheck interval on production

Disable grafana connecting out

Docs

Improve stability

Add nowww class b complicance

Build images for monitoring so Git repo should not be needed for deployment

Silence warning

Remove unused Make targets

Version number

Matomo settings description

IP allow/deny lists and site wide basic auth

Container troubleshooting logging

Setuptools_scm version as tag

Serve connection test result over https

Fix nginx config issues

WIP: sign connection test zones

WIP: add test- commands

WIP: rework deployment docs without Git, Make and with env file split

Fix glue records for unbound zone

Docs

WIP: dev env volumes

Update test domains/email

Troubleshooting docs

Cleanup

typo fix

Signed-off-by: Sasha Romijn <github@mxsasha.eu>

Fix zones path for docker volume

Docs

Reduce port exposure

Firewall docs

Normalize env files

Document compose spec

Switch from gunicorn to uwsgi

Fix unbound config file interpolation after restart

Allow debug logging in test, even if DEBUG=False

Debugging docs

Devenv: autoreload and mounted sources as default

Store compose logs as artifacts for CI debugging

Integration test environment docs

Add test summary to CI

Disable trace logs by default

Add Docker linting and unittests, split workflows

Split docker and old CI

Add unit tests

Make CI test run more reliable

Remove need to generate secret key during deployment

Cleanup

Builtin unbound verbose logging

Allow shorthand 'env' for 'environment' in make commands

Pull all images to keep test run output clean

Consistency

Improve caching

Fix indenting

Document live testing, simplify live testing setup, add batch test

Docs

Add option for worker concurrency

Standalone live tests

Make celery exporter more reliable

Docs, env diff table, make dev env explicit

Move env files into docker directory

Fix unit test environment file

Improve when tasks are shown

Use layered approach for env files

Make rpki test more reliable when results are incomplete, document issues with test isolation.

Batch docs

Use static IP's for internal connections instead of relying on Docker's flaky internal resolver

Move logs capture lower to capture logs for all started services

Remove duplicate config

Make Hof seperately configurable

Fix race condition with internal resolver to make CI tests more reliable

Add test for development environment, split static files tests into existing and generated files, fix static files for develop environment.

Pytest colored output in Github

Suppres warnings in CI

Adjust test score

Add test report for live and develop tests

Add IPv6 documentation for macOS

All services should restart after 'reboot'

Add unit tests to summary as well

Default test-runner to live tests

Batch docs

Ignore test result parsing failures

Log failures of up command

Fix docs

Add test-all command

Cleanup host env file and improve batch docs

Build all images

Compare technical results for batch tests before asserting score

Remove outdated file

Run integration tests in ci verbose

Fix IPv6 docs

Make integration tests use unique id for each test to make correlating tests with logs easier

Make startup more reliable using start_period instead of many retries

Workaround for Docker not allowing intercontainer IPv6 traffic on 'internal' networks, will be fixed in Docker 25, see: moby/moby#45649

Fix allowed hosts after slimming down host-dist.env

Make issues with existing environment variables during deploy less likely

Make unbound verbose logging configurable

Test environment context

Revert "Pytest colored output in Github"

This reverts commit 43f3dbd.

WIP: Add second integration test with ip6tables enabled

Make rabbitmq healthcheck and startup more reliable

Remove outdated config file

Routinator basic healthcheck

Fix logging issues when bringing ci environment up

Update deployment docs

Disable routinator to pull in data during test and develop

Add website test to develop

Test development environment in CI using ipv6

Fix host-dist.env file

Improve instructions for DNSSEC reset

Expose DNS port on IPv6

Update live-tests docs for ipv6

Production and batch overview images

Move test-runner into integration-test

Architecture docs

Remove invalid TLSA from zone files

Add running message

Fix documentation for IPv6 on macOs, add HE tunnel mention, simplify Linux instructions

Disable waiting for healthy routinator as it takes to long of a time for routinator to start.

Remove outdated file

Allow configuring encrypted passwords

Document different test suites

Fix subdomain redirects in nginx (quick fix pending discussion)

Signed-off-by: Sasha Romijn <github@mxsasha.eu>

Fix nginx redirects, attempt 2

This reverts commit b959a54.

Fix conn domain letsencrypt

Add $IPV6_IP_PUBLIC to ALLOWED_HOSTS in host-dist.env

Add note about IPv6 addresses

Signed-off-by: Sasha Romijn <github@mxsasha.eu>

Improve resilience of certbot entrypoint

Documentation formatting fix

Signed-off-by: Sasha Romijn <github@mxsasha.eu>

Update integration test security.txt expectation ref #932

Add https scheme to CSP policy to meet #810

Set our Referrer-Policy to same-origin to meet #357

Make sure live tests examples always use latests

Remove old config file

Reduce complication in IPv6 setup for deployments

- Remove the need to assign and forward IPv6 subnets to the internal docker networks
- bind unbound ports explicitly to external addresses to not conflict with os resolvers on localhost
- update deployment documentation

Test conn. redirects

Revert IP in allowed hosts, add testcase

Fix develop environment ipv6 test

Use internal resolver for all queries made by app/worker

Rename test-resolver to mock-resolver for clarity

Work around issue with resolving race condition in CI

Fix documentation for nginx auth config

Simplify compose commands in docs

Pull test runner for develop test

There is no public IPv6 network on Github actions, so these jobs make no sense.

Enable DNSSEC validation for internal resolver

Reduce maximum test duration and retest timeout on development

Fix linting, fix linting errors

Keep celery exporter running after crash

Resign zones every time, but persist the keys, so we don't have to update DNS after IP/hostname changes.

Update docs

Split internal resolver in validating and permissive to both accomodate ldns-dane which requires validation and other queries which needs to be passed through to the client despite failing DNSSEC validation

Add live test for sites with known score

Don't search integration test directory during 'normal' tests

Add Gixy check for nginx configs

Nginx log vhost name, use chrome for playwright trace

Issue 894, disable hsts on https://conn. domain and return 404 not found for all non-configured domains

Use --project-name instead of --env-file for everything but up/pull/run

Add node exporter

Fix initial configuration for batch

Rewrite basic auth, require authentication when DEBUG is enabled

Integrate certbot with webserver service, auto reload nginx on certificate changes

Test-all

Set max tasks per child, to reduce memory issues on ipv6kaartmetingen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants