<div dir="ltr">Hello Blake,<div>docker image was build from Fridays clone of docker git.</div><div>with command</div><div>docker build . --add-host public.localhost:127.0.1.2 --add-host public:127.0.1.2 --add-host private.localhost:127.0.1.3 --add-host private:127.0.1.3 --no-cache<br></div><div><br></div><div>Configuration file is attached,</div><div><br></div><div>Failure is then reported almost at end of startup</div><div><br></div><div>docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -h <a href="http://app.evergreen.com">app.evergreen.com</a> 65d123dbd2ed<br></div><div><br></div><div>in task Run autogen.</div><div><br></div><div>Error is also attached. </div><div><br></div><div>Many thanks for your check and all hints</div><div><br></div><div>Vaclav</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 13, 2023 at 4:19 AM Blake Henderson <<a href="mailto:blake@mobiusconsortium.org">blake@mobiusconsortium.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Vaclav,<div dir="auto"><br></div><div dir="auto">Which command did you use to produce that error?</div><div dir="auto"><br></div><div dir="auto">-Blake-</div><div dir="auto">MOBIUS</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 11, 2023, 1:42 PM Vaclav Jansa via Evergreen-general <<a href="mailto:evergreen-general@list.evergreen-ils.org" target="_blank">evergreen-general@list.evergreen-ils.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello Blake and Jane,<div>thanks for all the magic.</div><div><br></div><div>We still try to solve multiple problems with localization. So image with enabled i18n will be better for us and our testing.</div><div><br></div><div>Unfortunately our builded image does not start correctly / it reports some access issue</div><div><br></div><div><pre><div style="color:rgb(236,239,241);background-color:rgba(0,0,0,0);font-family:Consolas,monospace-fallback,"monospace";font-size:14px"><div><span style="color:rgb(214,35,65)">fatal: [127.0.0.1]: FAILED! => {</span> </div><div><span style="color:rgb(214,35,65)"> "changed": true,</span> </div><div><span style="color:rgb(214,35,65)"> "cmd": "export PATH=$PATH:/openils/bin && /openils/bin/autogen.sh -u",</span> </div><div><span style="color:rgb(214,35,65)"> "delta": "0:00:00.005884",</span> </div><div><span style="color:rgb(214,35,65)"> "end": "2023-08-11 14:29:36.772621",</span> </div><div><span style="color:rgb(214,35,65)"> "invocation": {</span> </div><div><span style="color:rgb(214,35,65)"> "module_args": {</span> </div><div><span style="color:rgb(214,35,65)"> "_raw_params": "export PATH=$PATH:/openils/bin && /openils/bin/autogen.sh -u",</span> </div><div><span style="color:rgb(214,35,65)"> "_uses_shell": true,</span> </div><div><span style="color:rgb(214,35,65)"> "argv": null,</span> </div><div><span style="color:rgb(214,35,65)"> "chdir": null,</span> </div><div><span style="color:rgb(214,35,65)"> "creates": null,</span> </div><div><span style="color:rgb(214,35,65)"> "executable": null,</span> </div><div><span style="color:rgb(214,35,65)"> "removes": null,</span> </div><div><span style="color:rgb(214,35,65)"> "stdin": null,</span> </div><div><span style="color:rgb(214,35,65)"> "stdin_add_newline": true,</span> </div><div><span style="color:rgb(214,35,65)"> "strip_empty_ends": true,</span> </div><div><span style="color:rgb(214,35,65)"> "warn": true</span> </div><div><span style="color:rgb(214,35,65)"> }</span> </div><div><span style="color:rgb(214,35,65)"> },</span> </div><div><span style="color:rgb(214,35,65)"> "msg": "non-zero return code",</span> </div><div><span style="color:rgb(214,35,65)"> "rc": 1,</span> </div><div><span style="color:rgb(214,35,65)"> "start": "2023-08-11 14:29:36.766737",</span> </div><div><span style="color:rgb(214,35,65)"> "stderr": "mkdir: cannot create directory ‘/openils/var/web/opac/extras/ac’: Permission denied",</span> </div><div><span style="color:rgb(214,35,65)"> "stderr_lines": [</span> </div><div><span style="color:rgb(214,35,65)"> "mkdir: cannot create directory ‘/openils/var/web/opac/extras/ac’: Permission denied"</span> </div><div><span style="color:rgb(214,35,65)"> ],</span> </div><div><span style="color:rgb(214,35,65)"> "stdout": "Unable to write to /openils/var/web/opac/common/js, please check\nUnable to write to /openils/var/web/js/dojo/fieldmapper, please check\nUnable to write to /openils/var/web/opac/extras/slimpac, please check",</span> </div><div><span style="color:rgb(214,35,65)"> "stdout_lines": [</span> </div><div><span style="color:rgb(214,35,65)"> "Unable to write to /openils/var/web/opac/common/js, please check",</span> </div><div><span style="color:rgb(214,35,65)"> "Unable to write to /openils/var/web/js/dojo/fieldmapper, please check",</span> </div><div><span style="color:rgb(214,35,65)"> "Unable to write to /openils/var/web/opac/extras/slimpac, please check"</span> </div><div><br></div></div></pre></div><div>I will try it one more time from build. But maybe you meet already this issue.</div><div><br></div><div>I use for build kvm virtual machine with Ubuntu LTS 22.04 and actual <a href="http://docker.io" rel="noreferrer" target="_blank">docker.io</a>. everything is running under user added in docker group.</div><div><br></div><div>Many thanks for all your inputs</div><div><br></div><div>Vaclav </div><div><br></div><div>(a guy which build docker images for Linda's dinner)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 11, 2023 at 4:32 PM Blake Graham-Henderson via Evergreen-general <<a href="mailto:evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">evergreen-general@list.evergreen-ils.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Linda,<br>
<br>
The images that we've posted to dockerhub were not built with i18n
turned on. That switch needs to have been set to "yes" during the
build process. Which means, you'll probably want to build your own
docker image instead of using the pre-made images.<br>
<br>
Repo: <a href="https://github.com/mcoia/eg-docker" rel="noreferrer" target="_blank">https://github.com/mcoia/eg-docker</a><br>
<br>
Building your own image is done like this:<br>
<br>
1. Clone the git repository that does the work:<br>
<br>
git clone <a href="https://github.com/mcoia/eg-docker.git" rel="noreferrer" target="_blank">https://github.com/mcoia/eg-docker.git</a><br>
<br>
2. Customize the vars.yml to suit your needs<br>
<br>
cd eg-docker/generic-dockerhub<br>
vi vars.yml<br>
<br>
The main two variables are:<br>
ubuntu_version: focal<br>
evergreen_version: 3.9.1<br>
<br>
I'd change evergreen_version to: 3.11.1<br>
<br>
You're also interested in this setting:<br>
add_evergreen_language_support: no<br>
<br>
If you change that setting to "yes" - it will cause the build to
edit the eg_vhost.conf file during the build.<br>
<br>
But* if you already have an eg_vhost.conf file that you would like
to use, then leave that setting "no" and copy your eg_vhost.conf
file directly into the generic-dockerhub folder.<br>
<br>
You'll need to make one more change in order to incorporate your
eg_vhost.conf:<br>
<br>
# edit Dockerfile<br>
vi Dockerfile<br>
<br>
Add this line:<br>
ADD eg_vhost.conf /egconfigs/eg_vhost.conf<br>
<br>
Put that line right above this line:<br>
RUN cd /egconfigs && ansible-playbook install_evergreen.yml
-v -e "hosts=127.0.0.1"<br>
<br>
so it should look like this:<br>
<br>
.....<br>
ADD vars.yml /egconfigs/vars.yml<br>
ADD install_evergreen.yml /egconfigs/install_evergreen.yml<br>
ADD evergreen_restart_services.yml
/egconfigs/evergreen_restart_services.yml<br>
ADD restart_post_boot.yml /egconfigs/restart_post_boot.yml<br>
ADD eg_vhost.conf /egconfigs/eg_vhost.conf<br>
RUN cd /egconfigs && ansible-playbook install_evergreen.yml
-v -e "hosts=127.0.0.1"<br>
ENTRYPOINT cd /egconfigs && ansible-playbook
evergreen_restart_services.yml -vvvv -e "hosts=127.0.0.1" &&
while true; do sleep 1; done<br>
#ENTRYPOINT while true; do sleep 1; done<br>
<br>
<br>
Now, you're ready to build your own docker image. Like this:<br>
<br>
docker build \<br>
--add-host public.localhost:127.0.1.2 \<br>
--add-host public:127.0.1.2 \<br>
--add-host private.localhost:127.0.1.3 \<br>
--add-host private:127.0.1.3 \<br>
. --no-cache<br>
<br>
You do need to be in the generic-dockerhub folder when you run that
command<br>
<br>
It will take about 15 minutes to complete. Once completed, Docker
will report the sha hash of the image that you just built. You can
see it with this command:<br>
<br>
docker images<br>
<br>
Now that you have your own image. You can start an Evergreen server
from it. Like this:<br>
<br>
<pre><code>docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -h <a href="http://app.evergreen.com" rel="noreferrer" target="_blank">app.evergreen.com</a> <your_new_image_sha_hash>
Watch it boot up, and make sure it finishes. You will know that it finishes when you see the "PLAY RECAP" line, and there should be 0 fails.
You can safely disconnect from the container leaving it running using the magic key combination: ctrl+pq (NOT ctrl+c, that will kill it)
</code>
Now that I've said all of that, and you're going to supply your own eg_vhost.conf file, it might be faster to use the pre-built image from dockerhub, boot it up,
then replace the eg_vhost.conf file located in the container, and restart apache2.
So that would look like this:
1. Start docker with the community container:
<code>docker run -it -p 80:80 -p 443:443 -p 210:210 -p 6001:6001 -p 32:22 -p 5433:5432 -h <a href="http://app.evergreen.com" rel="noreferrer" target="_blank">app.evergreen.com</a> mobiusoffice/evergreen-ils:latest</code>
2. Wait for it to finish starting (look for that PLAY RECAP line, and confirm "0 fail"). Press ctrl+pq.
3. SSH into the container
ssh -p 32 user@localhost
the password is "password"
3a. Alternatively, you can attach to the container using "docker exec"
docker exec -it `docker ps -q` bash
4. Once you're on the shell of the container, you need to make your edits to:
/etc/apache2/eg_vhost.conf
note: vi is not installed in the container, you might have to install vi:
apt-get update && apt-get install -y vim
vi /etc/apache2/eg_vhost.conf
(make changes)
Save the file
5. Restart apache
/etc/init.d/apache2 restart
That should do it!
Good luck. Feel free to ask questions!
</pre>
<pre cols="72">-Blake-
Conducting Magic
Will consume any data format
MOBIUS</pre>
<div>On 8/11/2023 8:17 AM, Jane Sandberg via
Evergreen-general wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">That is very mysterious!
<div><br>
</div>
<div>These steps worked for me to add the 950 db seed in
French within a docker container:</div>
<div><br>
</div>
<div>
<div>docker exec -it [container_name] bash</div>
<div>cd /home/opensrf/repos/Evergreen</div>
<div>make -f Open-ILS/src/extras/Makefile.install
ubuntu-focal-translator</div>
<div>su opensrf</div>
<div>cd build/i18n</div>
<div>mkdir locale</div>
<div>make newpot</div>
<div>make LOCALE=fr-CA updatepo</div>
<div>exit # go back to root user</div>
<div>cd /home/opensrf/repos/Evergreen/build/i18n &&
make LOCALE=fr-CA install</div>
<div>su evergreen</div>
<div>psql -f
Open-ILS/src/sql/Pg/950.data.seed-values-fr-CA.sql</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El vie, 11 ago 2023 a la(s)
05:51, Linda Jansová (<a href="mailto:linda.jansova@gmail.com" rel="noreferrer" target="_blank">linda.jansova@gmail.com</a>)
escribió:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>Thank you very much, Jane!</div>
<div><br>
</div>
<div>We currently use the dev tag (but we may also try some
other non-dev tags as you have suggested :-); actually, it
seems that the language selector in the OPAC correctly
appears after a couple of reloads, then - for a couple of
other reloads - it disappears only to appear again after
some more reloads ;-).</div>
<div><br>
</div>
<div>It definitely works in mysterious ways so far; we would
probably also need to add the 950 db seed with French (and
Czech) translations. Any ideas how to do this correctly?</div>
<p>Linda</p>
<div>On 8/11/23 14:25, Jane Sandberg wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Linda,
<div><br>
</div>
<div>What tag of the Evergreen container are you
using? I believe that the instructions under
"Restarting Evergreen services" are only
applicable to the "dev" tag (i.e. if you ran
`docker run
[...] mobiusoffice/evergreen-ils:dev`). If
you don't specify a tag, it defaults to the
"latest" tag, which doesn't contain the
file-based restart/recompile methods.</div>
<div><br>
</div>
<div>I typically use the non-dev tags, using the
following steps to restart apache.
Theoretically, they should work if you are
using the dev tag too, but I haven't tried
them:</div>
<div><br>
</div>
<div>1. docker ps # this will show the name of
the running container</div>
<div>2. docker exec -it [container_name] bash #
this will provide a shell within the running
container. For example, if step 1 had
mentioned that the running Evergreen container
is named "peaceful_spence", it would be
`docker exec -it peaceful_spence bash`</div>
<div>3. apache2ctl restart # simply restarts
apache. When I need to restart all services, I
use `ansible-playbook
/egconfigs/evergreen_restart_services.yml -e
hosts="127.0.0.1"` instead.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div><br>
</div>
<div> -Jane</div>
</div>
</div>
</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">El vie, 11 ago 2023 a
la(s) 04:28, Linda Jansová via Evergreen-general (<a href="mailto:evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">evergreen-general@list.evergreen-ils.org</a>)
escribió:<br>
</div>
<blockquote class="gmail_quote">
<div>
<p> </p>
Dear all,
<p>We have just started experimenting with a Docker
container (<a href="https://hub.docker.com/r/mobiusoffice/evergreen-ils" rel="noreferrer" target="_blank">https://hub.docker.com/r/mobiusoffice/evergreen-ils</a>),
mainly to see whether it could help us identify
what causes i18n issues reported in a separate
thread (with a subject "Evergreen 3.11.0a not
properly switching into Czech in the staff
client").</p>
<p>At this point we are a bit stuck as we would like
to make appropriate i18n changes to the
eg_vhost.conf file and then make them visible both
in the OPAC and in the staff client.</p>
<p>We have uncommented lines related to French
translation (just to see if it works before we
would make a deep dive into Czech) and restarted
Evergreen as described at <a href="https://hub.docker.com/r/mobiusoffice/evergreen-ils" rel="noreferrer" target="_blank">https://hub.docker.com/r/mobiusoffice/evergreen-ils</a>
(under the heading "Restarting Evergreen
services") but it doesn’t seem to change anything
in the OPAC.</p>
<p>How exactly should we proceed?</p>
<p>(Maybe a more specific piece of documentation
that would answer our question is available
somewhere; in that case, sharing a URL would be
great :-).)</p>
<p>Thank you in advance!</p>
<p>Linda </p>
<p> </p>
</div>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a href="mailto:Evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote>
</div>
</blockquote>
<p><br>
</p>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
Evergreen-general mailing list
<a href="mailto:Evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">Evergreen-general@list.evergreen-ils.org</a>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a href="mailto:Evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote></div>
_______________________________________________<br>
Evergreen-general mailing list<br>
<a href="mailto:Evergreen-general@list.evergreen-ils.org" rel="noreferrer" target="_blank">Evergreen-general@list.evergreen-ils.org</a><br>
<a href="http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general" rel="noreferrer noreferrer" target="_blank">http://list.evergreen-ils.org/cgi-bin/mailman/listinfo/evergreen-general</a><br>
</blockquote></div>
</blockquote></div>