WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
254 stars 203 forks source link

Make repo installable from offline media #4478

Open dhruvkb opened 5 months ago

dhruvkb commented 5 months ago

Description

Openverse should be easy to install from offline media like a flash drive. This will make it extremely easy to set up Openverse for contributors by carrying the repository on a flash drive to various coding events. This requires multiple things:

The repo should be copyable onto a flash drive that can support multiple Unix-like operating systems (with support for file system permissions etc.).

We should have just recipes to

We should have commands and just recipes to ensure that the repo can be cleaned of all untracked files like environment variables and secrets.

Additional context

This issue was identified at contributor day.

sarayourfriend commented 5 months ago

@dhruvkb did y'all get to try https://github.com/WordPress/openverse/issues/4329, by chance? That seems more reasonable than plugging USB flash drives into people's computers at events. Some companies won't allow people to do that anyway (could run into issues with contributors working on laptops supplied by an enterprise company).

I guess this is also solving the problem of needing to download docker images (the base, and then build)? Is that the main one, rather than the git repo?

dhruvkb commented 5 months ago

Yes, we did, and while it was faster than a full download, it was still prone to errors and failures. This is anecdotal, but for the contributor at our table, the repo download failed several times and they had to go plug into a wired connection.

The other concern is Docker images. Even if the repo can be cloned quite fast, the development environment requires many, quite large Docker images to also be downloaded. From the same anecdote, the contributor came back with the cloned repo and we sent him back to also run ov just build, which he did, and came back, and we ran ov just up only to realise that the images for ES, Redis, PostgreSQL etc. were missing.

While some companies will reasonably recommend not plugging USB drives from random people, we should not discount contributors who are bringing their personal laptops to events. They would likely be quite pleased with a disk that can provide the repo and all supporting Docker images with a single recipe to set everything up for them without Internet.

sarayourfriend commented 5 months ago

Yep, makes sense! So long as whatever solution we use is easy to maintain, it sounds worthwhile.