Ejemplo n.º 1
0
def build_image(name):
    project = Project.get_by_name(name)
    if not project:
        abort(404)

    revisions = _get_project_commits(project.git)
    pods = eru.list_group_pods(g.user.group)
    base_images = BaseImage.list_all()
    return render_template(
        '/deploy/projects/build_image.html', project=project,
        revisions=revisions, pods=pods, base_images=base_images)
Ejemplo n.º 2
0
def deploy_container(name):
    images = eru.list_app_images(name)
    image_names = [i['image_url'] for i in images]

    envs = eru.list_app_env_names(name)['data']
    pods = eru.list_group_pods(g.user.group)
    networks = eru.list_network()

    return render_template('/deploy/projects/deploy_container.html',
            images=image_names, envs=envs, pods=pods, name=name,
            networks=networks)
Ejemplo n.º 3
0
def create():
    if request.method == 'GET':
        images = eru.list_app_images(APPNAME_ERU_LB)
        image_names = [i['image_url'] for i in images]
        pods = eru.list_group_pods(g.user.group)
        envs = eru.list_app_env_names(APPNAME_ERU_LB)['data']
        return render_template('/lb/create.html', appname=APPNAME_ERU_LB,
                images=image_names, envs=envs, pods=pods)

    pod = request.form['pod']
    host = request.form['host']
    return _create_lb_container(pod, host)