mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2025-12-08 14:54:28 +00:00
podman containerfile documn - online edit of handbook/troggle/troglaptop.html
This commit is contained in:
@@ -108,15 +108,17 @@ which you can read without installing by looking in:<br>
|
||||
<p>We have two configurations for the virtual environment: 'dev' which uses the latest python and Django for speed, and 'server' which mimics the versions currently running on the server. [In December 2024 Django is 5 releases ahead of the version on the server (5.1 versus 3.2). Each has a list of ancilliary packages with the appropriate versions in dev.toml and server.toml.] <var>venv-trog.sh</var> deals with all this python-specific stuff, libraries and Django plug-ins.
|
||||
|
||||
<p><var>os-trog.sh</var> takes a few minutes: it installs the subset of /expofiles/ you need to work with troggle. If you now want to install survex, therion etc. then run <var>os-survey.sh</var>, and go away for an hour, as these drag in a huge number of dependencies and installs all of /expofiles/ except the photos and Martin's mapapp.
|
||||
<p>(Note that <var>uv</var> now makes everything much simpler than when were were using <var>pip</var>).
|
||||
|
||||
<h3>Why no Docker container?</h3>
|
||||
<p>Yes, it is true that this would greatly speed up on-boarding new programmers. Or <a href="https://podman.io/">podman</a>.
|
||||
<p>Yes, it is true that this would greatly speed up on-boarding new programmers. We have a Docker-compatible <a href="https://podman.io/">podman container</a> in development (see <a href="/repositories/troggle/.git/tree/Containerfile">Container build file</a>) but this needs further work to remove live passwords from the built Container. This will currently build a Container (~6Gb) from a pre-existing fully-installed Troggle machine.
|
||||
<p>But there is the significant danger that containers would get copied around and deployed without being properly cleaned up:
|
||||
resulting in configuration drift and a <a href="https://martinfowler.com/bliki/SnowflakeServer.html">snowflake server situation</a>.
|
||||
File permissions are a big issue.
|
||||
<p>We should do both: create a Docker or Podman system for getting started, then transition programmers to script-based or recipe-based
|
||||
provisioning so that systems are rebuilt cleanly. <a href="http://www.cuyc.org.uk">CUYC</a> (who also use Django) have a bash script which sets up a new django
|
||||
development system. We should copy that in the first instance. Alas, we haven't got around to doing any of this yet. However <var>uv</var> now makes everything much, much simpler than when were were using <var>pip</var>.
|
||||
<p>We should eventually have both a Container, for getting started quickly, and a separate recipe-based
|
||||
build system so that systems are rebuilt cleanly from the basics, to avoid the <a href="https://martinfowler.com/bliki/SnowflakeServer.html">snowflake issue</a>. <a href="http://www.cuyc.org.uk">CUYC</a> (who also use Django) have a bash script which sets up a new django
|
||||
development system and we have something similar, but it is fragile. A recipe-based build system instead of a string of commands would be better, e.g. <a href="https://en.wikipedia.org/wiki/List_of_build_automation_software">Qbs</a>.
|
||||
|
||||
|
||||
<h2 id="git">Configuring ubuntu</h2>
|
||||
<p>Set up the key-exchange first. You need to be able to ssh into the server to run this next bit.
|
||||
|
||||
Reference in New Issue
Block a user