예제 #1
0
def qr( *args ):
    return command( 'qrencode', *args )
예제 #2
0
from chibi.command import yum, git, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir, join, exists, current_dir, cd


cache_dir = inflate_dir( '~/.cache' )
file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "ponysay\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "Starting install for ponysay" )
    yum.install( 'texinfo' )
    original_dir = current_dir()
    cd( cache_dir )
    ponysay_dir = join( cache_dir, 'ponysay' )

    if not exists( ponysay_dir ):
        git.clone( 'https://github.com/erkin/ponysay.git', ponysay_dir )

    cd( ponysay_dir )

    command( 'python3', './setup.py', 'install', '--freedom=partial' )

    cd( original_dir )
    file_check.append( version_to_check )
예제 #3
0
#!/usr/bin/env python3
from chibi.command import yum, systemctl, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir

file_check_path = inflate_dir('~/provision_installed')
file_check = Chibi_file(file_check_path)

version_to_check = "redis\n".format(file=__file__, )

if __name__ == "__main__" and not version_to_check in file_check:
    cowsay("instalado redis")

    yum.install('redis')
    systemctl.start("redis")
    systemctl.enable("redis")

    cowsay("termino de instalar redis")

    result, error, return_code = command('redis-cli', 'ping', stdout='pipe')

    cowsay("redis ping say: {}".format(result))

    file_check.append(version_to_check)
예제 #4
0
#!/usr/bin/env python3
from chibi.command import yum, command, systemctl
from chibi.net import download
from chibi.command.echo import cowsay
from chibi.file.snippets import inflate_dir, cd
from chibi.file import Chibi_file


cowsay( "instalasion daskboards de kibana" )
cd( '/tmp/' )
download(
    'https://download.elastic.co/beats/dashboards/beats-dashboards-1.1.0.zip',
    file_name='beats-dashboards.zip' )

yum.install( 'unzip' )
command( 'unzip', 'beats-dashboards.zip' )
cd ( 'beats-dashboards' )
command( './load.sh', '-l', 'waifus:80' )

cowsay( "fin de instalasion de los dashboards de kibana" )
예제 #5
0
#!/usr/bin/env python3
from chibi.command import yum, git, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir, join, exists, current_dir, cd

cache_dir = inflate_dir('~/.cache')
file_check_path = inflate_dir('~/provision_installed')
file_check = Chibi_file(file_check_path)

version_to_check = "ponysay\n".format(file=__file__, )

if __name__ == "__main__" and not version_to_check in file_check:
    cowsay("Starting install for ponysay")
    yum.install('texinfo')
    original_dir = current_dir()
    cd(cache_dir)
    ponysay_dir = join(cache_dir, 'ponysay')

    if not exists(ponysay_dir):
        git.clone('https://github.com/erkin/ponysay.git', ponysay_dir)

    cd(ponysay_dir)

    command('python3', './setup.py', 'install', '--freedom=partial')

    cd(original_dir)
    file_check.append(version_to_check)
예제 #6
0
#!/usr/bin/env python3
from chibi.command import command
from chibi.command.echo import cowsay


cowsay( "starting update vbox guest" )
command( '/opt/VBoxGuestAdditions-5.*/init/vboxadd', 'setup' )
cowsay( "ending update vbox guest" )
예제 #7
0
copy(join(FOLDER_PROVISION, "pg_hba.conf"),
     "/var/lib/pgsql/9.6/data/pg_hba.conf",
     verbose=True)

chown("/var/lib/pgsql/9.6/data/pg_hba.conf",
      user_name='postgres',
      group_name='postgres')

copy(join(FOLDER_PROVISION, "postgresql.conf"),
     "/var/lib/pgsql/9.6/data/postgresql.conf",
     verbose=True)

chown("/var/lib/pgsql/9.6/data/postgresql.conf",
      user_name='postgres',
      group_name='postgres')

for database in databases:
    command("su", "postgres", "-c", "createdb {}".format(database))
    command(
        "su", "postgres", "-c", "psql -d {} -c "
        "\"CREATE EXTENSION IF NOT EXISTS postgis;\"".format(database))

for user in list_of_user_to_create:
    command("su", "postgres", "-c", "createuser -d -s -r {}".format(user))
    command("su", "postgres", "-c",
            "psql -c \"ALTER USER {} WITH PASSWORD 'asdf';\"".format(user))

systemctl.restart("postgresql-9.6")

cowsay("finish provision posrgresql")
예제 #8
0
파일: install.py 프로젝트: dem4ply/waifus

version_to_check = "rabbitmq\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "instalando rabbitmq" )
    rpm.rpm_import( 'https://artifacts.elastic.co/GPG-KEY-elasticsearch' )
    download(
        "https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/"
        "rabbitmq-server-3.6.1-1.noarch.rpm",
        directory='/tmp', file_name='rabbitmq.rpm' )

    yum.local_install( "/tmp/rabbitmq.rpm" )

    systemctl.enable( 'firewalld' )
    systemctl.start( 'firewalld' )

    ports = [ "8883", "61613-61614", "15672", "5671-5672", "25672", "4369" ]
    for port in ports:
        firewall.add_port( ports=port )
    firewall.reload()

    command( 'setsebool', "-P", "nis_enabled", "1" )
    systemctl.enable( 'rabbitmq-server' )
    systemctl.start( 'rabbitmq-server' )

    file_check.append( version_to_check )

    cowsay( "termino de instalar rabbitmq" )
