Exemplo n.º 1
0
import util.cfg as cfg
import util.pkg as pkg
import util.cred as cred
from util.log import log

#
# Setup
#

log.info("General update")
pkg.clean()
pkg.update()

log.info("Install EPEL")
pkg.install("https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")

#
# Kojid (Koji Builder)
#

log.info("Install Koji Builder")
pkg.install("koji-builder")

koji_url = dict()
koji_url["web"] = "http://koji/koji"
koji_url["top"] = "http://koji/kojifiles"
koji_url["hub"] = "http://koji/kojihub"

log.info("Configure Koji Builder")
with cfg.mod_ini("/etc/kojid/kojid.conf") as i:
Exemplo n.º 2
0
import util.sql as sql
import util.system as system
import util.pkg as pkg
from util.log import log

#
# Setup
#

log.info("General update")
pkg.clean()
pkg.update()

log.info("Install EPEL")
pkg.install(
    "https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
)

#
# Postgre SQL
#

log.info("Install PostgreSQL Server")
pkg.install("postgresql-server")
sql.init_db()

log.info("Modify PostgreSQL initscript")
with cfg.mod_text("/etc/init.d/postgresql") as p:
    # Can't write to /proc/self/oom_adj in docker, causes error message on start, so disable
    index = p.index("PG_OOM_ADJ=-17\n")
    p[index] = "PG_OOM_ADJ=\n"
Exemplo n.º 3
0
import util.cred as cred
from util.log import log
from os.path import basename
from os import rename

#
# Setup
#

log.info("General update")
pkg.clean()
pkg.update()

log.info("Install EPEL")
pkg.install(
    "https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm"
)

log.info("Modify initscripts' checkpid")
# checkpid doesn't handle defunct processes, alter so it does
with cfg.mod_text("/etc/init.d/functions") as f:
    checkpid_start = f.index("checkpid() {\n")
    checkpid_end = f.index("}\n", checkpid_start)
    test_index = f.index('\t\t[ -d "/proc/$i" ] && return 0\n', checkpid_start,
                         checkpid_end)
    f[test_index] = '\t\t[ -e "/proc/$i/exe" ] && return 0\n'

# Note that the /etc/hosts file is not writable in docker images/containers
# Use this instead: https://docs.docker.com/userguide/dockerlinks/#container-linking

#
Exemplo n.º 4
0
Arquivo: setup.py Projeto: ASzc/nagoya
import util.aconf as aconf
import util.cred as cred
from util.log import log
from os.path import basename
from os import rename

#
# Setup
#

log.info("General update")
pkg.clean()
pkg.update()

log.info("Install EPEL")
pkg.install("https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")

log.info("Modify initscripts' checkpid")
# checkpid doesn't handle defunct processes, alter so it does
with cfg.mod_text("/etc/init.d/functions") as f:
    checkpid_start = f.index("checkpid() {\n")
    checkpid_end = f.index("}\n", checkpid_start)
    test_index = f.index('\t\t[ -d "/proc/$i" ] && return 0\n', checkpid_start, checkpid_end)
    f[test_index] = '\t\t[ -e "/proc/$i/exe" ] && return 0\n'

# Note that the /etc/hosts file is not writable in docker images/containers
# Use this instead: https://docs.docker.com/userguide/dockerlinks/#container-linking

#
# Koji-Hub
#
Exemplo n.º 5
0
Arquivo: setup.py Projeto: ASzc/nagoya
import util.cfg as cfg
import util.sql as sql
import util.system as system
import util.pkg as pkg
from util.log import log

#
# Setup
#

log.info("General update")
pkg.clean()
pkg.update()

log.info("Install EPEL")
pkg.install("https://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm")

#
# Postgre SQL
#

log.info("Install PostgreSQL Server")
pkg.install("postgresql-server")
sql.init_db()

log.info("Modify PostgreSQL initscript")
with cfg.mod_text("/etc/init.d/postgresql") as p:
    # Can't write to /proc/self/oom_adj in docker, causes error message on start, so disable
    index = p.index("PG_OOM_ADJ=-17\n")
    p[index] = "PG_OOM_ADJ=\n"
Exemplo n.º 6
0
#!/usr/bin/env python2

import util.pkg as pkg
from util.log import log

log.info("Installing dependency")
pkg.install("pyOpenSSL")
pkg.clean()