From f486d45817ce72bfc500f9a1ef0fb098aae41dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Maldonado?= <amaldona@etu.utc.fr> Date: Sun, 5 Apr 2020 20:10:02 +0200 Subject: [PATCH] [meta-registry-test] Update README.md, update .gitignore... ... and add example 'htpasswd' file --- .gitignore | 1 + meta-registry-test/README.md | 21 ++++++++++++++++++++- meta-registry-test/secrets/htpasswd.example | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 meta-registry-test/secrets/htpasswd.example diff --git a/.gitignore b/.gitignore index 4693d543..4e14516d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ # Avoid committing real secrets! *.secrets +htpasswd diff --git a/meta-registry-test/README.md b/meta-registry-test/README.md index 311a6090..c7e86f02 100644 --- a/meta-registry-test/README.md +++ b/meta-registry-test/README.md @@ -6,6 +6,25 @@ ### First time +_This guide assumes that a (manually deployed) registry is already running in `pica01-test`_ + 1. Generate a password in [picapass](https://gitlab.utc.fr/picasoft/interne/pass/) 2. Generate a new `htpasswd` file with `htpasswd -Bn <username>`. This will prompt you for the password and will display results on stdout -3. In the target VM, create `./secrets/htpasswd` and paste there the output of the previous command +3. In `pica01-test`, create `/DATA/docker/dockerfiles/meta-registry-test/secrets/htpasswd` and paste there the output of the previous command. Make sure permissions are correct (`660`). + +### Updating this image + +Update: Same as in general [README.md](/README.md) (don't forget to increase the version number in `docker-compose.yml`). The CI will build an image and deploy it to the old test registry. +Deploy: not the same !! + +### Deploy updates + +**Do not use `docker_test.sh` or `docker_prod.sh` to deploy this`.** Deploy manually: + +1. `cd /DATA/docker/dockerfiles/ && git pull` +2. Pull the new image from the old registry (E.g. `docker pull registry.test.picasoft.net/meta-registry-test:0.1`) +3. `cd /DATA/docker/dockerfiles/meta-registry-test/ && docker-compose up -d` + +### Notes + +`./secrets/htpasswd.example` contains an example file generated by `htpasswd` for user `picauser` and password `picapassword`. diff --git a/meta-registry-test/secrets/htpasswd.example b/meta-registry-test/secrets/htpasswd.example new file mode 100644 index 00000000..d0267063 --- /dev/null +++ b/meta-registry-test/secrets/htpasswd.example @@ -0,0 +1 @@ +picauser:$2y$05$axvpLiYg.ADRa2I8xAU/weLb7urnUIgoehsQuKut1/dlIhDOQ.iPy -- GitLab