예제 #9
0
파일: install.py 프로젝트: dem4ply/waifus
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir


file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "postgresql install\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "instalado postgresql" )

    yum.install(
        "https://download.postgresql.org/pub/repos/yum/9.5/"
        "redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm" )

    yum.install(
        'postgresql95', 'postgresql95-server', 'postgresql95-libs',
        'postgresql95-contrib', 'postgresql95-devel' )
    yum.install( 'postgis2_95-client' )
    command( "/usr/pgsql-9.5/bin/postgresql95-setup", "initdb" )
    #command( "postgresql-setup", "initdb" )
    systemctl.start( "postgresql-9.5" )
    systemctl.enable( "postgresql-9.5" )

    cowsay( "termino de instalar postgresql" )

    file_check.append( version_to_check )
예제 #10
0
from chibi.file.snippets import inflate_dir


file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "postgresql install\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "install postgresql" )

    yum.install(
        "https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm")
        #"https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm" )


    yum.install(
        'postgresql96', 'postgresql96-server', 'postgresql96-libs',
        'postgresql96-contrib', 'postgresql96-devel' )
    yum.install( 'postgis2_96-client' )
    command( "/usr/pgsql-9.6/bin/postgresql96-setup", "initdb" )
    #command( "postgresql-setup", "initdb" )
    systemctl.start( "postgresql-9.6" )
    systemctl.enable( "postgresql-9.6" )

    cowsay( "end install postgresql" )

    file_check.append( version_to_check )
예제 #11
0
#!/usr/bin/env python3
from chibi.command import yum, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir


file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "java 1.8.0\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "Starting install for java" )
    yum.install( 'java-1.8.0-openjdk.x86_64' )

    file_check.append( version_to_check )
    java_version = command( 'java', '-version', stdout='pipe' )
    cowsay(
        "Ending install for java, the version is\n{}".format( java_version ) )
예제 #12
0
파일: provision.py 프로젝트: dem4ply/waifus
chown(
    "/var/lib/pgsql/9.5/data/pg_hba.conf",
    user_name='postgres', group_name='postgres' )

copy(
    join( FOLDER_PROVISION, "postgresql.conf" ),
    "/var/lib/pgsql/9.5/data/postgresql.conf", verbose=True )

chown(
    "/var/lib/pgsql/9.5/data/postgresql.conf",
    user_name='postgres', group_name='postgres' )


for database in databases:
    command( "su", "postgres", "-c", "createdb {}".format( database ) )
    command(
        "su", "postgres", "-c",
        "psql -d {} -c "
        "\"CREATE EXTENSION IF NOT EXISTS postgis;\"".format( database) )

for user in list_of_user_to_create:
    command( "su", "postgres", "-c", "createuser -d -s -r {}".format( user ) )
    command(
        "su", "postgres", "-c",
        "psql -c \"ALTER USER {} WITH PASSWORD 'asdf';\"".format( user ) )


systemctl.restart( "postgresql-9.5" )

cowsay( "termino de provisionado posrgresql" )
예제 #13
0
파일: install.py 프로젝트: dem4ply/waifus
#!/usr/bin/env python3
from chibi.command import yum, systemctl, command
from chibi.command.echo import cowsay
from chibi.file.snippets import inflate_dir
from chibi.file import Chibi_file


file_check_path = inflate_dir( '~/provision_installed' )
file_check = Chibi_file( file_check_path )


version_to_check = "redis\n".format( file=__file__, )


if __name__ == "__main__" and not version_to_check in file_check:
    cowsay( "instalado redis" )

    yum.install( 'redis' )
    systemctl.start( "redis" )
    systemctl.enable( "redis" )

    cowsay( "termino de instalar redis" )

    result, error, return_code = command( 'redis-cli', 'ping', stdout='pipe' )

    cowsay( "redis ping say: {}".format( result ) )

    file_check.append( version_to_check )
예제 #14
0
#!/usr/bin/env python3
from chibi.command import yum, command
from chibi.command.echo import cowsay
from chibi.file import Chibi_file
from chibi.file.snippets import inflate_dir

file_check_path = inflate_dir('~/provision_installed')
file_check = Chibi_file(file_check_path)

version_to_check = "java\n".format(file=__file__, )

if __name__ == "__main__" and not version_to_check in file_check:
    cowsay("Starting install for java")
    yum.install('java-1.8.0-openjdk.x86_64')

    file_check.append(version_to_check)
    java_version = command('java', '-version', stdout='pipe')
    cowsay("Ending install for java, the version is\n{}".format(java_version))