Comments (22)
Thanks for your quick reply and actions ! The script works great !
from installscript.
In his actual state, the script need to be edited if you want to include some level of customization on the install. Perhaps implementing a little interactive shell behaviour with the installation user would help.
What I mean here is than creating a short questionnaire for the user, asking for the specifics of the installation and configuration related to the system, like Odoo version and others.
from installscript.
Always is a good practice, for readability porpoises mainly, to use indentation in bash scripting, in the starting script than is going to be created to manage the service that's not the case. Perhaps I'm missing something like if the script is written the way is now with indentation, perhaps will not work.
Perhaps the solution for that is to take out that part from the inside the original script, and to create the file properly in this repository, and through the installation the script can download that configuration file and install it properly.
from installscript.
There is the change to create a really nice odoo setup placing it behind a proxy, implementing SSL certificate, and serving it's content with as a wsgi, that creates a really nice and secure setup for the software and the server. Should this script include things like those?
from installscript.
Ideally I do want Nginx configuration and SSL configuration in it. Depending on the user its choice it should also configure Nginx / SSl depending on his configuration.
Either through an interactive shell or through modify the shell script itself. Shoot all those ideas out and we'll take it from there :)
from installscript.
@sebastian-code do you have any experience with scripting this in shell or do you have any example code by any luck?
from installscript.
Actually no, sorry, I don't have really good experience with bash scripting, but I'll take a look to see if there a nice snippet than can be implemented here.
from installscript.
@sebastian-code well the problem is that I'm not familiar with any SSL & Nginx setup.
If you'd know the correct linux commands I could convert it in to a shell script, I'm more familiar with that 👍
from installscript.
I used this two tutorial in the past to implement that setup:
http://www.schenkels.nl/2014/12/reverse-proxy-with-odoo-8-nginx-ubuntu-14-04-lts/
http://www.nkr1ptd.com/2014/11/using-nginx-with-odoo-version-8-on.html
Both were designed for odoo8 but there is no real difference that a could think of with odoo9
from installscript.
@Yenthe666 @tvibliani to run the script you need sudo permissions, that's obvious, but when you run the script, the execution speed is going to be affected by the internet connection the installer has. What worries me is about the time the sudo permissions is alive.
In Linux, there is a default time for the sudoers to expire their allowance, in Ubuntu I'm not sure but is around 2 minutes, how does that time affects the script execution?
I had some problems with previous installations in some local VM, where nothing was installed beyond the postgres point, and I'm thinking than perhaps that has something to do. I have to admit than I left the PC at that point because I expected an automatic deployment, so I wasn't paying attention.
from installscript.
Does it sound to wild to you if the script is also able to deploy Odoo over a AWS stack, using EC2, RDS and S3 services from the user? Just saying ;)
from installscript.
@sebastian-code nothing sounds to wild to me ;) And I'm sure it is possible. But I'd like to have the full Nginx config done first. and I don't have any Amazon AWS machines to test on..
from installscript.
@sebastian-code AFAIK sudo has some kind of env_reset timeout, that should affect password prompt to appear again after the timeout for a new sudo sessions, but it should NOT affect already running sudo session... if so, then it is actually problem for older versions, including the one we have in main branch (9.0), but it is no more problem for newer version in development branch (currently "master")... Older version has all commands sudo prefixed inside script, and if we run this script simply without administrative permissions, like: ./odoo_install.sh
then new sudo sessions are started separately for each command inside the script (as we have lot of sudo prefixed commands in old version), so as in your case, if script runs longer than timeout for sudo session reset, then next sudo prefixed command executed after the timeout will pasword-prompt user and stop the execution of installer...
however, in new version we restrict users to run the install script inside sudo session with command sudo ./odoo_install.sh
from outside the script (or run script as root, see restriction code in master branch), so in this case all commands are executed under that single sudo sesion that's started outside of script and this session will not be affected by sudo timeout and script will be able to run as long as it needs. also it can spawn subsequent sudo sessions without password prompt, but all unnecessary sudo prefixes are removed from development version as well... I actually removed all those sudo prefixes for better readability, but you helped me to find out one more advantage of this way 👍 it avoids sudo timeout problem as well... (for older versions, it's not restricted from inside script, but as a workaround you can anyway run this script with sudo ./odoo_install.sh
instead of ./odoo_install.sh
in order to avoid interruption caused by sudo timeout ...)
from installscript.
One typo, it's need to add ".sh" at the end of line 14
from installscript.
@qupro you don't need to specify the ".sh" to execute the file! 😄
from installscript.
There a few ways to run bash script files on the shell, one is to invoke the interpreter so you bash script_name.sh
the other one, if the file has execution permissions, you type ./script_name
from installscript.
@sebastian-code @qupro @tvibliani
I've added support for Nginx and SSL !
https://github.com/chris001/InstallScript/blob/patch-2/odoo_install.sh
from installscript.
I would like to suggest some features and improvements like
-
Can you make odoo restart automatically if it fails for some reason... I think some modification on odoo running deamon configuration should do the work ...I want my odoo process to restart automatically if it fails or stops.
-
Can you echo odoo configuration file path location and odoo log file location after installation is complete ... I mean this one /etc/$user-server.conf and this one /var/log/odoo/$user/$user-server.log
Thanks & Regards
Anirban Dutta
from installscript.
You can use supervisord for something like this.
But it's not always the best to keep rebooting a process if the cause is not solved. It can actually cause a high load in an infinite loop.
http://supervisord.org/index.html
from installscript.
- If your services fails its a symptom of an issue on your system/configuration, not on Odoo. I have instances running fine for
months or years without a single time of the service going down. Fix the issue, not the symptom. - Makes sense. Done at 7ac47b8
from installscript.
Can we add an option to configure Remote Postgresql database server instead of local database server as optional choice ?
from installscript.
A PR is welcome but I can't invest time for it personally :(
from installscript.
Related Issues (20)
- Enterprise edition HOT 5
- Hi all, HOT 1
- 404 error HOT 16
- [Not Found] when trying to visit URL only when installing enterprise HOT 2
- 404: syntax error near unexpected token `fi' HOT 3
- error during running installed script HOT 3
- after odoo 15 to 16 database migration error is coming psycopg2.errors.InvalidDatetimeFormat: invalid input syntax for type timestamp: "" HOT 2
- AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- the script can't point my domain to the machine in contabo HOT 2
- Having problem when install with python3.10 HOT 1
- [10.0] pip2 and pip requirements missing HOT 1
- I want to add a translation HOT 2
- Some necessary changes to the odoo_install_debian.sh
- 17.0 on Ubuntu 22.04 HOT 6
- Instructions in script don't align with instructions in readme HOT 2
- Installation Error - AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK' HOT 2
- Odoo17 on ubuntu 22.04 error HOT 12
- The SSL script causes (refused to connect) after the installation HOT 1
- Ubuntu 22.04 Odoo17 wkhtml issue HOT 6
- Odoo v16 - Error on apt update after installation on ubuntu 22.04. + Proposed solution
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from installscript.