Skip to content

judavi/grafeas-oracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grafeas - Oracle

Build Status

This project provides a Grafeas implementation that supports using Oracle as a storage mechanism.

Building

Build using the provided Makefile or via Docker.

# Either build via make
make build

# or docker
docker build --rm .

Unit tests

Testing is performed against a Oracle instance. To make the thisngs easier I'm using

 docker run -d -p 1521:1521 quay.io/maksymbilenko/oracle-12c

Also you can run the docker-compose.yml to start an instance with DB included

cd test
docker-compose build
docker-compose up

Configuring

The server looks for a configuration file that is passed in via the --config argument. That file should be in YAML format and follows the specification laid down by the main Grafeas project.

For example:

  oracle:
    # Database host
    host: "localhost:49162"
    # Database name
    dbname: "xe"
    # Database username
    user: "system"
    # Database password
    password: "oracle"
    paginationkey: "JGMZNCmpDjpN2Jz10wMcF9kXc1vM8QC1nuxHB2gjIgY="

The complete config.yaml will looks like:

grafeas:
  api:
    # Endpoint address
    address: "0.0.0.0:8080"
    # PKI configuration (optional)
    cafile: 
    keyfile: 
    certfile: 
    # CORS configuration (optional)
    cors_allowed_origins:
      # - "http://example.net"
  storage_type: oracle
  oracle:
    # Database host
    host: "localhost:49162"
    # Database name
    dbname: "xe"
    # Database username
    user: "system"
    # Database password
    password: "oracle"
    paginationkey: "JGMZNCmpDjpN2Jz10wMcF9kXc1vM8QC1nuxHB2gjIgY="

The configuration file is specified by way of the --config argument

--config /path/to/config.yaml

Contributing

Pull requests welcome.

Special thanks

Thanks to Jhon-tipper and his awesome implementation of DynamoDB and the Grafeas Team

License

Grafeas-oracle is under the Apache 2.0 license. See the LICENSE file for details.