Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] fix documentation after v2 branch removal #209

Merged
merged 2 commits into from
Jan 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You'll need to run the API gateway locally, either in docker or by compiling Ope
Run the docker container with custom configuration:

```shell
docker run --rm --publish-all --env THREESCALE_CONFIG_FILE=/config.json --volume $(pwd)/examples/configuration/multiservice.json:/config.json --name test-gateway-config quay.io/3scale/apicast:v2
docker run --rm --publish-all --env THREESCALE_CONFIG_FILE=/config.json --volume $(pwd)/examples/configuration/multiservice.json:/config.json --name test-gateway-config quay.io/3scale/apicast:master
```

And send to that docker image against that configuration:
Expand Down Expand Up @@ -147,4 +147,4 @@ message for the whole PR.

A commit, as much as possible, should be a single logical change. Each commit should always have a good title line (<70 characters) and include an additional
description paragraph describing in more detail the change intended. Do not link pull requests by `#` in a commit description, because GitHub creates lots of
spam. Instead, reference other PRs via the PR your commit is in.
spam. Instead, reference other PRs via the PR your commit is in.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##### Version

[provide output of the `nginx -V` or `openresty -V` command from openshift/local terminal]
[provide timestamp of the docker image from `docker inspect --format='{{.Created}}' quay.io/3scale/apicast:v2` ]
[provide timestamp of the docker image from `docker inspect --format='{{.Created}}' quay.io/3scale/apicast:master` ]

