-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
318 additions
and
69 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
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 +1 @@ | ||
0.6.2 | ||
0.7.0 |
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
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,2 +1,2 @@ | ||
GAFFER_VERSION=1.12.0 | ||
GAFFER_TOOLS_VERSION=1.12.0 | ||
GAFFER_VERSION=1.13.4 | ||
GAFFER_TOOLS_VERSION=1.13.1 |
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
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,62 @@ | ||
Adding your own libraries and functions | ||
======================================= | ||
By default with the Gaffer deployment you get access to the: | ||
* Sketches library | ||
* JCS cache library | ||
|
||
If you want more libraries than this (either one of ours of one of your own) you'll need to customise the docker images and use them in place of the defaults. | ||
|
||
You'll need a basic Gaffer instance deployed on Kubernetes. Here's [how to do that](./deploy-empty-graph.md). | ||
|
||
### Overwrite the REST war file | ||
At the moment, Gaffer uses a WAR file with all the dependencies bundled in. You'll need to extend the WAR file using [these instructions](https://gchq.github.io/gaffer-doc/components/rest-api.html#how-to-modify-the-rest-api-for-your-project). Once you have a custom war file, you'll need to create a new image based on the `gaffer-rest` one. To do that you'll need a `Dockerfile` like this one: | ||
```Dockerfile | ||
FROM gchq/gaffer-rest:latest | ||
COPY ./my-custom-rest:1.0-SNAPSHOT.war /opt/jboss/wildfly/standalone/deployments/rest.war | ||
``` | ||
|
||
Build the image using: | ||
```bash | ||
docker build -t custom-rest:latest . | ||
``` | ||
|
||
### Add the extra libraries to the Accumulo image | ||
Gaffer's accumulo image includes support for the following gaffer libraries: | ||
* The Bitmap Library | ||
* The Sketches Library | ||
* The Time Library | ||
|
||
In order to push down any extra value objects and filters to Accumulo that aren't in those libraries, we have to add the jars to the accumulo /lib/ext directory. Here's an example `Dockerfile`: | ||
```Dockerfile | ||
FROM gchq/gaffer:latest | ||
COPY ./my-library-1.0-SNAPSHOT.jar /opt/accumulo/lib/ext | ||
``` | ||
Then build the image | ||
```bash | ||
docker build -t custom-gaffer-accumulo:latest . | ||
``` | ||
|
||
### Switch the images in the deployment | ||
|
||
You'll need a way of making the custom images visible to the kubernetes cluster. With EKS, you can do this by uploading the images to ECR. There's an example for how to do that in one of our [other guides](./aws-eks-deployment.md#Container+Images). With KinD, you just run `kind load docker-image <image:tag>`. | ||
|
||
Once visible you can switch them out. Create a `custom-images.yaml` file with the following contents: | ||
```yaml | ||
api: | ||
image: | ||
repository: custom-rest | ||
tag: latest | ||
|
||
accumulo: | ||
image: | ||
repository: custom-gaffer-accumulo | ||
tag: latest | ||
``` | ||
To switch them run: | ||
```bash | ||
helm upgrade my-graph gaffer-docker/gaffer -f custom-images.yaml --reuse-values | ||
``` | ||
|
||
### What next? | ||
See our [guides](./guides.md) for other things you can do with Gaffer on Kubernetes. |
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,57 @@ | ||
Changing the Graph Id and Description | ||
======================================= | ||
By default, the default Gaffer deployment ships with the Graph name "simpleGraph" and description "A graph for demo purposes" These are just placeholders and can be overwritten. This guide will show you how. | ||
|
||
The first thing you'll need to do is [deploy a simple graph](./deploy-empty-graph.md). | ||
|
||
### Changing the description | ||
Create a file called `graph-meta.yaml`. We will use this file to add our description and graph Id. | ||
Changing the description is as easy as changing the `graph.config.description` value. | ||
```yaml | ||
graph: | ||
config: | ||
description: "My graph description" | ||
``` | ||
Feel free to be a bit more imaginative. | ||
### Deploy the new description | ||
Upgrade your deployment using helm: | ||
```bash | ||
helm upgrade my-graph gaffer-docker/gaffer -f graph-metadata.yaml --reuse-values | ||
``` | ||
|
||
The `--reuse-values` argument means we don't override any passwords that we set in the initial construction. | ||
|
||
You can see your new description if you go to the Swagger UI and call the /graph/config/description endpoint. | ||
|
||
### Updating the graph Id | ||
Updating the graph Id is a little more complicated since the Graph Id corresponds to an Accumulo table. We have to change the gaffer user's permissions to read and write to that table. To do that update the `graph-meta.yaml` file with the following contents: | ||
```yaml | ||
graph: | ||
config: | ||
graphId: "MyGraph" | ||
description: "My Graph description" | ||
|
||
accumulo: | ||
userManagement: | ||
gaffer: | ||
permissions: | ||
table: | ||
MyGraph: | ||
- READ | ||
- WRITE | ||
- BULK_IMPORT | ||
- ALTER_TABLE | ||
``` | ||
### Deploy your changes | ||
Upgrade your deployment using Helm. | ||
```bash | ||
helm upgrade my-graph gaffer-docker/gaffer -f graph-metadata.yaml --reuse-values | ||
``` | ||
|
||
If you take a look at the Accumulo monitor, you will see your new Accumulo table | ||
|
||
### What next? | ||
See our [guides](./guides.md) for other things you can do with Gaffer on Kubernetes. |
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,44 @@ | ||
How to deploy a simple graph | ||
================================== | ||
This guide will describe how to deploy a simple empty graph with the minimum configuration. | ||
|
||
You will need: | ||
1. Helm | ||
2. Kubectl | ||
3. A Kubernetes cluster (local or remote) | ||
|
||
### Add the Gaffer Docker repo | ||
To start with, you should add the Gaffer Docker repo to your helm repos. This will save the need for | ||
cloning this Git repository. If you've already done this, you can skip this step. | ||
```bash | ||
helm repo add gaffer-docker https://gchq.github.io/gaffer-docker | ||
``` | ||
|
||
### Set the Accumulo passwords | ||
By default, we don't set the Accumulo passwords for you. To set these create a file called `password-values.yaml` and add the following: | ||
|
||
```yaml | ||
accumulo: | ||
config: | ||
accumuloSite: | ||
instance.secret: "DEFAULT" | ||
userManagement: | ||
rootPassword: "root" | ||
users: | ||
gaffer: | ||
password: "gaffer" | ||
tracer: | ||
password: "tracer" | ||
``` | ||
Replace the default values with your own. Once this is deployed you cannot change it. | ||
### Deploy the default Gaffer Graph | ||
You can now deploy the default Gaffer Graph with a default schema. The first time you deploy | ||
Gaffer it can take around 5 minutes for everything to start so it may be worth adding `--timeout 10m0s` to this command. | ||
```bash | ||
helm install my-graph gaffer-docker/gaffer -f password-values.yaml | ||
``` | ||
Feel free to change "my-graph" to something more interesting. | ||
|
||
### What next? | ||
See our [guides](./guides.md) for other things you can do with Gaffer on Kubernetes. |
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,10 @@ | ||
Guides | ||
======== | ||
Here you'll find all our guides for deploying Gaffer on Kubernetes. | ||
|
||
1. [How to deploy on a KinD cluster locally](./kind-deployment.md) | ||
2. [How to deploy to EKS](./aws-eks-deployment.md) | ||
3. [How to deploy a simple empty graph](./deploy-empty-graph.md) | ||
4. [How to add your schema](./schema.md) | ||
5. [How to change the Graph Id and Description](./change-graph-metadata.md) | ||
6. [Adding your own functions and libraries](./add-libraries.md) |
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
Oops, something went wrong.