Signed-off-by: Jessica Frazelle <acidburn@docker.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,78 @@ |
| 0 |
+# Apt & Yum Repository Maintenance |
|
| 1 |
+## A maintainer's guide to managing Docker's package repos |
|
| 2 |
+ |
|
| 3 |
+### How to clean up old experimental debs and rpms |
|
| 4 |
+ |
|
| 5 |
+We release debs and rpms for experimental nightly, so these can build up. |
|
| 6 |
+To remove old experimental debs and rpms, and _ONLY_ keep the latest, follow the |
|
| 7 |
+steps below. |
|
| 8 |
+ |
|
| 9 |
+1. Checkout docker master |
|
| 10 |
+ |
|
| 11 |
+2. Run clean scripts |
|
| 12 |
+ |
|
| 13 |
+```bash |
|
| 14 |
+docker build --rm --force-rm -t docker-dev:master . |
|
| 15 |
+docker run --rm -it --privileged \ |
|
| 16 |
+ -v /path/to/your/repos/dir:/volumes/repos \ |
|
| 17 |
+ -v $HOME/.gnupg:/root/.gnupg \ |
|
| 18 |
+ -e DOCKER_RELEASE_DIR=/volumes/repos \ |
|
| 19 |
+ docker-dev:master hack/make.sh clean-apt-repo clean-yum-repo |
|
| 20 |
+``` |
|
| 21 |
+ |
|
| 22 |
+3. Re-sign the repo with your gpg key |
|
| 23 |
+ |
|
| 24 |
+```bash |
|
| 25 |
+./hack/make/sign-repos |
|
| 26 |
+``` |
|
| 27 |
+ |
|
| 28 |
+4. Upload the changed repos to `s3` (if you host on s3) |
|
| 29 |
+ |
|
| 30 |
+5. Purge the cache, PURGE the cache, PURGE THE CACHE! |
|
| 31 |
+ |
|
| 32 |
+### How to get out of a sticky situation |
|
| 33 |
+ |
|
| 34 |
+Sh\*t happens. We know. Below are steps to get out of any "hash-sum mismatch" or |
|
| 35 |
+"gpg sig error" or the likes error that might happen to the apt repo. |
|
| 36 |
+ |
|
| 37 |
+**NOTE:** These are apt repo specific, have had no experimence with anything similar |
|
| 38 |
+happening to the yum repo in the past so you can rest easy. |
|
| 39 |
+ |
|
| 40 |
+For each step listed below, move on to the next if the previous didn't work. |
|
| 41 |
+Otherwise CELEBRATE! |
|
| 42 |
+ |
|
| 43 |
+1. Purge the cache. |
|
| 44 |
+ |
|
| 45 |
+2. Did you remember to sign the debs after releasing? |
|
| 46 |
+ |
|
| 47 |
+Re-sign the repo with your gpg key: |
|
| 48 |
+ |
|
| 49 |
+```bash |
|
| 50 |
+./hack/make/sign-repos |
|
| 51 |
+``` |
|
| 52 |
+ |
|
| 53 |
+Upload the changed repo to `s3` (if that is where you host) |
|
| 54 |
+ |
|
| 55 |
+PURGE THE CACHE. |
|
| 56 |
+ |
|
| 57 |
+3. Run Jess' magical, save all, only in case of extreme emergencies, "you are |
|
| 58 |
+going to have to break this glass to get it" script. |
|
| 59 |
+ |
|
| 60 |
+```bash |
|
| 61 |
+docker build --rm --force-rm -t docker-dev:master . |
|
| 62 |
+docker run --rm -it --privileged \ |
|
| 63 |
+ -v /path/to/your/repos/dir:/volumes/repos \ |
|
| 64 |
+ -v $HOME/.gnupg:/root/.gnupg \ |
|
| 65 |
+ -e DOCKER_RELEASE_DIR=/volumes/repos \ |
|
| 66 |
+ docker-dev:master hack/make.sh update-apt-repo |
|
| 67 |
+``` |
|
| 68 |
+ |
|
| 69 |
+Re-sign the repo with your gpg key: |
|
| 70 |
+ |
|
| 71 |
+```bash |
|
| 72 |
+./hack/make/sign-repos |
|
| 73 |
+``` |
|
| 74 |
+ |
|
| 75 |
+Upload the changed repo to `s3` (if that is where you host) |
|
| 76 |
+ |
|
| 77 |
+PURGE THE CACHE. |