rtCamp/Frappe-Manager

Single command installation

dhsathiya opened this issue · 3 comments

Need to have a single installer script that takes care of all the dependencies required for FM and then installs FM as well.
example:

wget -qO ee rt.cx/ee4 && sudo bash ee

@dhsathiya Could we introduce something like fm self setup command within fm instead of the external script?

I am confused on as Which is more suitable and why? 🤔

For now the script will only work on MacOS and Ubuntu.

Mac Steps:

  • Check if Homebrew is installed. If not, install it.
  • Check if Docker is installed. If not, install it with Homebrew.
  • See if PyEnv is available:
    • If yes, check Python and Pip. Install them with PyEnv if missing.
    • If no, install Python and Pip with Homebrew.
  • Install 'fm' using Pip.
  • Open Docker Desktop and tell the user to set it up.

Ubuntu Steps:

  • Check if docker is installed. If not, install it with apt.
  • Check if docker compose is installed. If not, install it with apt.
  • Add the current user to the Docker group if they're not already in it.
  • Start the Docker service.
  • See if PyEnv is available:
    • If yes, check Python and Pip. Install them with PyEnv if missing.
    • If no, install Python and Pip with Apt.
  • Install 'fm' using Pip.

This script does all this in unattended way.

@dhsathiya What more can be added ?

For now the script will only work on MacOS and Ubuntu.

Mac Steps:

* Check if Homebrew is installed. If not, install it.

* Check if Docker is installed. If not, install it with Homebrew.

* See if PyEnv is available:
  
  * If yes, check Python and Pip. Install them with PyEnv if missing.
  * If no, install Python and Pip with Homebrew.

* Install 'fm' using Pip.

* Open Docker Desktop and tell the user to set it up.

Ubuntu Steps:

* Check if docker is installed. If not, install it with apt.

* Check if docker compose is installed. If not, install it with apt.

* Add the current user to the Docker group if they're not already in it.

* Start the Docker service.

* See if PyEnv is available:
  
  * If yes, check Python and Pip. Install them with PyEnv if missing.
  * If no, install Python and Pip with Apt.

* Install 'fm' using Pip.

This script does all this in unattended way.

@dhsathiya What more can be added ?

Here is the script which follows the above logic.