Learn about Centmin Mod LEMP Stack today
Become a Member

Sysadmin LXD Guest Containers for Centmin Mod ?

Discussion in 'System Administration' started by eva2000, Jun 5, 2018.

  1. eva2000

    eva2000 Administrator Staff Member

    39,828
    8,788
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,526
    Local Time:
    8:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Curious if anyone here's played with LXD guest containers The LXD pure-container hypervisor | Containers | Ubuntu ? Thinking of adding support for Centmin Mod LEMP stack to be installable inside LXD CentOS based guest containers as well and already setup Ubuntu 18.04 LTS on ssdnodes VPS with LXD guest containers for CentOS 7.5 and Ubuntu 18.04 LTS to play with :)

    ssdnode VPS with updated Ubuntu 18.04 Bionic Beaver LTS
    Code (Text):
    systemd-detect-virt
    kvm
    
    cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=18.04
    DISTRIB_CODENAME=bionic
    DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
    

    LXD/LXC version and the 2 created LXD container OSes one for CentOS 7.5 64bit and one for Ubuntu 18.0.4 LTS
    Code (Text):
    lxc --version
    3.0.0
    
    lxc list      
    +----------+---------+----------------------+-----------------------------------------------+------------+-----------+
    |   NAME   |  STATE  |         IPV4         |                     IPV6                      |    TYPE    | SNAPSHOTS |
    +----------+---------+----------------------+-----------------------------------------------+------------+-----------+
    | centos75 | RUNNING | 10.71.164.168 (eth0) | fd42:769c:ebd9:a0f7:216:3eff:fefd:23a2 (eth0) | PERSISTENT | 0         |
    +----------+---------+----------------------+-----------------------------------------------+------------+-----------+
    | ubuntu18 | RUNNING | 10.71.164.145 (eth0) | fd42:769c:ebd9:a0f7:216:3eff:fe42:4ca8 (eth0) | PERSISTENT | 0         |
    +----------+---------+----------------------+-----------------------------------------------+------------+-----------+
    

    Ubuntu 18.04 64bit LXD container info which uses host node's Linux 4.15.0-22 generic Kernel
    Code (Text):
    lxc exec ubuntu18 cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=18.04
    DISTRIB_CODENAME=bionic
    DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
    
    lxc exec ubuntu18 -- uname -a
    Linux ubuntu18 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    
    lxc exec ubuntu18 systemd-detect-virt
    lxc
    
    lxc exec ubuntu18 -- free -m
                  total        used        free      shared  buff/cache   available
    Mem:          16040          48       15797           8         194       15992
    Swap:             0           0           0
    
    lxc exec ubuntu18 -- df -hT
    Filesystem                  Type      Size  Used Avail Use% Mounted on
    /dev/mapper/ubuntu--vg-root ext4       79G  4.3G   70G   6% /
    none                        tmpfs     492K     0  492K   0% /dev
    udev                        devtmpfs  7.9G     0  7.9G   0% /dev/tty
    tmpfs                       tmpfs     100K     0  100K   0% /dev/lxd
    tmpfs                       tmpfs     100K     0  100K   0% /dev/.lxd-mounts
    tmpfs                       tmpfs     7.9G     0  7.9G   0% /dev/shm
    tmpfs                       tmpfs     7.9G  140K  7.9G   1% /run
    tmpfs                       tmpfs     5.0M     0  5.0M   0% /run/lock
    tmpfs                       tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup
    

    CentOS 7.5 64bit LXD container info which uses host node's Linux 4.15.0-22 generic Kernel
    Code (Text):
    lxc exec centos75 cat /etc/redhat-release  
    CentOS Linux release 7.5.1804 (Core)
    
    lxc exec centos75 -- uname -a
    Linux centos75 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
    
    lxc exec centos75 systemd-detect-virt
    lxc
    
    lxc exec centos75 -- free -m
                  total        used        free      shared  buff/cache   available
    Mem:          16040          12       16013           8          14       16027
    Swap:             0           0           0
    
    lxc exec centos75 -- df -hT
    Filesystem                  Type      Size  Used Avail Use% Mounted on
    /dev/mapper/ubuntu--vg-root ext4       79G  4.3G   70G   6% /
    none                        tmpfs     492K     0  492K   0% /dev
    udev                        devtmpfs  7.9G     0  7.9G   0% /dev/tty
    tmpfs                       tmpfs     100K     0  100K   0% /dev/lxd
    tmpfs                       tmpfs     100K     0  100K   0% /dev/.lxd-mounts
    tmpfs                       tmpfs     7.9G     0  7.9G   0% /dev/shm
    tmpfs                       tmpfs     7.9G  8.1M  7.9G   1% /run
    tmpfs                       tmpfs     7.9G     0  7.9G   0% /sys/fs/cgroup
    
     
  2. bassie

    bassie Well-Known Member

    1,082
    273
    83
    Apr 29, 2016
    Ratings:
    +796
    Local Time:
    12:07 AM
    Is it smart to pick this up?
    LXD/snap is a real ubuntu thing as it isn't supported by RHEL or clones like CentOS.
    CentOS: which of course forms the basis for Centminmod.
    As written by LXD's founder and project leader Stéphane Graber, it could be broken so that's buggy in my view.

    I also do not believe that this will come to RHEL in the short term.
    With the purchase of CoreOS, Red Hat have clearly shown where their future lies.
     
  3. eva2000

    eva2000 Administrator Staff Member

    39,828
    8,788
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,526
    Local Time:
    8:07 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    Yeah it's just something I want to try out and see for myself. I will be doing benchmarks between Ubuntu 18.04 and CentOS 7.5 LXD guest container based LEMP stack related tests including HTTP/2 HTTPS benchmarks etc :D

    First test Centmin Mod 123.09beta01 install within a LXD CentOS 7.5 based guest container
    Code (Text):
    yum -y update; curl -O https://centminmod.com/betainstaller.sh && chmod 0700 betainstaller.sh && bash betainstaller.sh
    

    Code (Text):
    ---------------------------------------------------------------------------
    Total Curl Installer YUM or DNF Time: 164.2376 seconds
    Total YUM Time: 12.035656178 seconds
    Total YUM or DNF + Source Download Time: 48.6145
    Total Nginx First Time Install Time: 203.2347
    Total PHP First Time Install Time: 208.0195
    Download Zip From Github Time: 1.9152
    Total Time Other eg. source compiles: 274.1117
    Total Centmin Mod Install Time: 733.9805
    ---------------------------------------------------------------------------
    Total Install Time (curl yum + cm install + zip download): 900.1333 seconds
    ---------------------------------------------------------------------------
    4 Intel Core Processor (Skylake, IBRS)
    4 2099.998
    ---------------------------------------------------------------------------
    

    Code (Text):
    *************************************************
    * Post-Install Check List....
    *************************************************
    
    --------------------------------------------------------
    Check ccache Version:
    --------------------------------------------------------
    ccache version 3.4.1
    
    Copyright (C) 2002-2007 Andrew Tridgell
    Copyright (C) 2009-2018 Joel Rosdahl
    
    This program is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software
    Foundation; either version 3 of the License, or (at your option) any later
    version.
    
    --------------------------------------------------------
    Check Nginx Version:
    --------------------------------------------------------
    nginx version: nginx/1.13.12 (050618-001557)
    built by gcc 7.3.1 20180303 (Red Hat 7.3.1-5) (GCC)
    built with OpenSSL 1.1.0h  27 Mar 2018
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --build=050618-001557 --with-compat --with-http_stub_status_module --with-http_secure_link_module --with-libatomic --with-http_gzip_static_module --with-http_sub_module --with-http_addition_module --with-http_image_filter_module=dynamic --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_preread_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-dynamic-module=../ngx-fancyindex-0.4.2 --add-module=../ngx_cache_purge-2.4.2 --add-module=../ngx_devel_kit-0.3.0 --add-dynamic-module=../set-misc-nginx-module-0.32 --add-dynamic-module=../echo-nginx-module-0.61 --add-module=../redis2-nginx-module-0.15 --add-module=../ngx_http_redis-0.3.7 --add-module=../memc-nginx-module-0.18 --add-module=../srcache-nginx-module-0.31 --add-dynamic-module=../headers-more-nginx-module-0.33 --with-pcre=../pcre-8.42 --with-pcre-jit --with-zlib=../zlib-cloudflare-1.3.0 --with-http_ssl_module --with-http_v2_module --with-openssl=../openssl-1.1.0h --with-openssl-opt='enable-ec_nistp_64_gcc_128'
    
    --------------------------------------------------------
    Check PHP-FPM Version:
    --------------------------------------------------------
    PHP 5.6.36 (cli) (built: Jun  5 2018 00:21:55)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
    
    --------------------------------------------------------
    Check MariaDB installed RPM Versions:
    --------------------------------------------------------
    MariaDB-server-10.1.33-1.el7.centos.x86_64
    MariaDB-common-10.1.33-1.el7.centos.x86_64
    MariaDB-shared-10.1.33-1.el7.centos.x86_64
    MariaDB-compat-10.1.33-1.el7.centos.x86_64
    MariaDB-client-10.1.33-1.el7.centos.x86_64
    MariaDB-devel-10.1.33-1.el7.centos.x86_64
    
    --------------------------------------------------------
    Check Memcached Server Version:
    --------------------------------------------------------
    memcached 1.5.8
    
    --------------------------------------------------------
    Check CSF Firewall Version:
    --------------------------------------------------------
    csf: v12.04 (generic)
    
    --------------------------------------------------------
    Check Siege Benchmark Version:
    --------------------------------------------------------
    SIEGE 4.0.4
    
    Copyright (C) 2017 by Jeffrey Fulmer, et al.
    This is free software; see the source for copying conditions.
    There is NO warranty; not even for MERCHANTABILITY or FITNESS
    FOR A PARTICULAR PURPOSE.
    
    
    --------------------------------------------------------
    Check mysqlreport version:
    --------------------------------------------------------
    mysqlreport v3.5-maria11 Jul 4 2013
    
    --------------------------------------------------------
    Check pure-ftpd Version:
    --------------------------------------------------------
    pure-ftpd v1.0.42
    
    --------------------------------------------------------
    Check YUM Repo List
    --------------------------------------------------------
    Loaded plugins: fastestmirror, priorities, versionlock
    Loading mirror speeds from cached hostfile
     * base: repo.us.bigstepcloud.com
     * epel: fedora-epel.mirror.lstn.net
     * extras: repos.forethought.net
     * rpmforge: mirror.lstn.net
     * updates: mirrordenver.fdcservers.net
    279 packages excluded due to repository priority protections
    repo id                 repo name                                    status
    base/7/x86_64           CentOS-7 - Base                              7,658+2,253
    centos-sclo-rh/x86_64   CentOS-7 - SCLo rh                              7,371+96
    centos-sclo-sclo/x86_64 CentOS-7 - SCLo sclo                                 521
    epel/x86_64             Extra Packages for Enterprise Linux 7 - x86_  11,611+974
    extras/7/x86_64         CentOS-7 - Extras                                    305
    mariadb                 MariaDB                                             44+2
    rpmforge                RHEL 7 - RPMforge.net - dag                      136+109
    updates/7/x86_64        CentOS-7 - Updates                               517+137
    repolist: 28,163
    
    --------------------------------------------------------
    mytimes check:
    /usr/bin/mytimes
    --------------------------------------------------------
    Tue Jun  5 00:25:25 UTC 2018    [UTC]
    Tue Jun  5 10:25:25 AEST 2018   [Australia/Brisbane]
    Mon Jun  4 17:25:25 PDT 2018    [America/Los_Angeles]
    Mon Jun  4 19:25:25 CDT 2018    [America/Chicago]
    Mon Jun  4 20:25:25 EDT 2018    [America/New_York]
    Mon Jun  4 20:25:25 EDT 2018    [America/Montreal]
    Tue Jun  5 01:25:25 BST 2018    [Europe/London]
    Tue Jun  5 02:25:25 CEST 2018   [Europe/Berlin]
    Tue Jun  5 07:25:25 +07 2018    [Asia/Bangkok]
    Tue Jun  5 07:25:25 +07 2018    [Asia/Ho_Chi_Minh]
    Tue Jun  5 07:25:25 WIB 2018    [Asia/Jakarta]
    Tue Jun  5 08:25:25 +08 2018    [Asia/Kuala_Lumpur]
    Tue Jun  5 08:25:25 +08 2018    [Asia/Singapore]
    --------------------------------------------------------
    
     
..