Git Product home page Git Product logo

Comments (22)

anirbandutta9 avatar anirbandutta9 commented on June 24, 2024 1

Thanks for your quick reply and actions ! The script works great !

from installscript.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@sebastian-code,

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.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@sebastian-code do you have any experience with scripting this in shell or do you have any example code by any luck?

from installscript.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@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.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

sebastian-code avatar sebastian-code commented on June 24, 2024

@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.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@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.

 avatar commented on June 24, 2024

@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.

qupro avatar qupro commented on June 24, 2024

One typo, it's need to add ".sh" at the end of line 14

from installscript.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@qupro you don't need to specify the ".sh" to execute the file! 😄

from installscript.

sebastian-code avatar sebastian-code commented on June 24, 2024

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.

chris001 avatar chris001 commented on June 24, 2024

@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.

anirbandutta9 avatar anirbandutta9 commented on June 24, 2024

I would like to suggest some features and improvements like

  1. 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.

  2. 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.

codeagencybe avatar codeagencybe commented on June 24, 2024

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.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

@anirbandutta9

  1. 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.
  2. Makes sense. Done at 7ac47b8

from installscript.

anirbandutta9 avatar anirbandutta9 commented on June 24, 2024

Can we add an option to configure Remote Postgresql database server instead of local database server as optional choice ?

from installscript.

Yenthe666 avatar Yenthe666 commented on June 24, 2024

A PR is welcome but I can't invest time for it personally :(

from installscript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.