-
Notifications
You must be signed in to change notification settings - Fork 45
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
Data Migration Documentation #18
Comments
Should have some good documentation regarding TKLBAM, as from one turnkey system to the same this should be pretty good as long as the databases get dumped and backed up. The issue would be say TKL Odoo v14 to v15. Since that's not yet out I would not worry about that just yet. I have seen in the past that TKL basically more often that not references upstream documentation on upgrades. I had some first hand knowledge a few years ago when I went from one redline version to another with TKLBAM. The restore went as planned however, I had to manually update the database and other parts. I would love to see a nice "easy" upgrade but to be honest it's not that simple to make something like that. That is why it's best when building a TKL appliance, try to follow the upstream install verbatim and configuration. This way it should be pretty easy to do the upgrade following upstream documentation since we followed all the guidelines etc. (So things should be where the documentation says etc) That is my 2c but for the offical response I'll leave that up to @JedMeister 😄 |
I recall posting a fair bit of info re TKLBAM somewhere here recently!? I think that it may have been on our tracker mega-thread! 😄 Or was that in my head? IDK...! ❓ Yeah it'd be awesome to have hooks in place to support TKLBAM upgrades etc. Like you say Ken it's doable; but a little tricky. FWIW currently the only appliance that has that sort of logic currently is Redmine. 👍 on following conventions. Ideally use upstream conventions and/or turnkey conventions. Then people should be able to work out what is going on... |
FWIW: I did some quick reading, Odoo/OpenERP conversions from v7 to v8 is not very straight forward. So I would not put too much thought in making the TKL version with any auto upgrade functionality. As far at TKLBAM just need to make sure anywhere user data gets stored gets backed up, and also any databases that get created are also backed up. You should not need to backup any of the application, but should backup config files for sure as well. I have used TKLBAM to create a "test" server from the production before performing a big upgrade. That way to if the upgrade goes really bad you should be able to get the production server backup and running pretty quickly from a TKLBAM backup. Again just need to make sure that all files and data that the application generations and stores is included. |
We will not try to Move from OpenERP 7 to Odoo 8. Very complicated. There are ways but.. I am only wanting to be sure that "Odoo 8 data" gets updated" (at least via script) if one Pulls an older Odoo 8 Databse into a current build. As we are using Git, the "git base" is a moving target. That Update Process, to my understanding should make the Database have all needed components be updated. My update has gone fine. (about 2 months change) and I had a similar update a few months earlier. Just wanting to be sure some reef doesn't show up. Mainly "personal issue". However, I think one Goal is to get Other Odoo Users to jump over as there are so many advantages to working within the TKL framework. IMHO but more than that. |
(UPDATE to Directory from Database) Also, I believe the files have "hot git" within them so a User may go to them and issue a "Git Pull" which will update the code base pretty directly. Need to do it one directory at a time. Ideally we would have some Webmin Scripts to handle subjects like this. Probably not needed in first release. |
Also. Odoo 8 will likely be a more and more stable base. My read is that many users want to settle on Odoo 8 and not go to 9 as Odoo (company) is trying to commercialize it more. Interesting Statistic here on Odoo. |
@JedMeister Re TKLBAM here are the steps. ... I will post in the TKLBAM issue rather than here. |
@DocCyblade So we need to get These are the instructions for Update after any GIT PULL Process with a working server: ...before any upgrade, always do a backup of your database. Then, do a git pull on every branch, stop your server and start it again with the option -u base in order to update the modules. Reference: OCA/connector-magento#132 I Also have added A doc folder/file and want this in there. Right now the "stop" and "restart" parts are commented out in that it is not working in that mode. Need to understand the process for calling the proper variables. |
Not seeing errors on /bin/bash openerp.init start However, like in our "firstrun inithooks" getting *The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. It seems there are some issues around ownership. /var/logs/openerp-server.log (seems to be owned by openerp:root (root=group) I can run openerp.init with "su - openerp" if everything is set (on manual mod) to openerp:openerp .... even tried: systemctl start openerp-server.service Thoughts? |
Not sure why it works but during first boot I bounced (restarted) first stop apache2, odoo, then PostgreSQL, the. Start them on the reverse order but used systemd commands to do them. That seemed to work. I have a hunch its with the proxy part of Apache. Have not had too much time this weekend. Wife had plans for me. Going to try to catch up all the work you guys have done tonight |
Your script works, one at a time. (script lines below) Stop the servicesecho "Restarting services" Start them backecho "Starting postgres, openerp and apache" |
What is the -u? I must have missed something! |
Agree somehow about Apache, but restarting it by itself ?? Didn't seem to work.the -u is about what to do when the system has "git pulls" run after installation (note above abit w/ reference) |
Can take "apache" out by removing 127.0.0.1 on XML and RPC interfaces in openerp-server.conf then opening port http: 8069 (which Apache otherwise proxies) (not https) |
I think know what you are referring to. We are leaving for a it but I'll take a look when we get back. |
Maybe we can talk over the phone a bit. Might make things a little clearer to know what needs to be done etc. I can call you or Skype or whatever you perfer. |
That would work maybe right now. I just opened up the 127.0.0.1 settings and tried to engage the logs also. Still "Service Unavailable" on https and http:8069 (phone dropped for google reasons) When is best? Now or in a few hours. Was about to go kayak w/ my wife (my turn) |
I've not been able to get any writing to the log file /var/log/openerp-server.log Been in a "dummy build" . Probably should come back with a new build. A few hours from now would be best for me. Does that work? (maybe 9:15 PM) Eastern |
Have you checked the Apache logs? ( Also I'm not sure if this is at all relevant or useful but when I first looked at this appliance (and Odoo in general) I made up a (IMO) more robust init script (see here) which I put in the overlay ( |
@DocCyblade and @JedMeister (I am going to leave Scripting to the two of you if I can. I will say though that the start of the openerp.init came from Carlos (who I have been having a hard time contacting recently). It should work which should work came from his root Git which is here. |
My Old Openerp7 Notes are here on starting the server: Start File is Created with the following in: to invoke it I have to use (/bin/bash) below:su - openerp (start file - basically a bunch of variables that get pulled in |
I'll be available in few hours. Have fun |
Perfect. We can ping here. Just out the door. |
So looking at service script that allows odoo to act as a service. (https://github.com/l-arnold/tkl-nomadic-odoo/blob/kens-dev-wip1/overlay/opt/openerp/openerp.init) there is no -u option. Looking at the documentation I found the -u for odoo.py file (https://www.odoo.com/documentation/8.0/reference/cmdline.html) |
I need to head to bed, will be very early morning for me. What time (yours) would be best for us to have a conversation. Thanks |
I'm guessing that is the Odoo inc version og Odoo.py. (not the one we have buy do not use, I think, in our Firstboot Inithooks) Good find! |
I'm back just now. Prob any time before 8:30 am (MST) my time 10:30 EST. I will do some tests around odoo.py. Sleep well and thank you! |
Do you mean execute/run a py file? You can also launch via python: |
I'll be home by 2:15 your time and should be available until 7pm your time. Regarding the data migration, we could write a helper script that would stop odoo, then interactively select a database then in turn call the scripts to do the upgrade (-u) I think however I don't think this has to be in the first release. I propose the first release should contain base install. Try to keep it simple. Remove anything that may not be needed. Future releases could contain better startup screens to maybe even select what plug ins and add-ons to be included so we can keep the image small, not everyone will want every part of odoo. Also to keep it smaller, maybe we should remove the .git (this would keep you from doing an update by gitpull but will save space. Again a startup script and maybe a conf console module or screen for added components to odoo would be in order. Just some thoughts. |
Sounds all good. if I can activate a manual update I will be comfortable with what we have. We only have 1 level of git so I don't really think we should take that out.. If we do, we might consider docs to tell people how to put it back in but that is also extra work. Anyway, need to change computers to test a "script" start. We should be able to get it to go. In the process we might be able add the -u command to the update and hae the "openerp-server-man-conf" perhaps activate it. I will test. |
Correcting my earlier comment. We do have "odoo.py" in our firstboot inithooks. It sets the Admin (odoo database creation) password. There is also odoo.PY (capital PY) in Seems to be used "to install Odoo in your environment" but likely more to it than that. *UPDATE |
*BREAK THROUGH I just ran the following and got a running system. I think this means that it "updated" the Database Test. First Started the System systemctl stop apache2.service systemctl start postgresql.service |
The openerp.init file must pass parameters to the script |
Details for this has been added to /docs/(textfile) CAN WE CLOSE the Issue? |
So a closer look at the startup file here (https://github.com/l-arnold/tkl-nomadic-odoo/blob/dev/overlay/opt/openerp/openerp.init#L33) shows a call to start-stop-daemon More info on this command here (http://man7.org/linux/man-pages/man8/start-stop-daemon.8.html) Looks like command parameters are passed, that is why that worked. |
Let me know when you have time for a chat. I am home am should be avail till 7pm your time |
Now works. (I can call). My office phone otherwise would be good: 303-444-2336 |
I'll ring you in about 10 min. |
This Command/Comment is obtuse from a different thread all together on Odoo.com. That said it does have to do with one way to use the (update) parameter -u. Generally these type of paramaters should be able to be applied from the openerp.init (start stop file). (see conf.d/30-main to see openerp.init being initialized in TKLDEV) sudo -u odoo /opt/odoo/odoo-server/openerp-server -d "DB-NAME" -u all --config=/etc/odoo-server.conf https://www.odoo.com/forum/help-1/question/how-to-upgrade-database-v8-0-from-saas-versions-56832 |
Details for running the system can be Pointed to in the Documentation set. Generally an Odoo Subject and TKLBAM is restoring insitu. |
Not sure if some syntax changed in "openerp-server" which was instagated earlier by openerp.init command. However when I try to ** root@dev-wip1 openerp/odoo# /bin/bash openerp-server start -u nomad-dev-wip1-b02 -d nomad-dev-wip1-b02 I did just run this command on an old build with openerp.init as documented here. Basically ran "without errors" (above new system with errors). However, on the old system was not running as it was back when we "closed" this issue. Needed to run: May reopen issue. Need to test to see if we are having failures in the data. Not seeing any just now. |
Perhaps your backup includes stuff from an older build which is overwriting updates that have been done to the Odoo appliance since? I would double check what files are in the backup and use |
This is not really about "TKLBAM". I used ODOO to backup the database on the old system, then Odoo (New Build) to bring that database in. This functionality is quite good. However, related to the thread here from a few weeks ago, I wanted to see if I could apply the "-u" (UPDATE DATABASE) process so that if there were changes in the newer source code, it would bring those changes to the data-structure if need be. My new Odoo has the OpenERP Service existing (I believe now) in the /VAR/RUN/openerp-server.pid and we started addressing the file directly and dropped the "openerp.init" pointer (was it a script? I don't think so). (I will try to test moving the PID File to the original and building a Manual Pointer File to the PID... on the off chance it is looking for other files in the same directory.. Will also look at the old openerp.init but my recollection is that it was just a pointer to the openerp-server (not.pid) file that was in /opt/openerp/ folder. ) All part of the testing/experience building process. Anyway, those errors showed up when running the commands outlined above. Trying to decipher. Somewhat of an obscure quest. Pretty undocumented but I do understand it is important if you bring a database forward into an updated code base. |
Ah ok. Sorry I misunderstood. Re the PID file, it is the init script that calls/uses that. The pid file is just a file that contains the pid (process ID) of the odoo service. The init script uses that to determine whether the server is running or not... We simply moved the init script (which makes the openerp-server run as a daemon) from the /opt/odoo dir to /etc/init.d (which also removed the need to change permissions and create a symlink etc). It should make no difference to the commands you are running. However I imagine (i.e. just guessing) that the service should NOT be running when you are using the process but I don't know enough about it to be sure... |
A litle bit of "who's on first". The main thing is the system is running. I will play around and try to get a functional "backend.init" capability somehow. There seems to be quite a bit which can be set. Most of which is in the openerp-server.conf file. I have not found the abiltiy to "update" the database is all. Could be a big issue if someone runs a Git Pull 6 months later though I expect the Branch to get generally stable. (at least my hope).. My experience with Joomla and Magento tells me that updating TKL Apps in place is worth the effort so wanting to make sure that works here is also the goal. |
This is a good outline of the "elements" we want to make sure we have and which we have control of. Here it is outlining what needs to be in place for the Magento Connector to be working properly (should be outlined separately). Irrespective of that, it talks abut how to CONTROL Odoo and have proper Init etc. OCA/connector-magento#148 (comment) Well thank you very much for your support, the jobrunner is working like a charm now! For everyone who does not directly understand the howto, here are the steps that it took me to migrate to the jobrunner:
and change the start-stop-daemon to:
|
We must have updated something in the system control. I just updated all the GIT and wanted to be sure did the same with the Database Structure in Odoo. Above my comment was that we could run: systemctl start postgresql.service However, when I do this I get an Stop EXIT In the second to last line: I may be howling at the moon but it seems there should be a "check up" on the dAtabase. Its been several months and there were several changes in code via the GIT. I realize this is partially an Odoo issue. It is also a question of how we control the Opeerp-Server SERVICE on TKL. Any thoughts on this? |
I'm not sure what version you are using but v14.1 of the TurnKey appliance changed things a little to make it more reliable. Whilst in theory The Also using /bin/bash to execute files is another bad habit IMO. IMO if a file should be executed then it should have the execute bit set (i.e.
or
So to update system (do git pulls here then) instead of (replace "test" with the name of your database) Finally Restart Server for good measure. |
focusing on the "-u all -d" commands to be sure that Databases are properly upgraded when imported.
I would expect Odoo does this by default in database manager, but need to confirm
Have some other references to this but just lost track of them and need to refind (were on first version of this post that was lost)
The text was updated successfully, but these errors were encountered: