def ring(): """ Bootstrap Scality RING (environment variable `SCAL_PASS` must be exported). The environment variable `SCAL_PASS` is expected to hold username:password for fetching scality packages. """ install_env = { 'SUP_ADMIN_LOGIN': '******', 'SUP_ADMIN_PASS': '******', 'INTERNAL_MGMT_LOGIN': '******', 'INTERNAL_MGMT_PASS': '******', 'HOST_IP': env.host, 'SCAL_PASS': os.environ['SCAL_PASS'], } export_vars = ('{0:s}={1:s}'.format(k, v) for k, v in install_env.items()) export_cmd = 'export {0:s}'.format(' '.join(export_vars)) utils.apt_get(['git-core']) run('git clone https://github.com/scality/openstack-ci-scripts.git') # Hide aborts to not leak any repository passwords to console on failure. with cd('openstack-ci-scripts/jenkins'), prefix(export_cmd): with prefix('source ring-install.sh'), settings(hide('aborts')): run('add_source') run('install_base_scality_node', pty=False) # avoid setup screen run('install_supervisor') run('install_ringsh') run('build_ring') run('install_sproxyd') run('test_sproxyd')
def swift(swift_user): """ Bootstrap a SAIO installation. :param swift_user: the user to run swift as :type swift_user: string """ packages = [ 'curl', 'gcc', 'git-core', 'memcached', 'rsync', 'sqlite3', 'xfsprogs', 'git-core', 'libffi-dev', 'python-coverage', 'python-dev', 'python-simplejson', 'python-xattr', 'python-eventlet', 'python-greenlet', 'python-pastedeploy', 'python-netifaces', 'python-pip', 'python-dnspython', ] utils.apt_get(packages) # Add swift user sudo('useradd -r -s /usr/bin/nologin -d /srv -U {0:s}'.format(swift_user)) saio.disk_setup(swift_user) saio.install(swift_user) saio.setup_rsync(swift_user) saio.build_rings(swift_user) saio.start(swift_user)