-
Notifications
You must be signed in to change notification settings - Fork 52
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
Add initial docker build and documentation #926
base: main
Are you sure you want to change the base?
Conversation
Not sure if you want me to keep adding words to docs/spelling_wordlist.txt until it passes or not? |
This is a good start! Some thoughts:
|
I'm also wondering if original client IPs are still visible to IRRD with this network setup? If all this creates complexity beyond your available time/interest/skill, I can probably also pick this up myself :) |
…paths, and remove IRR data
…-compose path, add explenation for new import_data.sh script
I have tried to address you concerns:
Yeah makes sense, my original PR was coming from a dev perspective (more on this later). I have removed the IRR data and put it in a script so that devs can import data only if they want to, for testing. I've also added it to the documentation.
The git thing was coming from running Sphinx tests inside docker. Because the .git/ sub-folder is mounted by docker-compose Sphinx checks if the owner of the folder is correctly set (it's not, because docker runs as root). It's not possible to not mount the .git/ sub-folder. I also tried to make the .git/ sub-folder empty but Sphinx then complains there is a .git/ folder which is not a real repo. To resolve this I updated the documentation, you still need to run the command, but only if you want to run the Sphinx tests, and at run time, not build time, so it's not baked into the container.
Just internal practice I copy-pastered. Fixed now.
Hold that thought...
Yes original client IPs are visible, but this comment, and the one above, and also you first comment I quoted above, all make me think we have different goals with "dockerising" IRRd. My aim with this PR is to get IRRd and all it's Python dependencies, and application dependencies (Postgres and Redis), all running in containers for easy development work (and that also requires some real data, hence the import data script). Right now the barrier to entry to doing dev work on IRRd is quite high because I need to basically deploy a new virtual machine and do a full OS install, then install Postgres and Redis, then I can build IRRd, then config IRR DB sources and wait for the data import. What I have tried to achieve with this PR is to dockerise IRRd for dev work. You comments make me think you want to dockerise it for production operation. That's fine but IMO it's a different process. I see getting IRRd into docker for dev work as step 1, and getting it into docker for deployment as step 2. Just my two pence; internally we create Dockerfile's and docker-compose files for all apps:
Update: I see there is another Docker PR open. That PR pulls the latest "release" of IRRd and dockerises that. This PR I have raised uses the local codebase. These are different approaches, my is aimed at dev work, that other PR is aimed at running in production. This is further to my point, I would split the two things up because they are not the same. Update 2: I forgot to mention what's changed in the latest version of the PR, apart from addressing your concerns:
Pytest is fully passing inside docker:
Sphinx test is fully passing inside docker (there are a bunch of words no in the dictionary which I didn't add, which it complains about though):
|
As discussed, this PR adds an initial docker implementation and documentation.
I don't really know IRRd at all so you might need to rework this somehow but this is working as I had hoped.
Build the container:
Start the containers:
(Wait for initial data import to complete by checking status HTTP endpoint....)
Check data is available via WHOIS and GraphQL:
Run pytest inside docker (everything passes):