예제 #1
0
 def __init__(self,
              net,
              ip,
              ro_ip,
              mongo_ip,
              kafka_ip,
              vca_host=os.environ.get('VCA_HOST'),
              vca_secret=os.environ.get('VCA_SECRET'),
              version='latest',
              name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker('{}lcm'.format(name_prefix),
                                   ip=ip,
                                   dimage=wrap_debian_like(
                                       'opensourcemano/lcm:%s' % version),
                                   volumes=['osm_packages:/app/storage'],
                                   environment={
                                       'OSMLCM_RO_HOST':
                                       ro_ip,
                                       'OSMLCM_VCA_HOST':
                                       vca_host,
                                       'OSMLCM_VCA_SECRET':
                                       vca_secret,
                                       'OSMLCM_DATABASE_URI':
                                       'mongodb://%s:27017' % mongo_ip,
                                       'OSMLCM_MESSAGE_HOST':
                                       kafka_ip,
                                   })
예제 #2
0
 def __init__(self, net, ip, mongo_ip, kafka_ip, version='latest', name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker(
         '{}nbi'.format(name_prefix), ip=ip, dimage=wrap_debian_like('opensourcemano/nbi:%s' % version),
         volumes=['osm_packages:/app/storage'],
         environment={'OSMNBI_DATABASE_URI': 'mongodb://%s:27017' % mongo_ip,
                      'OSMNBI_MESSAGE_HOST': kafka_ip})
     self._ip = self.instance.dcinfo['NetworkSettings']['IPAddress']
예제 #3
0
 def __init__(self, net, ip, db_ip, version='latest', name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker('{}ro'.format(name_prefix),
                                   ip=ip,
                                   dimage=wrap_debian_like(
                                       'opensourcemano/ro:%s' % version),
                                   environment={
                                       'RO_DB_HOST': db_ip,
                                       'RO_DB_ROOT_PASSWORD': '******'
                                   })
예제 #4
0
 def __init__(self,
              net,
              ip,
              zookeeper_ip,
              version='latest',
              name_prefix=''):
     OSMComponentBase.__init__(self)
     subnet_separator_index = ip.find('/')
     ip_without_subnet = ip if subnet_separator_index == -1 else ip[:
                                                                    subnet_separator_index]
     self.instance = net.addDocker(
         '{}kafka'.format(name_prefix),
         ip=ip,
         dimage='wurstmeister/kafka:%s' % version,
         environment={
             'KAFKA_ADVERTISED_HOST_NAME':
             ip_without_subnet,
             'KAFKA_ADVERTISED_PORT':
             '9092',
             'KAFKA_ZOOKEEPER_CONNECT':
             '%s:2181' % zookeeper_ip,
             'KAFKA_CREATE_TOPICS':
             'admin:1:1,ns:1:1,vim_account:1:1,wim_account:1:1,sdn:1:1,nsi:1:1'
         })
예제 #5
0
 def start(self):
     OSMComponentBase.start(self)
     wait_until('nc -z %s 9092' %
                self.instance.dcinfo['NetworkSettings']['IPAddress'])
예제 #6
0
 def start(self):
     OSMComponentBase.start(self)
     wait_until('nc -z %s 9999' % self._ip)
예제 #7
0
 def __init__(self, net, ip, version='5', name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker(
         '{}ro-db'.format(name_prefix), ip=ip, dimage=wrap_debian_like('mysql:%s' % version),
         environment={'MYSQL_ROOT_PASSWORD': '******'})
예제 #8
0
 def start(self):
     OSMComponentBase.start(self)
     time.sleep(3)
예제 #9
0
 def __init__(self, net, ip, version='latest', name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker('{}mongo'.format(name_prefix),
                                   ip=ip,
                                   dimage=wrap_debian_like('mongo:%s' %
                                                           version))
예제 #10
0
 def __init__(self, net, ip, version='latest', name_prefix=''):
     OSMComponentBase.__init__(self)
     self.instance = net.addDocker('{}zk'.format(name_prefix),
                                   ip=ip,
                                   dimage='wurstmeister/zookeeper:%s' %
                                   version)