Learn about Centmin Mod LEMP Stack today
Become a Member

Install Good method to deploy 10 CentminMod Servers @ one time?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Troy, Sep 14, 2016.

  1. Troy

    Troy Premium Member Premium Member

    14
    6
    3
    Sep 14, 2016
    Ratings:
    +6
    Local Time:
    11:10 AM
    Does anyone have a very simple process to deploy a group of CentminMod servers at the same time?

    I know about headless deployments, but Im more concerned about the work after centminmod is installed, ie CSF config, vhost deployment, etc to support a single site spread across multiple boxes.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,151
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    1:10 AM
    Nginx 1.13.x
    MariaDB 5.5
    Check out Centmin Mod Insights forum's sticky for [Guide] Save time creating Nginx vhost & MySQL users and databases | Centmin Mod Community using command line unattended mode via /usr/bin/nv.

    Though right now that would auto generate a different pure-ftpd username/password for each run of /usr/bin/nv on each server in a multiple cluster. But it's easy to change pure-ftpd passwords via pure-pw command as outlined here https://centminmod.com/ftp.html#change

    So if your SSH client supports running a single command across multiple open SSH sessions/servers as discussed at What SFTP/FTP and SSH client apps do you use ? | Centmin Mod Community you can easily just setup your site i.e. yoursite.com via 4 commands including initial Centmin Mod 123.09beta01 installation

    with self-signed ssl set -s y for nv command line
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
    nv -d yourdomain.com -s y -u YOURFTPUSERNAME
    pure-pw passwd YOURFTPUSERNAME
    pure-pw mkdb
    


    then mass create your mysql user and databases on each server or on central mysql server [Guide] Save time creating Nginx vhost & MySQL users and databases | Centmin Mod Community

    For CSF Firewall, just let each server instance be it's own. If you need to whitelist common ips, just run single command across multiple open SSH session/servers as outlined at CSF Firewall - CentminMod.com LEMP Nginx web stack for CentOS
    Code (Text):
    csf -a ip yourcomment
     
    Last edited: Sep 14, 2016
  3. bassie

    bassie Active Member

    535
    116
    43
    Apr 29, 2016
    Ratings:
    +348
    Local Time:
    5:10 PM
    If you need to deploy multiple servers at once but not on a daily basis.

    You could use the image/snapshot feature to clone servers.
    Nowadays almost every VPS / dedicated provider offers snapshots.

    Unattended requires too much time to implement the unattended environment and only makes sense if you need it more often.
     
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    30,151
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    1:10 AM
    Nginx 1.13.x
    MariaDB 5.5
    yes that could work if all servers are same specs exactly

    As Centmin Mod at initial install time, dynamically optimises LEMP stack configuration based on detected system resources available (memory, cpu thread count etc), type of virtualisation if any i.e. openvz or not and disk i/o performance etc. So if all servers differ slightly, they would be better running above 4 commands for unattended. If all servers are same, then image snapshot clone could be used i.e. with digitalocean or linode.
     
    Last edited: Sep 15, 2016
  5. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    4:10 PM
    1.11.x
    10.x
    If the VPS changes cores and ram in the future is it possible to re-optimse the temp stack via centimemod or is this a manual tweak ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,151
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    1:10 AM
    Nginx 1.13.x
    MariaDB 5.5
    It's a manual tweak right now. The formula used for nginx is located at inc/cpucount.inc i.e. for Centmin Mod 123.09beta01 centminmod/cpucount.inc at 123.09beta01 · centminmod/centminmod · GitHub so depending on number of cpu threads detected or changed the setting may or may not change i.e. between 2-4 and 4-6 formula is threads/2 so 2 threads/2 = 1, 3 threads/2 = 1 and 4 threads/2 = 2. At 7 and 8 is divide by 2.33 so 7 threads/2.33 = 3 and 8 threads/2.33 = 3 and so forth so that remaining threads are given more to other stack software like php and mariadb etc.
     
    • Informative Informative x 1