当前位置: 首页>>代码示例>>Python>>正文


Python Compose.up方法代码示例

本文整理汇总了Python中charms.docker.compose.Compose.up方法的典型用法代码示例。如果您正苦于以下问题:Python Compose.up方法的具体用法?Python Compose.up怎么用?Python Compose.up使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在charms.docker.compose.Compose的用法示例。


在下文中一共展示了Compose.up方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run_rancherserver

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def run_rancherserver():
    # Render teh template
   cfg = config()
   render('docker-compose.yml', 'files/rancherserver/docker-compose.yml', cfg)

   comp = Compose('files/rancherserver')
   comp.up()
开发者ID:cloudguru-bb,项目名称:pub-charms,代码行数:9,代码来源:rancherserver.py

示例2: start_cadvisor

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_cadvisor():
    '''Start the cAdvisor container that gives metrics about the other
    application containers on this system. '''
    compose = Compose('files/kubernetes')
    compose.up('cadvisor')
    set_state('cadvisor.available')
    status_set('active', 'cadvisor running on port 8088')
    hookenv.open_port(8088)
开发者ID:AzTron,项目名称:kubernetes,代码行数:10,代码来源:k8s.py

示例3: start_drone

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_drone():
    cfg = config()
    if not cfg.get('github_secret') or not cfg.get('github_client'):
        status_set('blocked', 'Requires DVCS credentials - see charm config')
        return
    render('docker-compose.yml', 'files/drone/docker-compose.yml', {})
    render('drone.env', 'files/drone/drone.env', cfg)
    compose = Compose('files/drone')
    compose.up()
    hookenv.open_port(80)
    status_set('active', 'Drone running.')
开发者ID:chuckbutler,项目名称:layer-drone,代码行数:13,代码来源:drone.py

示例4: run_ems

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def run_ems():
    # authenticate to private docker repository
    d = Docker()
    cfg = config()
    d.login(cfg['distribution-user'], cfg['distribution-pass'],
            cfg['distribution-email'])

    # Render the template
    render('docker-compose.yml', 'files/ems/docker-compose.yml', cfg)

    comp = Compose('files/ems')
    comp.up()
开发者ID:cloudguru-bb,项目名称:pub-charms,代码行数:14,代码来源:ems.py

示例5: start_rabbitmq

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_rabbitmq():
    ''' Starts a RabbitMQ application'''

    # Render the formation
    cfg = config()
    render('docker-compose.yml', 'files/rabbitmq/docker-compose.yml', cfg)

    # Initialize the docker compose object, looking @ our work directory
    compose = Compose('files/rabbitmq')

    # Launch the service(s)
    status_set('maintenance', "Fetching / Starting the rabbitmq containers")
    compose.up()
    status_set('active', 'Redmine is running on port 5672, 15672 and 1883')
开发者ID:SaMnCo,项目名称:docker-apps,代码行数:16,代码来源:rabbitmq.py

示例6: start_redmine

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_redmine():
    ''' Starts a Redmine application in standalone configuration'''

    # Render the formation
    cfg = config()
    render('docker-compose.yml', 'files/redmine/docker-compose.yml', cfg)

    # Initialize the docker compose object, looking @ our work directory
    compose = Compose('files/redmine')

    # Launch the service(s)
    status_set('maintenance', "Fetching / Starting the redmine containers")
    compose.up()
    status_set('active', 'Redmine is running on port 10030')
开发者ID:chuckbutler,项目名称:master,代码行数:16,代码来源:redmine.py

示例7: master

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def master(etcd):
    '''Install and run the hyperkube container that starts kubernetes-master.
    This actually runs the kubelet, which in turn runs a pod that contains the
    other master components. '''
    render_files(etcd)
    # Use the Compose class that encapsulates the docker-compose commands.
    compose = Compose('files/kubernetes')
    status_set('maintenance', 'Starting the Kubernetes kubelet container.')
    # Start the Kubernetes kubelet container using docker-compose.
    compose.up('kubelet')
    set_state('kubelet.available')
    # Open the secure port for api-server.
    hookenv.open_port(6443)
    status_set('maintenance', 'Starting the Kubernetes proxy container')
    # Start the Kubernetes proxy container using docker-compose.
    compose.up('proxy')
    set_state('proxy.available')
    status_set('active', 'Kubernetes started')
开发者ID:AzTron,项目名称:kubernetes,代码行数:20,代码来源:k8s.py

示例8: start_kubelet

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_kubelet(etcd):
    '''Run the hyperkube container that starts the kubernetes services.
    When the leader, run the master services (apiserver, controller, scheduler,
    proxy)
    using the master.json from the rendered manifest directory.
    When a follower, start the node services (kubelet, and proxy). '''
    render_files(etcd)
    # Use the Compose class that encapsulates the docker-compose commands.
    compose = Compose('files/kubernetes')
    status_set('maintenance', 'Starting the Kubernetes services.')
    if is_leader():
        compose.up('master')
        compose.up('proxy')
        set_state('kubelet.available')
        # Open the secure port for api-server.
        hookenv.open_port(6443)
    else:
        # Start the Kubernetes kubelet container using docker-compose.
        compose.up('kubelet')
        set_state('kubelet.available')
        # Start the Kubernetes proxy container using docker-compose.
        compose.up('proxy')
        set_state('proxy.available')
    status_set('active', 'Kubernetes services started')
开发者ID:mbruzek,项目名称:layer-k8s,代码行数:26,代码来源:k8s.py

示例9: start_logspout

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def start_logspout():
    compose = Compose('files/logspout')
    compose.up()
    remove_state('logspout.ready')
    status_set('active', 'Logspout running')
开发者ID:mbruzek,项目名称:layer-logspout,代码行数:7,代码来源:logspout.py

示例10: run_scope

# 需要导入模块: from charms.docker.compose import Compose [as 别名]
# 或者: from charms.docker.compose.Compose import up [as 别名]
def run_scope():
    compose = Compose('files/scope')
    compose.up()
    hookenv.open_port(4040)
    hookenv.status_set('active', 'Weave Started. Visit me on port 4040')
    reactive.set_state('scope.started')
开发者ID:juju-solutions,项目名称:layer-scope,代码行数:8,代码来源:weave.py


注:本文中的charms.docker.compose.Compose.up方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。