-
-
Notifications
You must be signed in to change notification settings - Fork 103
[docs] Document non-edge installation using Docker Compose #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Maybe there should also be documentation on how to upgrade using the Docker Compose method, either in this PR or in a new one. Let me know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @c-gabri.
I invite you to come to the Development Channel on Matrix to coordinate with other contributors.
git checkout <release> | ||
and set ``TAG=<version>`` in the ``Makefile``. For ``git checkout`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we suggesting to modify the makefile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes? Otherwise running make start
as the documentation suggests would still pull edge
images if I understand correctly. But ideally each github release would have the correct TAG
already set in the Makefile
?
Not knowing this I had initially installed edge
and had problems later when wanting to switch to latest
.
and set ``TAG=<version>`` in the ``Makefile``. For ``git checkout`` | ||
you'll need to specify the exact release number (``latest`` won't | ||
work). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the docs, this can be passed as argument:
https://openwisp.io/docs/24.11/docker/developer/instructions.html#makefile-options
Ideally we want to avoid users messing with the source code as it complicates future upgrades.
I also think we need to simplify these additions and provide a real-world example or else we risk complicating the quick start guide.
Eg:
If you want to use a release different than ``edge``, you can pass the
``TAG`` argument to ``make start``, e.g.:
.. code-block:: bash
make start TAG=24.11
Disclaimer: I haven't tried this yet (forgive me, I am reviewing many PRs per day and I am trying to reply to as most contributors as possible), please try this if you can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm testing latest
deployment with
git checkout $(git tag | tail -n 1)
make TAG=latest start
assuming the latest release will always be the last one in alphabetical order.
It works but to be honest I'm not convinced at all that we should suggest this: users could easily forget setting the TAG
in a future start, accidentally pulling edge
images and potentially messing up their installation.
Why do you think local edits to Makefile
variables are so bad? Isn't it the same as editing .env
? You mention future upgrades, but upgrades without the auto install script are not even documented.
I would either
- suggest users to edit the
Makefile
appropriately - even better,
TAG
should be already set to the correct value for each release (andSKIP_PULL
totrue
: when you start a program you usually don't want to update it) - alternatively, we should not tell users to use
make
for starting/stopping at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually the start operations are set in scripts which start the containers at boot, isn't it?
Therefore users should set the tag in their boot scripts.
In the end everyone can do it in a different way if they wish but the files that are under version control are not meant to be modified by users.
If upgrading is not mentioned we can fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't use any boot scripts for OpenWISP and I don't see why anybody would: since all services in docker-compose.yml
are set to restart: always
everything starts automatically at boot. But sometimes you're going to have to stop/start manually for maintenance and, if you do it months after deployment, you'll definitely forget to set TAG
or SKIP_PULL
.
What about the idea of us setting the correct TAG
for each release (and SKIP_PULL = true
), so users can just do a git checkout
to the desired release simply use make start
/stop
without worrying about anything? It would also simplify upgrades no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No one forbids users to write their own docker-compose.yml
as they need right?, in the same way we do with ansible playbooks, we provide some defaults, a set of images, users can remix everything to get what they need.
What about the idea of us setting the correct TAG for each release (and SKIP_PULL = true), so users can just do a git checkout to the desired release simply use make start/stop without worrying about anything? It would also simplify upgrades no?
I don't understand what this means in practice.
purposes, please use ``make stop``. | ||
|
||
If you don't want to pull new images each time you run ``make start``, set | ||
``SKIP_PULL ?= true`` in the ``Makefile``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I believe this can be passed as an argument so rather than advising to edit the Makefile we can adivse to use the argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an alternative to using make start
/stop
and passing parameters, do you think we should just instruct users to use docker compose up -d
/stop
instead so the Makefile is not involved at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not change the structure of this document too much now.
Checklist
Reference to Existing Issue
Closes #516.
Description of Changes
Add documentation for installing any release (not just
edge
) with the Docker Compose method.