You are here
L. Arnold - Tue, 2014/04/08 - 23:54
I have been drafting a OpenERP App which can be found a the following location.
https://github.com/l-arnold/postgresql---openerp
It is based on the basic way I built my running ap. There are a few "moves" involved wich I am unclear on the scripting of.
- I am assuming I don't use apt-get for some "apt-gets" in (conf.d/main)
- There are several Python Library Pulls (conf.d/main)
- There are some bzr branch pulls (hopefully run after bzr is actually brought in
- There is a New User Declaration for Postgres and also SSH (su - ) (inside conf.d/downloads)
- There is a Start Script Creation (should likely move into a configuration/auto start system soon) that is run under su - (non root)
- In general I feel I need to get my hands around how the sequencing of calls will work in TKLDEV.
- Any and all recomendations / help is appreciated.
In Points of focus, I branched this from PostgreSQL. I added the File "Downloads" in conf.d (as I saw downloads in some other App builds. I have no idea what may call the download file and when sequentially. Moreover I put some "generally sequential script elements" into the file and I expect they should go somewhere else.
I have not actually run anything as I am sure I need to clean this up some.
thanks in advance,
Landis (L. Arnold)
Forum:
FWIW I actually started replying to this ages ago...
And I'm going to assume that you are further along than you were when you started this?!
Regardless, here are some comments on your questions (you may have worked it out but others might be looking for answers...). To be clear though, I am certainly no TKLDev expert...
Packages are generally installed by the plan (requires package name only) rather than apt-get in the conf.d (which it looks like your all over). Exceptions to that might be when you are installing from a non-default repo (i.e. not Debian stable or TKL).
Not sure what you mean by this...
The plan runs first so bzr should be installed fine by the time you start pulling down from version control...
From a brief glance your conf.d/downloads looks fine... (But I didn't look carefully)
I don't know about OpenERP but often software that needs to be run as a service (in Windows speak) can be started with a init script. If OpenERP can do that then I suspect that would be the go... Then you could just put that in the overlay.
AFAIK it's Something like this:
FWIW I'm not sure on the rationale of splitting conf.d into downloads and main, but from what i can see of what Alon and Liraz have done, is downloads is simply that... It downloads what ever files are needed. Then main actually does stuff to them (like unpacking them, moving them, deleting them when done, etc)
Hope that's of some help...
Helpful, thank you.
I will try to parse this even today. A few questions (driftin into statements) still.
Thanks again.
(its difficult to put space between either numbered questions or bullet points w/ this formatting)
Some (more) answer... :)
bzr will be installed into your OpenERP appliance. The appliances are built in a chroot so while TKLDev is building the appliance stuff can be installed (and used) without actually being installed in the TKLDev host. Does that answer your question?
As for the user being able to issue bzr pulls, as bzr is installed in the appliance that shouldn't be an issue. I'm not clear on the purpose of the user being able to issue bzr pulls, is that to update? If you want the OpenERP user to be able to issue commands then you probably want to use the 'su' command from root.
Apache uses a different process as by default it uses 'privileged' ports (i.e. 80 & 443). These ports are only allowed access by root. It is complicated (and I don't 100% fully understand it myself) but basically to avoid Apache running as root but also being allowed access to privileged ports it does a bit of trickery...
So rather than confusing yourself on how Apache works (when it's not quite relevant anyway) I suggest you read up on how the Debian system launches programs on boot.
As I briefly mentioned above, privileged ports can only be opened by root. So if OpenERP is running as a non-privileged user (as I imagine it will be) and you don't have a webserver of some sort internal proxy access to OpenERP then you will need to think about how you will make OpenERP easily accessible. One option (other than webserver proxying) would be firewall rerouting of ports. I don't think that would be a recommended way of doing it though as by default the firewall is disabled on TKL.
Not to be confused with Debian init scripts! :) But yes inithooks are pretty cool! You'll need to work them out for setting passwords etc...
Good luck! :)
Add new comment