Giter Club home page Giter Club logo

grafeas-docker's Introduction

grafeas-docker

This is a Docker Compose project to provide a self contained instance of Google's Grafeas server using a Postgres SQL as the persistence layer.

Getting Started

The quickest way to get started, if you just want a Grafeas server to experiment with, is the Docker Compose method, below.

There is also a Makefile, which is working towards something that can be used in production, but it isn't working yet.

Prerequisites

You will require a current version of Docker and Docker Compose, and a means to test the Grafeas server such as their Python or Go client libraries. Using cURL may be sufficient for your needs, too..

Installing

Using the Docker Compose Method

The Docker Compose file requires an environment file to pass in the passwords for Postgres and Grafeas. They will get configured on first execution of the application, and then used thereafter.

Create the .env file and generate passwords like so:

tee .env > /dev/null <<EOF
POSTGRES_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;)
GRAFEAS_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16};echo;)
EOF

Now build the images and run the containers:

$ docker-compose build
$ docker-compose up

The Grafeas server will now be exposed on 'localhost:8080'.

Using the Makefile - **WIP, broken**

WIP: If you put passwords into the *PASSWORD* vars in the Makefile, run make generate-db-init-script and then make run it might work!

Clone the repository and from within the root directory execute the following sequence of commands:

  • To build the Grafeas image and to generate the Postgres initialisation script run:

make build

  • If you have not set up the Grafeas network run:

make run-prod-network

  • To run the Grafeas server and the Postgres database run:

make run

There is also a utility script called 'run_local_postgres.sh' that will do the following:

  1. Run the Postgres image locally (as 'postgres_local') and expose port 5432 on the Grafeas network.
  2. Run the very useful PGAdmin tool on port 8888 to allow debugging of Grafeas database transactions.

Built With

This software was built and tested on MacOS High Sierra using:

  • Docker for Mac 18.03 CE
  • Docker Compose 1.21

Subsequent modifications were built and tested on Arch Linux using:

  • Docker 18.05.0-ce
  • Docker Compose 1.22.0

...and used in workshop on CentOS 7 using:

  • Docker 17.06.02
  • Docker Compose 1.11.2

Dependencies

Contributing

Pull requests and suggestions are welcome; please submit via GitHub.

Versioning

No release version exists yet, use the 'master' branch.

Authors

Colin Domoney @colindomoney Luke Bond @lukebond

License

This software is released under the MIT licence

Acknowledgments

grafeas-docker's People

Contributors

createk-design avatar lukebond avatar

Watchers

Aysylu Greenberg avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.