Skip to content

Commit

Permalink
docs: Add install and run section
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored and arekkas committed Nov 18, 2017
1 parent 289c38a commit 87f0700
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
- [Quickstart](quickstart.md)
- [Installing ORY Oathkeeper](quickstart.md#installing-ory-oathkeeper)
- [Running ORY Oathkeeper](quickstart.md#running-ory-oathkeeper)
- [Concepts](concepts.md#concepts)
- [Terminology](concepts.md#terminology)
- [Rules](concepts.md#rules)
Expand Down
32 changes: 28 additions & 4 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
# Quickstart

This section covers how to get started using ORY Oathkeeper. ORY Oathkeeper has two servers that run on separate ports:
This section covers how to get started using ORY Oathkeeper.

## Installing ORY Oathkeeper

The only way to install ORY Oathkeeper currently is through [Docker Hub]. ORY Oathkeeper is a private docker repository
and to gain access to it you have create an ORY Gatekeeper instance at the [ORY Admin Console](https://admin.ory.am).

Once your account is authorized to access the repository, log in to docker using `docker login`. Then you should
be able to fetch the ory/oathkeeper image and also be able to see it on [Docker Hub](https://hub.docker.com/r/oryd/oathkeeper/).

To run any oathkeeper command, do:

```
$ docker run oryd/oathkeeper:v<version> <command>
```

for example (this guide is written for ORY Oathkeeper 0.0.20:

```
$ docker run oryd/oathkeeper:v0.0.20 help
```

## Running ORY Oathkeeper

ORY Oathkeeper has two servers that run on separate ports:

* The management server: This server is responsible for exposing the management REST API.
* The proxy server: This server is responsible for evaluating access requests and forwarding them to the backend.
Expand Down Expand Up @@ -52,7 +76,7 @@ $ hydra policies create -f policy.json
```

Now we are all set to boot up ORY Oathkeeper. Because we are using the in-memory database backend, we have to use
`oathkeeper serve all`, otherwise the proxy and management process would not be able to talk to each other:
`docker run oryd/oathkeeper:v0.0.20 serve all`, otherwise the proxy and management process would not be able to talk to each other:

```
# We assume that ORY Hydra is running on localhost:4444
Expand All @@ -68,7 +92,7 @@ $ export BACKEND_URL=http://my-api-endpoint-servers.com/
# This should be a proper database URL in production, see `hydra help serve proxy`
$ export DATABASE_URL=memory
$ oathkeeper serve all
$ docker run oryd/oathkeeper:v0.0.20 serve all
```

Now, we have a proxy listening on port 4455 and the management REST API at port 4456.
Now, we have a proxy listening on port 4455 and the management REST API at port 4456.

0 comments on commit 87f0700

Please sign in to comment.