-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Easier installation and upgrade process #1123
Comments
JC5, +1 for a more automated upgrade process :) I"ve been stuck to 4.6.10 just because I can't find the time to test everything after upgrade. From the other web tools I host on my personnal server, I've seen that most often, upgrading the codebase through a web updated requires the www-data user to have stronger than usual access rights to the webroot directory. My other concern is about changes in configuration. One reason i'm staying on a 3 months-old version is that I know there are new and interresting features in a newer one that require new configurations for my automated import process. Particulary the .json files. It would be great if the changelog or the documentation contained what I need to change. Regards, Olivier |
A quick reply from my phone. I agree. A code based full upgrade will never happen. At best, update the code yourself and FF3 will do migrations etc. In light of the development of Docker and similar tools this would be madness to build. Also insecure. Als for your upgrade. No great backwards incompatible changes as far as I know. Running of rules and matching of bills need a config entry but without them nothing changes. The only incompatible change I recall are possible migrations you should be able to run easily. Json config has one important change: “match_rules” became “match-rules”. Same for the bills related command. Firefly III is growing up so a more professional and reliable change log is certainly necessary. 👍 |
For my setup, I'd love some way to auto update my instance. It's currently kind of a huge deal. The easiest way I found was the github way - but thats something one could automate. Why not build a backend way to do just this? I'd use curl to get the latest release from github, then remove vendors and stuff like this, then use a downloaded composer.phar to execute the vendor update and execute the needed migrations and checks. The entire step could be done in a subfolder which will only replace the current release if everything went well. Also, a database backup should be performed before the update. The entire process CAN be automated as long as there are enough checkups before, like:
There should be some sort of update script in the repo which allows to throw in needed update steps before composer install, before migrations and after migrations. Here is a possible workflow for the tool:
The only problem I see there is to get a checksum for the downloaded release. But this could realized with some sort of release signing. What do you think about this approach? |
Some thoughts on the checksum stuff: If @JC5 considers this updating process an option (there could be warnings like "be careful!" (or more drastic warning labels)), we'd need to develop a backend tool first, which will generate the checksum stuff. I'd suggest a heroku node which gets triggered by github with a new release. The tool should then clone the repo and download the additional github releases (zip and tarball). Unpack everything, check if the files do exactly match, create a checksum for both releases, add a signed version of both hashes (signed using This way, there would be hashes which could be verified using a public key (Which could be hardcoded in the update tool), a validated way to ensure the downloaded version is intact and everyone might be happy. :-) Of course don't update if
If you like the idea, I could build a tool for this, starting with the checksum generation tool. |
Except for some checks isn't this easily solvable when running a Docker instance? I have to admit I feel this is a bit much for an automated upgrade. |
Sorry, I don't know much about Docker yet. Just began looking into it, but maybe it is. But apart from docker, I think that upgrades need to run in as much other environments as possible. I do currently run Firefly on a vserver, so it's kind of a shared hosting environment. I can't make a git pull there because git is not available via ssh. A lot of people will be running Firefly on things outside of docker... Also, I guess that Firefly has great potential for non-techies who are looking for a good budgeting solution. They probably won't look into docker... ;-) |
Haha yes you're right of course. Not everybody uses Docker. I don't even use Docker. But I'm not going to go "full Wordpress" with this, if you know what I mean. A web-based upgrade is necessary because hosting services like Sandstorm won't give users access to the command line. And they'll want to upgrade as well. But the "upgrade" will be limited to database migrations, and possibly some new seeds. If the user can get the code in the right place, FF3 should be able to do the rest. |
:D Yes, I know what you mean. I would love to find a way to have FF3 getting the code in the right place, but I see your concerns. My idea was to have one click and have all cli commands handled by PHP ( As I said, on my hosting a I may end up writing a bash script that downloads the latest release via wget, unzips it, replaces .env and the uploads and then deletes the old release. That's if I find a way to run a composer update after that... I'd still prefer the one click solution in the backend. ;-) |
If you are interested, I've automated upgrading Firefly using Ansible. Here is my playbook which I execute from my laptop with
Drawbacks:
I belive, it requires python 2 on the server (to run Ansible) and composer available in $PATH (but that probably could be avoided by using command module instead of composer module). |
EDIT: Forget that. But I still am in favor of automating the download. ;-) |
I think that most users of virtual hosting (including me) will have enough of this update algorithm:
Similarly, with the new FireFly installation for virtual hosting: copy the files, create the database (manually), and run the script that prepares the database and all that. I think it will not be difficult for you to implement such an algorithm. And for many users it will be very useful. It's even possible that FireFly will become more popular :) |
At least for me updates are already pretty simple. I switched to using the git repository as it allows simply updating with a |
For the next release, and the ones afterwards, Firefly III will verify if the database is up to date and upgrade as necessary. This is also the case for new installations. This means that once you set up the This applies to upgrades as well. For as far as making the installation + upgrade simpler, this is about as simple as it gets. |
See also https://github.com/monicahq/monica
One command:
firefly:install
, that will call migrations, seeds, and data upgrades. Will also ask for the first registration and setting "allow other registrations yes/no". Will link to website/GitHub for common issues (Docker).Perhaps this can also be done webbased.
When upgrading, an update of the code base should be enough. First visit to FF3 (must be admin) will trigger upgrade command. Verifies by comparing the version in config.php to a new FF3 configuration item ( "db_version"). Simply calls
firefly:upgrade
and various other commands, then updates config var and proceeds.The text was updated successfully, but these errors were encountered: