murano-agent/api/doc/source/index.rst

3.3 KiB

Welcome to Glazier API Service!

Glazier API is a project that provides access to engine via API.

This document describes Glazier API for contributors of the project, and assumes that you are already familiar with Glazier API from an end-user perspective.

This documentation is generated by the Sphinx toolkit and lives in the source tree.

Installation Guide

Install

  1. Check out sources to some directory (<home>/glazier):

    user@work:~/$ git clone ssh://<user>@gerrit.mirantis.com:29418/keero/keero.git
  2. Install Glazier API:

    user@work:~/$ cd glazier/api && sudo python setup.py install

Configure

  1. Open first configuration file for editing:

    user@work:~/$ cd glazier/api/etc && nano glazier-api.conf
  2. Configure according to you environment (please note rabbitmq section):

    [DEFAULT]
    # Show more verbose log output (sets INFO log level output)
    verbose = True
    # Show debugging output in logs (sets DEBUG log level output)
    debug = True
    # Address to bind the server to
    bind_host = 0.0.0.0
    # Port the bind the server to
    bind_port = 8082
    # Log to this file. Make sure the user running skeleton-api has
    # permissions to write to this file!
    log_file = /tmp/glazier-api.log
    #A valid SQLAlchemy connection string for the metadata database
    sql_connection = sqlite:///glazier.sqlite
    
    [reports]
    results_exchange = task-results
    results_queue = task-results
    reports_exchange = task-reports
    reports_queue = task-reports
    
    [rabbitmq]
    host = localhost
    port = 5672
    virtual_host = keero
    login = keero
    password = keero
  3. Open second configuration file for editing:

    smelikyan@work:~/cd glazier/api/etc && nano glazier-api.conf
  4. Configure according to you environment (please note filter:authtoken section):

    [pipeline:glazier-api]
    pipeline = authtoken context apiv1app
    [app:apiv1app]
    paste.app_factory = glazierapi.api.v1.router:API.factory
    [filter:context]
    paste.filter_factory = glazierapi.api.middleware.context:ContextMiddleware.factory
    
    [filter:authtoken]
    paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
    auth_host = localhost
    auth_port = 35357
    auth_protocol = http
    admin_tenant_name = admin
    admin_user = admin
    admin_password = password
    signing_dir = /tmp/keystone-signing-glazierapi

Run

Run Glazier API and supply valid configuration file:

user@work:~/$ glazier-api --config-file=./glazier/api/etc/glazier-api.conf

Man Pages

man/glazierapi