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

more automation for ss-install, almost automatic deployment #138

Open
backamblock opened this issue Jan 20, 2022 · 6 comments
Open

more automation for ss-install, almost automatic deployment #138

backamblock opened this issue Jan 20, 2022 · 6 comments

Comments

@backamblock
Copy link
Contributor

Just a quick question if you're here. will this work in the ss-config? i want to make one config file which i can deploy without having to manually create passwords every time. i have seen that you use this openssl command in the install script.

ROOT_PASSWORD="$(openssl rand -hex 32)"
SUDO_USER="$(openssl rand -hex 16)"
SUDO_PASSWORD="$(openssl rand -hex 32)"

SFTP_USER="$(openssl rand -hex 16)"
SFTP_PASSWORD="$(openssl rand -hex 32)"

DB_NAME="$(openssl rand -hex 16)"
DB_USER="$(openssl rand -hex 16)"
DB_PASSWORD="$(openssl rand -hex 32)"
DB_PASSWORD_ROOT="$(openssl rand -hex 32)"
DB_HOST="127.0.0.1"
DB_PREFIX="$(openssl rand -hex 5)"
DB_CHARSET="utf8mb4"
DB_COLLATE=""

@backamblock
Copy link
Contributor Author

backamblock commented Jan 20, 2022

doesn't work. have to use seperate script to "sed -i" all variables that need to change

edit:
to clarify.. it does indeed work but there is no secure and reliable way to save these variables afterwards with my initial "just edit the config file" approach. the ss config is called several times during the install and will obviously give a different value every time. this is not safe to use!
i made a different solution via simple bash scripts that are locally run on your pc, then ssh to the VPS.
with this approach you have a controlled environment where the variables are safely stored on your pc in case anything happens.
i will post updates about this here if that is ok for you @jessuppi

@jessuppi jessuppi reopened this Jan 21, 2022
@backamblock
Copy link
Contributor Author

backamblock commented Jan 21, 2022

@jessuppi i created a script for this. i will publish it soon and make it accessible for everyone

This script automates slickstack even more:

update, upgrade, clean the VPS packages
get the current ss-config-sample file for SlickStack
replace user and password variables with secure randoms, change other settings with your data
create the needed dirs and files for the installation.  
set ownership root:root
## i ran into problems here where the ss-install script had no permissions to make subfolders in /var/www despite being root, that's hy they are created before
and finally start the SlickStack installation as usual
install your public key afterwards so you can still use the password in case of emergency
save all important data in a file "DOMAIN-IP.txt" on your pc inside the server-configs folder

no work to be done on this from your side :)

@backamblock backamblock changed the title make custom ss-config with automatic password generation, possible? more automation for ss-install, almost automatic deployment Jan 21, 2022
@backamblock
Copy link
Contributor Author

here it is: https://github.com/backamblock/slickstack-installer

@kidharb
Copy link

kidharb commented Oct 29, 2022

@jessuppi I really like this initiative of automating SlickStack even more, however having a separate script that does this is a maintenance nightmare. What if, we use the defaults that are present in the script to perform the installation? The config summary is output after the installation, so any errors can be picked up then. If the script user is a bit more advanced, then he will know how to edit ss-config and rerun ss-install. I just feel like 90% of SS users just press enter at the prompts to accept the defaults, so let's help them by making this a "no input required" experience.

@jessuppi
Copy link
Member

Thanks for the feedback @kidharb

To be honest I haven't even had time to go through the script released by @backamblock yet but I think he meant for it to be potentially merged into SlickStack like you suggested, or to be further extended by agencies as needed.

@kidharb
Copy link

kidharb commented Oct 30, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants