Want to subscribe to topics you're interested in?
Become a Member

Develop / Github / Contribute

Discussion in 'Centmin Mod Insights' started by apidevlab, Apr 10, 2016.

  1. apidevlab

    apidevlab Member

    88
    30
    18
    Mar 22, 2016
    /dev/null
    Ratings:
    +54
    Local Time:
    7:28 AM
    1.11.1
    5.2.14-122
    @eva2000 you pretty much manage this alone I can see a few members via GH but it seems a fair amount of work is done via the Forum (eg: reworking-centmin-sh-menu-option-23-for-better-efficiency-performance)

    Code (Text):
    ----------------------------------------------------------------
     >  CENTMIN MOD 1.2.3-eva2000.09 (REMIX)
     >  http://centminmod.com
    ----------------------------------------------------------------
     #  ORIGINAL 1.2.3 MIX: eva2000 Feat
     #  Nginx: 1.9.14
     #  PHP: 5.6.20
     #  Python: 2.7.10
     #  MariaDB: 5.2.14-122
    ---------------------------------------------------------------
    >   LE MENU
    ---------------------------------------------------------------
    [ 1] CENTMIN MOD INSTALLER
    [ 2] Add Nginx vhost domain
    [ 3] NSD setup domain name DNS
    [ 4] Nginx Upgrade / Downgrade
    [ 5] PHP Upgrade / Downgrade
    [ 6] XCache Re-install
    [ 7] APC Cache Re-install
    [ 8] XCache Install
    [ 9] APC Cache Install
    [10] Memcached Server Re-install
    [11] MariaDB 5.2/5.5 & 10.x Upgrade Sub-Menu
    [12] Zend OpCache Install/Re-install
    [13] Install ioping.sh vbtechsupport.com/1239/
    [14] SELinux disable
    [15] Install/Reinstall ImagicK PHP Extension
    [16] Change SSHD Port Number
    [17] Multi-thread compression: pigz,pbzip2,lbzip2...
    [18] Suhosin PHP Extension install
    [19] Install FFMPEG and FFMPEG PHP Extension
    [20] NSD Re-install
    [21] Update - Nginx + PHP-FPM + Siege
    [22] Add Wordpress Nginx vhost + Cache Plugin
    [23] Update Centmin Mod Code Base
    [24] EXIT MENU
    


    I would like to help out in some way but am not sure of the best approach?

    Ideally I don't want to 'fork via GH', it makes more sense (to me) to pick a recent commit and export this into a fresh clean repo and for me to add the 'official' repos as remotes (I have a fairly decent understanding of 'private' git) but not so much with 'collaboration' if this is going down the wrong path I am happy to be pointed to it :) as you seem to have a pretty specific way of working.

    These are just my initial thoughts and am open to any suggestions or directions.

    Said elsewhere on these boards, you have created a thing of beauty :0
     
    Last edited: Apr 10, 2016
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Cheers @apidevlab :)

    Indeed a fair amount of the work, feedback and suggestions are done via the forums instead of via github repo as more folks are familiar with forum format :)

    Pretty much similar experience/know how myself can understand git but never really had experience with collabration/pull-request approach with git repos myself. Centmin Mod is my really my 1st and only experience with git/github up to now. So getting there eventually :D

    With that said, the way the github repo branches are laid out at GitHub - centminmod/centminmod: menu based Nginx auto installer (GPLv3 licensed) is there are 3 main branches I work with most often
    • 123.08stable
    • 123.09beta01
    • master - master is just 123.08stable based right now then get merges from 123.08stable
    I plan to eventually change the git workflow a bit to be more flexible so upcoming will flow as follows
    • 123.09beta01 becomes 123.09stable
    • 123.09beta01 based gets new branch called = dev (dev may replace master as main dev branch or separate)
    This way all the new developments go into dev instead of a 123.10beta* naming. This will allow me to more quickly release 123.10stable etc with minor updates eventually.

    For collaborative work, in the new workflow, probably then would be best done on dev branches . However, I am always looking to rename the branching versions soon too i.e. 130.xx but haven't figured that out yet. As you can see still sorting out the git workflow myself :)

    As to specifics folks like yourself can help out with coding wise i.e. bash shell scripting. Probably, the easiest way to start is just going looking through my code in the script(s) first and picking apart mistakes or better ways to write functions or code if you can follow the code. Alot of the functions are broken down into individual source include files in repo directory at /inc/*.inc. Centmin Mod project is basically my first experience with bash shell scripting when I started forking from the original Centmin LEMP project. So throughout the Centmin Mod code you will see varying degrees of bash shell scripting skill and know-how as learn and evolve my coding :D In other words, the best is yet to come :cool:

    Centmin Mod 123.08stable and 123.09beta01 was my more conscious effort to improve the code in terms of execution speed for initial installations and alot more error checking to anticipate the various combinations of actions and decisions end users choose i.e. if you intend to install PHP with or without Zend Opcache/APC Cache, whether they enable or disable specific nginx module and features etc.

    The other end of the spectrum in terms of helping out would be if you have specific software or applications you might like to see included into Centmin Mod in terms of automated install and setup which do not currently exist. But you yourself know how to install and setup manually, you could also lay out those steps and we or I can see if it's possible to integrate into future Centmin Mod versions for automated install and configuration. I can only integrate what I know or use, so alot of other web apps or software folks might want, might not be possible for me. But with helping guidance from folks who know how to manually install and set it up, we can see about integrating it into Centmin Mod if there's demand for it.

    If you go through the Centmin Mod 2016 Survey at Centmin Mod Survey 2016 | Centmin Mod Community there's one survey question with a list of most wanted additions / addons.
     
    Last edited: Apr 10, 2016
    • Informative Informative x 1
  3. apidevlab

    apidevlab Member

    88
    30
    18
    Mar 22, 2016
    /dev/null
    Ratings:
    +54
    Local Time:
    7:28 AM
    1.11.1
    5.2.14-122
    Awesome, thanks for the detailed response :) That's a similar position with me, I have used Bitbucket and Gitlab (private (free) repos). It's been a great way to learn 'git workflow' and managing a development software stack in general. I don't really feel confident enough with Githubs 'all public' approach.

    That's exactly what led to me to post this, I spent a productive afternoon going through centmin.sh mostly commenting and pointing to site docs / forum posts as I go. Poking around core folders and files, fixing typos, making 'changes' and logging/commenting steps BEFORE an install.

    Centmin Mod code offers a wonderful way to learn a 'hands on'*nix approach to server building/deploying. Previously I have been used to learning managing servers previously with Virtualmin / Webmin and others.Those 'training wheels' have to come off at some point.

    That's my general thinking too, I tested the WP option and it's a superb way to deploy, in fact in terms of security and 'locking' down WP it's a real eye opener. I have a few ideas, for ways to possibly extend / expand the 'Initial installs' with a more 'wizard' like approach.

    Just ideas in my head but am sure you get what I mean.

    Q: Can custom_config.inc be used to 'over-ride' the INITIAL INSTALL (via git) options?
    Q: Would it (in the scenario above) be helpful to create a custom_config.inc via MENU?

    I have WP experience would suggest this may be a perfect candidate for trying alternative scenarios. Offering a network install option, additional plugins / themes / tweaks and 'best practice' security. Maybe developing/experimenting with a specific 'WP Install menu' etc

    In terms of integrate/offering more apps/scripts, off the top of my head : Versionpress (looks particulaly promising) Grav, Dokuwiki Neon and similar. There are many others

    Not 'reinventing the wheel' but maybe offering an 'install & go' type of setup or a 'developer' setup.

    I will get something up into a (private for now) git repo and start to document/comment as I go.
    P.S Survey Centmin Mod 2016 | Polldaddy.com completed
     
    Last edited: Apr 11, 2016
    • Like Like x 1
  4. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,784
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    4:28 PM
    Nginx 1.13.x
    MariaDB 5.5
    Centmin Mod has 3 git repos, official github.com one, a public mirror on gitlab.com and a private backup/dev repo on bitbucket as outlined at Centmin Mod Git Repository Online Status | Centmin Mod Community

    nice pretty much how I learn too for some stuff :)

    indeed Wordpress needs to be locked down as much as possible :)

    Yes custom_config.inc can be used to override settings at initial install time, you can see example of this in 123.09beta01 branches curl installer-latest.sh on lines 180-181 to enable Nginx lua and Nginx pagespeed modules at initial install time
    Code (Text):
    mkdir -p /etc/centminmod/
    echo "NGINX_PAGESPEED=y" > /etc/centminmod/custom_config.inc
    echo "ORESTY_LUANGINX=y" >> /etc/centminmod/custom_config.inc


    No need for menu option, centmin mod command shortcuts (FAQ item 16) at lines 32 and 36 in inc/shortcuts_install.inc setup SSH command line shortcuts to be able to edit/create custom_config.inc when you type the word = customconfig which will invoke nano linux text editor to edit existing custom_config.inc or create it if it doesn't exist

    Seems like best 1st steps with a private git repo for experimenting with modifications to centmin mod code. As such probably best to do a fork, git clone and base it off 123.09beta01 branch as that is most updated and will be the next stable release :)

    cheers :)