-
Notifications
You must be signed in to change notification settings - Fork 10
Aws fastpath deploy #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Aws fastpath deploy #240
Conversation
This server was running out of memory trying to bring up the fastpath docker container. I changed the instance type from one with 0.5gb of ram to one with 1gb of ram
If you don't the first time you run this notebook it will crash with "permission required" whenever you try to run a docker command
Terraform Run Output 🤖Format and Style 🖌
|
Pusher | @LDiazN |
Action | pull_request |
Environment | dev |
Workflow | .github/workflows/check_terraform.yml |
Last updated | Thu, 03 Jul 2025 14:25:55 GMT |
Ansible Run Output 🤖Ansible Playbook Recap 🔍
Ansible playbook output 📖
|
Pusher | @LDiazN |
Action | pull_request |
Working Directory | |
Workflow | .github/workflows/check_ansible.yml |
Last updated | Thu, 03 Jul 2025 14:27:27 GMT |
dest: "/opt/{{fastpath_user}}/backend" | ||
# TODO Change to `master` when https://github.com/ooni/backend/pull/935 is merged | ||
version: support-deploying-fastpath-as-docker-container | ||
force: yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be ideal if we did this using the same pattern as the reset of the services. That would be building the docker image upon each commit in backend automatically and then we do the deploy using the tag.
It otherwise makes it harder to test something in dev and then deploy it inside of prod.
What we would ideally like to do is make a build, tag a version, test it in dev and then when the test passes we can deploy it to prod.
Can you make changes to run this as part of the CD pipeline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure!
We are also missing another piece to get fastpath fully working and that is handling measurement upload. It's necessary to extract the api-uploader systemd unit and component over to fastpath (see: https://github.com/ooni/backend/blob/master/api/debian/ooni-api-uploader.timer). Other relevant docs are for these pieces are here: https://docs.ooni.org/backend/systemd-timers/#ooni-api-uploader-timer I guess we have 2 options on how to handle this:
|
I will probably go with 2, but I will address it in a follow up PR with that and setting up the access to s3 and clickhouse |
The previous version would crash when the docker was already running, this version will skip running the container if already present and will check for variations in configurations
This PR will add an ansible role to deploy the fastpath as an EC2 isntance using Docker.
The ansible role will:
Known issues
For now this setup has an issue with the Docker installation where the docker role will try to reboot the SSH connection to apply docker group settings, but this seems to crash the next command:
There's also another issue where the Docker deployment fails because it can't create a network for the docker compose. This is fixed by manually rebooting the docker daemon:
systemctl restart docker
(see https://stackoverflow.com/questions/54380847/failed-to-setup-ip-tables-unable-to-enable-nat-rule)To solve this issue we have to ensure that docker is rebooted before starting the docker compose
This should be solved by
devops/ansible/roles/fastpath/tasks/main.yml
Line 45 in 4b148c6
Update
After the last review I added the following features:
closes #239