Skip to content
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

Better Install System #8

Open
ghost opened this issue Feb 20, 2018 · 6 comments
Open

Better Install System #8

ghost opened this issue Feb 20, 2018 · 6 comments

Comments

@ghost
Copy link

ghost commented Feb 20, 2018

What were your thoughts a better install system. I could create a shell script that you basically do curl https://website.org/install.sh | sudo bash that would try and install all dependancies like MariaDB/MySQL, nginx, php-fpm/hhvm, and run setup. Or I could create a deb file that you just add to the apt repo list and it installs from there. Or I could make an ncurses interface that installs the program using a pesudo gui. Up to you on how it goes.

@BytewaveMLP
Copy link
Owner

BytewaveMLP commented Feb 20, 2018

I think the general best practice is an interactive Bash script that just installs dependencies and does some rudimentary set up for you, with instructions on how to complete things for yourself. Though, instructions to curl | bash probably aren't the best idea (may want to recommend reviewing the script contents, or provide a few hashes or something, perhaps also GPG sign the script). Either way, having an installer would be a good idea; possibly something to replace /install, or instruct the user to do so. The current way of setting everything up is manual and messy.

Also, good to see you again. :)

@ghost
Copy link
Author

ghost commented Feb 20, 2018

I think that for right now I will create a basic script that installs the dependancies but also runs the setup that /install would do, in the script as well.

So the flow would go like this:

  1. User downloads setup.sh
  2. The user can then review the script if they wish
  3. Runs the script with sudo ./setup.sh
  4. The script tries to detect to detect if a webserver is installed
  5. If not, install nginx
  6. Script tries to detect if php or hhvm is installed
  7. If not, install hhvm if amd64 or php-fpm if not
  8. Tries to detect if composer is available
  9. If not, download composer
  10. Download and unpack sleeti
  11. Run composer install
  12. Then run program setup (path setup, database setup, create admin user)
  13. Done.

Later, the script could get more advanced if need be.

@BytewaveMLP
Copy link
Owner

Hmm... Not too sure about hhvm; I'm a little worried about compatibility there, because I don't recall whether they've fixed some of their compat bugs yet.

Otherwise, that sounds fine. Creating the admin user would be a bit annoying given the CSRF protections in place and lack of an API, but I suppose you could just hack together a script just for that that runs independently of sleeti.

Had I designed sleeti today, I'd have taken a number of different routes. But it's a lot to refactor at this point.

@ghost
Copy link
Author

ghost commented Feb 20, 2018

I ran through most of the dependancies and it looks like most of them work and support hhvm, except for guzzle and possible twig. I will have to do further testing on that front.

I was planning on probably mocking the Slim Environment in order to create the users and such. I think that that way would be the easiest.

@BytewaveMLP
Copy link
Owner

Are there any reasonable performance gains that justify breaking compatibility with popular libraries and possibly performing a major refactoring? From what I know, and after discussing this with a few other people, I'm not convinced HHVM is worth breaking compatibility for minuscule performance gains.

@ghost
Copy link
Author

ghost commented Feb 20, 2018

I'll have to do further benchmarks on my end. For now I'll stick with php-fpm with nginx.

@ghost ghost mentioned this issue May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant