Exemplo n.º 1
0
def do():
    import setup_utilities
    setup_utilities.log("Installing avro python....")
    import os
    download_link = "http://apache.lauf-forum.at/avro/stable/py/avro-1.8.1.tar.gz"
    temp_folder = ".temp"
    temp_location = os.path.join(temp_folder, "avro.tar")
    temp_extracted_folder = os.path.join(temp_folder, "avro-1.8.1")

    if not os.path.exists(temp_folder):
        os.makedirs(temp_folder)

    import subprocess
    subprocess.call(
        ["curl", download_link, "--create-dirs", "-o", temp_location])

    import shutil

    import tarfile
    tar = tarfile.open(temp_location)
    tar.extractall(path=temp_folder)
    tar.close()

    print temp_extracted_folder
    os.chdir(temp_extracted_folder)
    subprocess.call(["python", "setup.py", "install"])
    os.chdir("..")
    os.chdir("..")

    shutil.rmtree(temp_folder)

    setup_utilities.log("avro python was installed successfully!")
Exemplo n.º 2
0
def do():
    import setup_utilities

    setup_utilities.pip_install("python-ldap")

    setup_utilities.log("Python ldap was installed successfully!")
    
Exemplo n.º 3
0
def do():
    import setup_utilities
    setup_utilities.log("Installing Flask...")

    setup_utilities.pip_install("Flask")

    setup_utilities.log("Flask-Installation successful!")
Exemplo n.º 4
0
def do():
    # Install virtual env, create virtual environment
    import setup_utilities

    from subprocess import call
    call(["virtualenv", "venv"])

    setup_utilities.log("Successfully created virtual environment in /venv")
def do():
    import setup_utilities
    import os
    setup_utilities.log("Setting up kafka server...")
    import subprocess
    bat_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "create_kafka_server.bat")
    subprocess.call(". {}".format(bat_file), shell=True)
    setup_utilities.log("Successfully set up kafka server!")
    
Exemplo n.º 6
0
def do():
    import setup_utilities
    setup_utilities.log("Installing npm (by installing nodejs)...")
    import subprocess
    subprocess.call(["sudo", "apt-get", "update"])
    setup_utilities.apt_install("curl")
    subprocess.call(
        "curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -",
        shell=True)
    subprocess.call(["sudo", "apt-get", "install", "-y", "nodejs"])
    setup_utilities.log("Successfully installed npm!")
Exemplo n.º 7
0
def do():
    import setup_utilities

    setup_utilities.log("Installing virtualenv in /venv ...")

    import platform
    main_version = int(platform.linux_distribution()[1].split(".")[1])
    virtual_env_package = "python-virtualenv" if (
        main_version < 16) else "virtualenv"

    setup_utilities.apt_install(virtual_env_package)
Exemplo n.º 8
0
def do():
    import setup_utilities

    setup_utilities.log("Installing ldap-python prerequisites system-wide...")

    apt_packages = ["libsasl2-dev", "python-dev", "libldap2-dev", "libssl-dev", "slapd", "ldap-utils", "phpldapadmin"]
    for package in apt_packages:
        setup_utilities.apt_install(package)

    setup_utilities.log("Successfully installed ldap-python prerequisites system-wide")

    
def do():
    import setup_utilities
    answer = setup_utilities.query_yes_no(
        "Do you want to install the php ldap manager (phpldapadmin) and all required web server and PHP dependencies?"
    )
    if answer == False:
        setup_utilities.log("phpldapadmin will not be installed!")
        return
    setup_utilities.log("phpldapadmin will be installed")
    setup_utilities.apt_install("phpldapadmin")
    setup_utilities.log("Sucessfully installed phpldapadmin!")
Exemplo n.º 10
0
def do():
    import setup_utilities
    setup_utilities.log("Installing mysql server...")
    setup_utilities.apt_install("mysql-server")
    setup_utilities.log("Successfully installed mysql server!")
Exemplo n.º 11
0
def do():
    import setup_utilities
    setup_utilities.log("Installing kafka-python...")
    import pip
    pip.main(["install", "kafka-python"])
    setup_utilities.log("Kafka-Python was installed successfully!")
def do():
    import setup_utilities
    setup_utilities.log("Installing browserify...")
    import subprocess
    subprocess.call(["sudo", "npm", "install", "-g", "browserify"])
    setup_utilities.log("Successfully installed browserify!")
Exemplo n.º 13
0
def do():
    import setup_utilities
    setup_utilities.log("Installing dask...")
    setup_utilities.pip_install("dask[complete]")
    setup_utilities.log("Dask was installed successfully!")
def do():
    import setup_utilities
    setup_utilities.log("Installing mysql for python (python-mysqldb)...")
    setup_utilities.apt_install("python-mysqldb")
    setup_utilities.log("Successfully installed mysql for python!")
def do():
    import setup_utilities
    setup_utilities.log("Installing zookeeper...")
    setup_utilities.apt_install("zookeeperd")
    setup_utilities.log("Successfully installed zookeeper!")
def do():
    import setup_utilities
    setup_utilities.log("Configuring ldap server...")

    import subprocess
    subprocess.call(["sudo", "dpkg-reconfigure", "slapd"])
Exemplo n.º 17
0
def do():
    import setup_utilities
    setup_utilities.log("Installing mysql python module...")
    setup_utilities.pip_install("mysql-connector-repackaged")
    setup_utilities.pip_install("mysql-connector-python")
    setup_utilities.log("Successfully installed mysql python module")
Exemplo n.º 18
0
def do():
    import setup_utilities
    setup_utilities.log("Installing python schedule...")
    setup_utilities.pip_install("schedule")
    setup_utilities.log("Successfully installed python schedule!")
Exemplo n.º 19
0
def do():
    import setup_utilities
    setup_utilities.log("Installing pyxnat...")
    setup_utilities.pip_install("pyxnat")
    setup_utilities.log("Successfully installed pyxnat")
Exemplo n.º 20
0
def do():
    import setup_utilities
    setup_utilities.log("Installing java (default-jre)...")
    setup_utilities.apt_install("default-jre")
    setup_utilities.log("Successfully installed java!")