github.com/jbking/gohan@v0.0.0-20151217002006-b41ccf1c2a96/tests/test_worker.yaml (about)

     1  #######################################################
     2  #  Gohan API Server example configuraion
     3  ######################################################
     4  
     5  # Sample Configuraion for testing worker condition we get 401 from etcd
     6  # TODO(nati) automate this
     7  #
     8  # How to test worker
     9  # (1) Start gohan
    10  #   gohan server --config-file tests/test_worker.yaml
    11  # (2) Start etcd
    12  #   etcd
    13  # (3) Watch result
    14  #   watch wc tests/worker_test.log
    15  # (4) Create 10000 resources
    16  #   seq 1 10000 | xargs -I% gohan client network create
    17  # (5) Test get success  if you see 10000 lines in worker_test.log
    18  # (6) Restart gohan
    19  # (7) You should be able to see 20000 lines after some time
    20  
    21  
    22  # database connection configuraion
    23  database:
    24      # yaml, json, sqlite3 and mysql supported
    25      # yaml and json db is for schema development purpose
    26      type: "sqlite3"
    27      # connection string
    28      # it is file path for yaml, json and sqlite3 backend
    29      connection: "./gohan.db"
    30  # schema path
    31      drop_on_create: true
    32  schemas:
    33      - "../etc/schema/gohan.json"
    34      - "../etc/extensions/gohan_extension.yaml"
    35      - "./test_worker_extension.yaml"
    36      - "../etc/example_schema.yaml"
    37  
    38  editable_schema: ./example_schema.yaml
    39  
    40  # listen address for gohan
    41  address: ":9091"
    42  tls:
    43      # browsers need to add exception as long as we use self-signed certificates
    44      # so lets leave it disabled for now
    45      enabled: false
    46      key_file: ./keys/key.pem
    47      cert_file: ./keys/cert.pem
    48  # document root of gohan API server
    49  # Note: only static and schema directoriy will be served
    50  document_root: "."
    51  # list of etcd backend servers
    52  etcd:
    53      - "http://127.0.0.1:4001"
    54  # keystone configuraion
    55  keystone:
    56      use_keystone: true
    57      fake: true
    58      auth_url: "https://localhost:9091/v2.0"
    59      user_name: "admin"
    60      tenant_name: "admin"
    61      password: "gohan"
    62  # CORS (Cross-origin resource sharing (CORS)) configuraion for javascript based client
    63  cors: "*"
    64  
    65  # allowed levels  "CRITICAL", "ERROR", "WARNING", "NOTICE", "INFO", "DEBUG",
    66  logging:
    67      stderr:
    68          enabled: true
    69          level: INFO
    70      file:
    71          enabled: true
    72          level: INFO
    73          filename: ./gohan.log
    74  
    75  watch:
    76      keys:
    77        - config/v2.0/
    78      # Watch entire key
    79      events:
    80        - config/v2.0/networks
    81        # kick extension which meets extension path
    82      worker_count: 10