コード例 #1
0
ファイル: OpenLDAP.py プロジェクト: StratusLab/client
    def __init__(self, configHolder):
        configHolder.assign(self)
        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)

        self._serviceName = 'slapd'
        self._packages = ['stratuslab-openldap-support']

        self._sharepath = '/usr/share/stratuslab/registration-openldap'

        self._sysconfigLdap = '/etc/sysconfig/ldap'
        self._sysconfigLdapTemplate = '%s/sysconfig/ldap' % self._sharepath

        self._testCertCmd = '%s/scripts/generate-self-signed-certificate.sh' % self._sharepath
        self._certConfigLdif = '%s/ldif/certificates-config.ldif' % self._sharepath

        self._ldapClientConfig = '/etc/openldap/ldap.conf'

        self._openLdapConfig = '/etc/openldap/slapd.d/cn=config/olcDatabase={0}config.ldif'
        self._accessValue  = 'olcAccess: {0}to * by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage by * none'

        self._databaseTemplate = '%s/ldif/cloud-db-defn.ldif' % self._sharepath
        self._completeDatabaseTemplate = 'cloud-db-defn.ldif'

        self._cloudDatabaseSkeleton = '%s/ldif/cloud-data.ldif' % self._sharepath

        self._openLdapAdminDn = 'cn=admin,o=cloud'

        self._nodename = 'localhost'
コード例 #2
0
ファイル: PersistentDisk.py プロジェクト: StratusLab/client
    def __init__(self, configHolder=ConfigHolder()):
        self.persistentDiskDbHost = 'localhost'

        self.configHolder = configHolder
        self.configHolder.assign(self)

        self.profile = None # Can be frontend or node
        self.system = SystemFactory.getSystem(self.persistentDiskSystem,
                                              self.configHolder)

        # Package to be installed
        self.packages = {'frontend': {
            'pdisk': ['stratuslab-pdisk-server', ],
            'iscsi': ['scsi-target-utils', 'iscsi-initiator-utils'],
            'nfs': ['nfs-utils', 'nfs-utils-lib'],
            'lvm': ['lvm2', ],
            'file': ['qemu-img'],
        },
                         'node': {
                             'pdisk': ['stratuslab-pdisk-host', ],
                             'iscsi': ['iscsi-initiator-utils', ],
                             'nfs': ['nfs-utils', 'nfs-utils-lib'],
                             'lvm': [],
                             'file': [],
                         },
        }

        self.pdiskConfigBackendTpl = Util.get_template_file([self.PDISK_BACKEND_CONF_NAME + '.tpl'])
        self.authnConfigFile = Defaults.AUTHN_CONFIG_FILE
        self.pdiskConfigFile = os.path.join(Defaults.ETC_DIR, 'pdisk.cfg')
        self.pdiskHostConfigFile2 = os.path.join(Defaults.ETC_DIR, 'pdisk-host.conf')
        self.pdiskHomeDir = '/opt/stratuslab/storage/pdisk'
        self.cloudNodeKey = os.path.join(self.pdiskHomeDir, 'cloud_node.key')
        self.pdiskUsername = '******'
        self.pdiskPassword = self._extractPdiskPassword()
コード例 #3
0
ファイル: CouchbaseClient.py プロジェクト: StratusLab/client
    def __init__(self, configHolder):
        configHolder.assign(self)
        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)

        self._pkgs = ['libcouchbase2-libevent', 'libcouchbase-devel']
        self._deps = ['python-pip', 'gcc']

        self._repofile = '/etc/yum.repos.d/couchbase.repo'
        self._repourl = 'http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo'
コード例 #4
0
ファイル: CouchbaseClient.py プロジェクト: remyd1/client
    def __init__(self, configHolder):
        configHolder.assign(self)
        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)

        self._pkgs = ["libcouchbase2-libevent", "libcouchbase-devel"]
        self._deps = ["python-pip", "gcc"]

        self._repofile = "/etc/yum.repos.d/couchbase.repo"
        self._repourl = "http://packages.couchbase.com/rpm/couchbase-centos62-x86_64.repo"
コード例 #5
0
ファイル: CouchbaseServer.py プロジェクト: StratusLab/client
    def __init__(self, configHolder):
        configHolder.assign(self)
        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)

        self._serviceName = 'couchbase-server'
        self._packages = ['couchbase-server']

        self._cb_cluster_username = '******'
        self._cb_cluster_password = CouchbaseServer._generate_password()
        self._cb_cluster_password_path = '/opt/couchbase/cluster-password.txt'
コード例 #6
0
ファイル: PortTranslation.py プロジェクト: StratusLab/client
    def __init__(self, configHolder=ConfigHolder()):
        self.configHolder = configHolder
        self.configHolder.assign(self)

        self.system = SystemFactory.getSystem(self.frontendSystem, self.configHolder)
        self.runtime = datetime.datetime.now()

        self._setDefaultConfiguration()
        self._setFirewallConfiguration()
        self._setSudoConfiguration()
        self._setCloudConfiguration()
コード例 #7
0
ファイル: Sunstone.py プロジェクト: StratusLab/client
    def __init__(self, configHolder=ConfigHolder()):

        self.configHolder = configHolder
        self.configHolder.assign(self)

        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)
        
        self.packages = ['lighttpd', 'rubygem-json', 'ruby-sqlite3']
        self.ruby_gems = ['sinatra']

        self.sunstone_cfg = '/etc/one/sunstone-server.conf'
        self.lighttpd_cfg = '/etc/lighttpd/lighttpd.conf'
        self.lighttpd_cert = '/etc/lighttpd/server.pem'
コード例 #8
0
 def _setFrontendSystem(self):
     if not self.frontendIp or self.frontendIp == "127.0.0.1":
         printWarning("frontend_ip configuration parameter is %s, this is very likely not to work" % self.frontendIp)
     self.frontend = SystemFactory.getSystem(self.frontendSystem, self.configHolder)
コード例 #9
0
ファイル: Consolidation.py プロジェクト: StratusLab/client
 def __init__(self, configHolder):
     configHolder.assign(self)
     self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)
     self.packages = ['stratuslab-consolidation']
コード例 #10
0
ファイル: CIMI.py プロジェクト: StratusLab/client
    def __init__(self, configHolder):
        configHolder.assign(self)
        self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)

        self._serviceName = 'cimi'
        self._package = 'stratuslab-cimi-server'
コード例 #11
0
ファイル: OpenNebulaNode.py プロジェクト: StratusLab/client
 def _setNodeSystem(self):
     if self.nodeAddr:
         self.node = SystemFactory.getSystem(self.nodeSystem, self.configHolder)
         self.node.workOnNode()