Exemplo n.º 1
0
def testing():
    """Local testing environment"""
    env.docker = DockerClientWrapper('unix://var/run/docker.sock')
    bootstrap_environment('testing')
    env.project_path = '/home/{user}/jenkins-test'.format(**env)
    env.map_client = MappingDockerClient(
        env.container_map,
        env.container_config,
        clients={'__default__': env.container_config})
    env.run = local
Exemplo n.º 2
0
def locally():
    """Local development environment"""
    env.docker = DockerClientWrapper('unix://var/run/docker.sock')
    bootstrap_environment('local')
    env.project_path = '/home/{user}/{{cookiecutter.app_name}}'.format(**env)
    env.map_client = MappingDockerClient(
        env.container_map,
        env.container_config,
        clients={'__default__': env.container_config})
    env.run = local
Exemplo n.º 3
0
def production():
    """Remote production environment"""
    env.docker = docker_fabric()
    bootstrap_environment('production')
    env.project_path = '/home/{user}/{{cookiecutter.app_name}}'.format(**env)
    env.forward_agent = True
    env.map_client = container_fabric(env.container_map)
    env.run = run
    env.roledefs = {
        'web': ['{user}@{site_url}'.format(**env)],
    }
Exemplo n.º 4
0
def development():
    """Remote staging/development environment"""
    env.docker = docker_fabric()
    bootstrap_environment('development')
    env.project_path = '/home/{user}/jenkins-test'.format(**env)
    env.forward_agent = True
    env.map_client = container_fabric(env.container_map)
    env.run = run
    env.roledefs = {
        'web': ['{user}@{site_url}'.format(**env)],
    }