forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These changes contain a redesign of the OPA website. The main changes are (1) new frontpage w/ refreshed messaging and assets and (2) docs ported to gitbook.
- Loading branch information
1 parent
326cb91
commit 25ba04c
Showing
363 changed files
with
10,126 additions
and
3,258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ coverage | |
opa_* | ||
.Dockerfile_* | ||
_release | ||
site.tar.gz | ||
|
||
# runtime artifacts | ||
policies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
FROM golang:GOVERSION | ||
|
||
RUN echo 'deb http://deb.nodesource.com/node_6.x jessie main' > /etc/apt/sources.list.d/nodesource.list | ||
RUN echo 'deb-src http://deb.nodesource.com/node_6.x jessie main' >> /etc/apt/sources.list.d/nodesource.list | ||
|
||
RUN apt-get update -y \ | ||
&& apt-get install -y -q --no-install-recommends \ | ||
ruby \ | ||
ruby-dev \ | ||
&& apt-get install -y -q --force-yes --no-install-recommends \ | ||
nodejs \ | ||
locales \ | ||
&& gem update --system \ | ||
&& gem install jekyll \ | ||
autoprefixer-rails \ | ||
jekyll-assets \ | ||
jekyll-contentblocks \ | ||
jekyll-minifier \ | ||
&& rm -fr /var/lib/apt/lists/* /var/cache/* | ||
|
||
RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen && locale-gen | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
RUN npm install -g gitbook-cli gulp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
# Open Policy Agent | ||
#  Open Policy Agent | ||
|
||
The Open Policy Agent (OPA) is an open source project that helps policy-enable your service. By integrating with OPA, your service's operators will be empowered to manage the size, complexity, and dynamic nature of modern deployments. | ||
The Open Policy Agent (OPA) is an open source, general-purpose policy engine | ||
that enables unified, context-aware policy enforcement across the entire stack. | ||
|
||
## Want to learn about OPA? | ||
|
||
- See [openpolicyagent.org](http://www.openpolicyagent.org) to get started. | ||
- Join the conversation on [Slack](http://slack.openpolicyagent.org). | ||
- See [openpolicyagent.org](http://www.openpolicyagent.org) to get started. | ||
- See [blog.openpolicyagent.org](https://blog.openpolicyagent.org) for blog posts about OPA and policy. | ||
- Join the conversation on [Slack](http://slack.openpolicyagent.org). | ||
|
||
## Want to get OPA? | ||
|
||
See [Get OPA](http://www.openpolicyagent.org/get-opa/) for releases. | ||
See [GitHub releases](https://github.com/open-policy-agent/opa/releases) for binary releases. | ||
|
||
## Want to build OPA? | ||
|
||
See [DEVELOPMENT.md](./docs/DEVELOPMENT.md) for development environment setup and build instructions. | ||
See [DEVELOPMENT.md](./docs/devel/DEVELOPMENT.md) for development environment setup and build instructions. | ||
|
||
## Helpful Links | ||
|
||
- License: [Apache Version 2.0](https://raw.githubusercontent.com/open-policy-agent/opa/master/LICENSE) | ||
- Bugs: [Github Issues](https://github.com/open-policy-agent/opa/issues) | ||
- Features: [Github Issues](https://github.com/open-policy-agent/opa/issues) | ||
- Discussions: [Google Groups](https://groups.google.com/forum/?hl=en#!forum/open-policy-agent) [](http://slack.openpolicyagent.org) | ||
- Documentation: [Introduction](http://www.openpolicyagent.org/documentation/what-is-policy-enablement/), [Tutorials](http://www.openpolicyagent.org/tutorials/working-with-the-opa-repl/), [](https://godoc.org/github.com/open-policy-agent/opa) | ||
- Discussions: [](http://slack.openpolicyagent.org) | ||
- Documentation: [Introduction](http://www.openpolicyagent.org/docs/), [Tutorials](http://www.openpolicyagent.org/docs/get-started.html), [](https://godoc.org/github.com/open-policy-agent/opa) | ||
- Continuous Integration: [](https://travis-ci.org/open-policy-agent/opa) [](https://goreportcard.com/report/open-policy-agent/opa) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
# Script to build OPA static site. Assumes execution environment is release builder. | ||
|
||
set -ex | ||
|
||
pushd `dirname $0` >/dev/null | ||
OPA_DIR=$(pwd -P)/.. | ||
popd > /dev/null | ||
|
||
usage() { | ||
echo "build-docs.sh --output-dir=<path> [--serve=<port>]" | ||
} | ||
|
||
for i in "$@"; do | ||
case $i in | ||
--output-dir=*) | ||
OUTPUT_DIR="${i#*=}" | ||
shift | ||
;; | ||
--serve=*) | ||
PORT="${i#*=}" | ||
shift | ||
;; | ||
*) | ||
usage | ||
exit 1 | ||
esac | ||
done | ||
|
||
if [ -z "$OUTPUT_DIR" ]; then | ||
usage | ||
exit 2 | ||
fi | ||
|
||
# build docs | ||
cd $OPA_DIR/docs/book | ||
gitbook install | ||
gitbook build | ||
|
||
# build front page | ||
cd $OPA_DIR/docs | ||
npm install | ||
gulp build | ||
|
||
# save output | ||
tar czvf $OUTPUT_DIR/site.tar.gz -C $OPA_DIR/docs/_site/ . | ||
|
||
if [ -n "$PORT" ]; then | ||
cd $OPA_DIR/docs/_site; python -m SimpleHTTPServer $PORT | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
_book | ||
_site | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright 2015 IBM Corp. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
'use strict'; | ||
|
||
var gulp = require('gulp'); | ||
var wrench = require('wrench'); | ||
|
||
/** | ||
* This will load all js or coffee files in the gulp directory | ||
* in order to load all gulp tasks | ||
*/ | ||
wrench.readdirSyncRecursive('./gulp').filter(function gulFile(file) { | ||
return (/\.(js|coffee)$/i).test(file); | ||
}).map(function requireGulp(file) { | ||
require('./gulp/' + file); | ||
}); | ||
|
||
gulp.task('default', ['serve']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Docs | ||
|
||
This directory contains all of the Markdown, HTML, CSS, and other assets needed | ||
to build the [openpolicyagent.org](http://openpolicyagent.org) site. See the | ||
section below for steps to build the site and test documentation changes | ||
locally. | ||
|
||
The raw OPA documentation can be found under the [book](./book) directory. | ||
|
||
For development documentation see the [devel](./devel) directory. | ||
|
||
## Site Updates | ||
|
||
We use GitHub pages to host the website that includes all of the OPA | ||
documentation. In order to update the website, you need to have write permission | ||
on the open-policy-agent/opa repository. | ||
|
||
### Prerequisites | ||
|
||
If you want to build and serve the site locally, you need the following packages | ||
installed on your system: | ||
|
||
- npm | ||
- [gulp](http://gulpjs.com/) | ||
- [gitbook](https://github.com/GitbookIO/gitbook) | ||
|
||
### Build and preview the docs locally | ||
|
||
``` | ||
cd book | ||
gitbook install | ||
gitbook serve | ||
``` | ||
|
||
> This will build the docs under `./book/_book`. | ||
### Build and preview the entire site (front page and docs) locally | ||
|
||
``` | ||
cd book; gitbook install; gitbook build; cd .. | ||
npm install | ||
gulp copy-book | ||
gulp serve | ||
``` | ||
|
||
### Build and preview (only) the front page locally | ||
|
||
``` | ||
npm install | ||
gulp | ||
``` | ||
|
||
### Build site for release | ||
|
||
From the root directory: | ||
|
||
``` | ||
make docs | ||
``` | ||
|
||
This will also serve the site on port 4000. The site will be saved to | ||
`site.tar.gz` in the root directory. | ||
|
||
### Update the website | ||
|
||
Unzip the `site.tar.gz` file produced by building the site into the `gh-pages` | ||
of this repository, add and commit the changes, and then push. |
Oops, something went wrong.