##### Steps To Reproduce

Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:
- PERL_CPANM_OPT="--local-lib=~/perl5"
- PERL_CARTON_PATH="~/local"
- TEST_NGINX_INIT_BY_LUA="pcall(require, 'luarocks.loader')"
- IMAGE_NAME="apicast:v2"
- IMAGE_NAME="apicast:master"
- TEST_NGINX_ERROR_LOG=tmp/nginx.log
- secure: LLEaIHNfFqblICN7o2KrThFAXAuIwmc1ZMvSVgd6CXDi5FAZNhtwl35hKNOUiyTdvAuDWrJT503UoCnEwrJeKKGbpcjBC6hIgaXy8+K1UU5zh47D7bzOkuXmSv/FrRl6bqfulD7kjERQEozj6DJleNbBHmUckc2j89pdXca9d7lBzYeFMJFDDKhnIVRdTVUSjd1ccQNyEdP1a74gUI5rxKK79ynHPKgF3OneYNZLySkASoud/8i/30uop8gKwqyavQVkMXlhEkAHY1CSHiKo5mUQ5NR5fBl7ZBCFeKJ2h8DQI+R3BHbaA/mzmnacTE8B+w03d8OylZQCDhYdfNqQWBWOO1V0fpYc860Nf6TfMWuCzIG4zbOrweubOM67Tmrfw7wg8FhdXZPxNjlHUIkAVutC7KqM/h9I8cVdwNyp026mCG0pxZ/OrpoJl++S7+bIWBmtR6lP3s78t3K/FG3a3JsIfUgdZuscVpjqKkJ9RkT1v8dWWJULLJONJMZa39lblS1amcw6ZQeL0z6ILJ5Zr0JSEbtPyC/CXErrtV610xnhmcKb9XNpWZmqRaTT6EXtl06kaDoz6PYmeNUvgGfHrOSEU49iK+poDCFOIYNRFQuuQEk63O94OKWI1gT8BbJEqoUkSLochXpuKmkK80ctNXfWefwPDhVv1LQqFwp9hsQ=
- secure: UtFN6c5cd7KEfqBanUEeNSBZ7WtTM4JEQYlQJIefcN41Duse3qSEjNs6uMtJWn6PVB1NPLAbbZ2lwbznI56M1gNQXdHrVjInK90fo28zftG+8iSYpbPEuYIvyDIvLXtCJx0TT09DOzU9g5a8psfqYhnC3N3uBwStXoLLlxjf3fu5JISVpIA1CzGOB0xVmrbybWNyvjZlf5PXBqaYlIEuxB/t0O68J3duaJZFDLNjJVDtwzuzGyGS+w+R6YcasRoEpB2iGpaAAGAdOPoKznZqLm9aY+rQkMmXvQWWDtN+vpe6HqlOmkSgZjY//vLN/Hc0CMKsKxZ78FEe6C3zhWE+z2nQuvsdHOQ9DEHms6uRN9oOswvE6iKhJlKCbEPn/6gFTja/DCh/hUrsszTQC6x4BurfZAg/qHH2LViDfc7zX+Mh22e2gRsUH+nl+UweuFgHmpXDDeJEdL/luEFB8oo/HScGUgmUBRRfwq6I7C35QIl7ah5mql0l8IIOO+R7aPP290zm4lW/g7RXbPxqedJQBNiEHGrosKygonoYvBjnx4LBu2Qdwq6GNAhlIvdOxf1am7ixiVQnGqQhkHUnS7SriJmafo7TO9mKhrdDuhNqXgirwC13wxCAGrSlDGNUzITCeyyLSrS6pH8L+4VsS5p0d2dx+9gSDlL0iNiIB3CxqLg=
Expand Down Expand Up @@ -55,7 +55,7 @@ script:
- make test-runtime-image
- make doc
after_success:
- if [ "${TRAVIS_BRANCH}" = "v2" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
- if [ "${TRAVIS_BRANCH}" = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}" quay.io;
make runtime-image;
make push;
Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

# **WARNING**: this is documentation for development branch, that might not be working at any point. To see stable version go to [`master` branch](https://github.com/3scale/apicast/tree/master).

APIcast is an NGINX based API gateway used to integrate your internal and external API services with 3scale’s API Management Platform.

To learn more about deployment options, environments provided, and how to get started, go to the [APIcast overview](doc/overview.md).

# APIcast

`v2` branch is **not stable** yet and **not recommended for production** use.
`master` branch is **not stable** and **not recommended for production** use. For the latest release, go to [Relases page](https://github.com/3scale/apicast/releases).

## Description

Expand All @@ -19,15 +16,15 @@ To run APIcast on OpenShift, just use template and create a Secret to point to y

```shell
oc secret new-basicauth threescale-portal-endpoint-secret --password=https://[email protected]
oc new-app -f https://raw.githubusercontent.com/3scale/apicast/v2/openshift/apicast-template.yml
oc new-app -f https://raw.githubusercontent.com/3scale/apicast/master/openshift/apicast-template.yml
```

## Docker

You can download a ready to use Docker image from our repository:

```shell
docker pull quay.io/3scale/apicast:v2
docker pull quay.io/3scale/apicast:master
```

The 3scale gateway image requires one of two environment variables. The first option will pull the latest gateway configuration from the 3scale API Manager. The second points to a local configuration file which has already been downloaded from 3scale:
Expand All @@ -40,15 +37,15 @@ Example: https://[email protected] (where the host name is t
When `THREESCALE_PORTAL_ENDPOINT` environment variable is provided, the gateway will download the configuration from the 3scale on initializing. The configuration includes all the settings provided on the Integration page of the API(s).

```shell
docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://[email protected] quay.io/3scale/apicast:v2
docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://[email protected] quay.io/3scale/apicast:master
```

* **THREESCALE_CONFIG_FILE**

Path to saved JSON file with configuration for the gateway. The configuration can be downloaded from the 3scale admin portal using the URL https://ACCOUNT-admin.3scale.net/admin/api/nginx/spec.json (replace `ACCOUNT` with your 3scale account name). The file has to be injected to the docker image as read only volume, and the path should indicate where the volume is mounted, i.e. path local to the docker container.

```shell
docker run --name apicast --rm -p 8080:8080 -v $(pwd)/config.json:/opt/app/config.json:ro -e THREESCALE_CONFIG_FILE=/opt/app/config.json quay.io/3scale/apicast:v2
docker run --name apicast --rm -p 8080:8080 -v $(pwd)/config.json:/opt/app/config.json:ro -e THREESCALE_CONFIG_FILE=/opt/app/config.json quay.io/3scale/apicast:master
```

In this example `config.json` is located in the same directory where the `docker` command is executed, and it is mounted as a volume at `/opt/app/config.json`. `:ro` indicates that the volume will be read-only.
Expand All @@ -58,7 +55,7 @@ The JSON file needs to follow the [schema](schema.json), see an [example file](e
In some 3scale plans it is possible to create multiple API services (see an [example of the configuration file](examples/configuration/multiservice.json)). The _optional_ **APICAST_SERVICES** environment variable allows filtering the list of services, so that the gateway only includes the services explicitly specified, the value of the variable should be a comma-separated list of service IDs. This setting is useful when you have many services configured on 3scale, but you want to expose just a subset of them in the gateway.

```shell
docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://[email protected] -e APICAST_SERVICES=1234567890987 quay.io/3scale/apicast:v2
docker run --name apicast --rm -p 8080:8080 -e THREESCALE_PORTAL_ENDPOINT=https://[email protected] -e APICAST_SERVICES=1234567890987 quay.io/3scale/apicast:master
```

### Docker options
Expand Down
2 changes: 1 addition & 1 deletion doc/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Both use the [s2i-openresty](https://github.com/3scale/s2i-openresty) builder im

## Release

`v2` branch is automatically built and pushed on every successful build [by Travis](https://github.com/3scale/apicast/blob/bc8631fcf91fcab25cae84152e16536ce01d22be/.travis.yml#L51-L56) to [`quay.io/3scale/apicast:v2`](https://quay.io/repository/3scale/apicast?tab=tags&tag=v2).
`master` branch is automatically built and pushed on every successful build [by Travis](https://github.com/3scale/apicast/blob/bc8631fcf91fcab25cae84152e16536ce01d22be/.travis.yml#L51-L56) to [`quay.io/3scale/apicast:master`](https://quay.io/repository/3scale/apicast?tab=tags&tag=master).



Expand Down
4 changes: 2 additions & 2 deletions doc/openshift-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ where `ec2-54-321-67-89.compute-1.amazonaws.com` is the Public Domain, and `54.3

4. Create an application for your APIcast Gateway from the template, and start the deployment:

<pre><code>oc new-app -f https://raw.githubusercontent.com/3scale/apicast/v2/openshift/apicast-template.yml</code></pre>
<pre><code>oc new-app -f https://raw.githubusercontent.com/3scale/apicast/master/openshift/apicast-template.yml</code></pre>

You should see a message indicating _deploymentconfig_ and _service_ have been successfully created.

Expand Down Expand Up @@ -304,7 +304,7 @@ APIcast v2 gateway has a number of parameters that can enable/disable different

You can specify the values for the parameters when creating a new application with `oc new-app` command using the `-p | --param` argument, for example:

<pre><code>oc new-app -f https://raw.githubusercontent.com/3scale/apicast/v2/openshift/apicast-template.yml -p APICAST_LOG_LEVEL=debug</code></pre>
<pre><code>oc new-app -f https://raw.githubusercontent.com/3scale/apicast/master/openshift/apicast-template.yml -p APICAST_LOG_LEVEL=debug</code></pre>

In order to change the parameters for an existing application, you can modify the environment variables values. Go to **Applications > Deployments > threescalegw** and select the _Environment_ tab.

Expand Down
4 changes: 2 additions & 2 deletions doc/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

APIcast v2 has a number of parameters configured as environment variables that can modify the behavior of the gateway. The following reference provides descriptions of these parameters.

Note that when deploying APIcast v2 with OpenShift, some of thee parameters can be configured via OpenShift template parameters. The latter can be consulted directly in the [template](https://raw.githubusercontent.com/3scale/apicast/v2/openshift/apicast-template.yml).
Note that when deploying APIcast v2 with OpenShift, some of thee parameters can be configured via OpenShift template parameters. The latter can be consulted directly in the [template](https://raw.githubusercontent.com/3scale/apicast/master/openshift/apicast-template.yml).

- `APICAST_CUSTOM_CONFIG`

Expand Down Expand Up @@ -115,6 +115,6 @@ Note that when deploying APIcast v2 with OpenShift, some of thee parameters can

When the gateway is deployed using Docker, the file has to be injected to the docker image as a read only volume, and the path should indicate where the volume is mounted, i.e. path local to the docker container.

You can find sample configuration files in [examples](https://github.com/3scale/apicast/tree/v2/examples/configuration) folder.
You can find sample configuration files in [examples](https://github.com/3scale/apicast/tree/master/examples/configuration) folder.

It is **required** to provide either `THREESCALE_PORTAL_ENDPOINT` or `THREESCALE_CONFIG_FILE` (takes precedence) for the gateway to run successfully.
2 changes: 1 addition & 1 deletion examples/add-ssl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ APIcast will read all `.conf` files in the `apicast.d` folder inside its prefix
## Starting Docker

```sh
docker run -it -v $(pwd)/apicast.d:/opt/app/apicast.d:ro -v $(pwd)/cert:/opt/app/conf/cert:ro --env THREESCALE_PORTAL_ENDPOINT=https://git.io/vXHTA --publish 8443:8443 quay.io/3scale/apicast:v2
docker run -it -v $(pwd)/apicast.d:/opt/app/apicast.d:ro -v $(pwd)/cert:/opt/app/conf/cert:ro --env THREESCALE_PORTAL_ENDPOINT=https://git.io/vXHTA --publish 8443:8443 quay.io/3scale/apicast:master
```

Mounts `cert` and `apicast.d` folder to the correct place and exposes port 8443 that the `ssl.conf` defines.
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Sometimes you might require injecting custom nginx configuration into the gatewa
That can be done very easily just with mounting a volume inside `sites.d` folder in the container:

```shell
docker run --publish 8080:8080 --volume $(pwd)/echo.conf:/opt/app/sites.d/echo.conf --env THREESCALE_PORTAL_ENDPOINT=http://portal.example.com quay.io/3scale/apicast:v2
docker run --publish 8080:8080 --volume $(pwd)/echo.conf:/opt/app/sites.d/echo.conf --env THREESCALE_PORTAL_ENDPOINT=http://portal.example.com quay.io/3scale/apicast:master
```

And then try a request:
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-module/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This example implements a module that extends apicast default one and adds more
APICAST_MODULE=$(pwd)/verbose.lua ../../bin/apicast -c $(pwd)/../configuration/local.json
```

This starts apicast with module `verbose.lua` instead of the default [`apicast.lua`](https://github.com/3scale/apicast/blob/v2/apicast/src/apicast.lua). Using local configuration so no 3scale account is needed.
This starts apicast with module `verbose.lua` instead of the default [`apicast.lua`](https://github.com/3scale/apicast/blob/master/apicast/src/apicast.lua). Using local configuration so no 3scale account is needed.

## Testing

Expand Down
2 changes: 1 addition & 1 deletion examples/oauth2/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '2'
services:
gateway:
image: quay.io/3scale/apicast:v2
image: quay.io/3scale/apicast:master
depends_on:
- redis
- oauth
Expand Down
4 changes: 2 additions & 2 deletions examples/s2i/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Source-to-image can be used to create Docker image with baked in customizations.
## Build

```sh
s2i build . quay.io/3scale/apicast:v2 my-image-name
s2i build . quay.io/3scale/apicast:master my-image-name
```

## Test
Expand All @@ -14,4 +14,4 @@ s2i build . quay.io/3scale/apicast:v2 my-image-name
docker run --ENV THREESCALE_CONFIG_FILE=config.json my-image-name
```

And container will start without any error messages.
And container will start without any error messages.
2 changes: 1 addition & 1 deletion openshift/apicast-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ parameters:
name: THREESCALE_GATEWAY_NAME
required: true
- description: "Docker image to use."
value: 'quay.io/3scale/apicast:v2'
value: 'quay.io/3scale/apicast:master'
name: THREESCALE_GATEWAY_IMAGE
required: true
- description: "DNS Resolver for openresty, if empty it will be autodiscovered"
Expand Down