Ejemplo n.º 1
0
def check():
    env.platform_family = detect.detect()

    assert file.exists('/var/www/vhosts/example.com/xmlrpc.php'),\
        'xmlrpc.php did not exist'

    assert port.is_listening(21), 'port 21/vsftpd is not listening'
    assert port.is_listening(80), 'port 80/varnishd is not listening'
    assert port.is_listening(3306), 'port 3306/mysqld is not listening'
    assert port.is_listening(6082), 'port 6082/varnishd is not listening'
    assert port.is_listening(8080), 'port 8080/apache2 is not listening'
    assert port.is_listening(11211), 'port 11211/memcached is not listening'

    assert user.exists('ftp'), 'ftp user does not exist'
    assert user.exists('varnish'), 'varnish user does not exist'
    assert user.exists('varnishlog'), 'varnishlog user does not exist'
    assert user.exists('mysql'), 'mysql user does not exist'
    assert user.exists('memcache'), 'memcache user does not exist'
    assert user.exists('wp_user'), 'wp_user user does not exist'
    assert user.exists('wp_user').get('passwd') != '!', 'wp_user pass missing'

    assert process.is_up('apache2'), 'apache2 is not running'
    assert process.is_up('mysqld'), 'mysqld is not running'
    assert process.is_up('varnishd'), 'varnishd is not running'
    assert process.is_up('memcached'), 'memcached is not running'
    assert process.is_up('vsftpd'), 'vsftpd is not running'

    assert service.is_enabled('apache2'), 'apache2 service not enabled'
    assert service.is_enabled('mysql'), 'mysql service not enabled'
    assert service.is_enabled('varnish'), 'varnish service not enabled'
    assert service.is_enabled('varnishlog'), 'varnishlog service not enabled'
    assert service.is_enabled('memcached'), 'memcached service not enabled'
    assert service.is_enabled('vsftpd'), 'vsftpd service not enabled'

    assert http_check('http://localhost/', 'Powered by WordPress')
Ejemplo n.º 2
0
def check():
    env.platform_family = detect.detect()

    site = "http://localhost/"
    string = env.string

    assert file.exists('/var/www/vhosts/application/index.php'), \
        '/var/www/vhosts/application/index.php did not exist'

    assert port.is_listening(80), 'port 80/apache2 is not listening'
    assert port.is_listening(3306), 'port 3306/mysqld is not listening'
    assert port.is_listening(11211), 'port 11211/memcached is not listening'

    assert user.exists('mysql'), 'mysql user does not exist'
    assert user.exists('memcache'), 'memcache user does not exist'

    assert process.is_up('apache2'), 'apache2 is not running'
    assert process.is_up('mysqld'), 'mysqld is not running'
    assert process.is_up('memcached'), 'memcached is not running'

    assert service.is_enabled('apache2'), 'apache2 service not enabled'
    assert service.is_enabled('mysql'), 'mysql service not enabled'
    assert service.is_enabled('memcached'), 'memcached service not enabled'

    assert http_check(site, string), 'Apache is not responding as expected.'
Ejemplo n.º 3
0
def check():
    env.platform_family = detect.detect()

    assert file.exists('/var/www/vhosts/example.com/httpdocs/xmlrpc.php'),\
        'xmlrpc.php did not exist'

    assert port.is_listening(80), 'port 80/nginx is not listening'

    if (env.platform_family == "rhel"):
        assert process.is_up('nginx'), 'nginx is not running'
        assert process.is_up('php-fpm'), 'php-fpm is not running'
        assert service.is_enabled('nginx'), 'nginx is not enabled'
        assert service.is_enabled('php-fpm'), 'php-fpm is not enabled'
    elif (env.platform_family == 'debian'):
        assert process.is_up('nginx'), 'nginx is not running'
        assert process.is_up('php5-fpm'), 'php-fpm is not running'
        assert service.is_enabled('nginx'), 'nginx is not enabled'
        assert service.is_enabled('php5-fpm'), 'php-fpm is not enabled'

    if ("secondary" not in socket.gethostname()):
        assert process.is_up('lsyncd'), 'lsyncd is not running'
        assert service.is_enabled('lsyncd'), 'lsyncd is not enabled'


    assert http_check('http://localhost/', 'Powered by WordPress')
Ejemplo n.º 4
0
def check():
    env.platform_family = detect.detect()

    site = "http://localhost/"
    string = "Apache2 Ubuntu Default Page"

    assert file.exists("/opt/railo/install.log"), "Railo install log missing."
    assert port.is_listening(80), "Port 80 is not listening."
    assert port.is_listening(8888), "Port 8888 is not listening."
    assert process.is_up("java"), "The java process is not running."
    assert service.is_enabled("apache2"), "The apache2 service is not enabled."
    assert service.is_enabled("railo_ctl"), "The Railo service is not enabled."
    assert http_check(site, string), "Apache is not responding."
Ejemplo n.º 5
0
def check():
    env.platform_family = detect.detect()

    site = "http://localhost/"
    string = "example.com"
    apache_process = 'apache2'
    php_package = 'php5'
    mysql_process = 'mysql'

    assert port.is_listening(80), 'Port 80 is not listening.'
    assert package.installed(php_package), 'PHP is not installed.'
    assert process.is_up(apache_process), 'Apache is not running.'
    assert process.is_up(mysql_process), 'MySQL is not running.'
    assert service.is_enabled(apache_process), 'Apache is disabled at boot.'
    assert service.is_enabled(mysql_process), 'MySQL is disabled at boot.'
    assert http_check(site, string), 'Drupal is not responding as expected.'
Ejemplo n.º 6
0
def check():
    env.platform_family = detect.detect()

    assert port.is_listening(80), 'port 80/nginx is not listening'

    if (env.platform_family == "rhel"):
        assert process.is_up('nginx'), 'nginx is not running'
        assert process.is_up('php-fpm'), 'php-fpm is not running'
        assert service.is_enabled('nginx'), 'nginx is not enabled'
        assert service.is_enabled('php-fpm'), 'php-fpm is not enabled'
    elif (env.platform_family == 'debian'):
        assert process.is_up('nginx'), 'nginx is not running'
        assert process.is_up('php5-fpm'), 'php-fpm is not running'
        assert service.is_enabled('nginx'), 'nginx is not enabled'
        assert service.is_enabled('php5-fpm'), 'php-fpm is not enabled'

    if ("secondary" not in socket.gethostname()):
        assert service.is_enabled('lsyncd'), 'lsyncd is not enabled'

    assert http_check('http://localhost/', 'Powered by WordPress')
def check():
    env.platform_family = detect.detect()

    site = 'http://{0}/owncloud'.format(env.host)
    string = 'Files - ownCloud'

    assert file.exists("/var/www/owncloud/config/autoconfig.php"), \
        '/var/www/owncloud/config/autoconfig.php does not exist'

    assert port.is_listening(3306), 'port 3306/mysqld is not listening'
    assert port.is_listening(25), 'port 25/master is not listening'
    assert port.is_listening(443), 'port 443/apache2 is not listening'
    assert port.is_listening(80), 'port 80/apache2 is not listening'

    assert process.is_up("apache2"), 'apache2 process is not running'
    assert process.is_up("mysqld"), 'mysqld process is not running'

    assert service.is_enabled("apache2"), 'service apache2 is not enabled'
    assert service.is_enabled("mysql"), 'service mysql is not enabled'

    assert http_check(site, string), 'owncloud did not respond as expected'