Skip to content

Commit ceb1e41

Browse files
authored
Updated Gaffer version to 2.3.1 (#384)
2 parents a7210bb + f9d869b commit ceb1e41

File tree

70 files changed

+495
-495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+495
-495
lines changed

Diff for: .github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
- name: Upload Asset
161161
env:
162162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163-
run: gh release upload ${{ needs.release-version.outputs.release_version }} ${{ env.ASSET_FILENAME }}
163+
run: gh release upload ${{ needs.get-release-version.outputs.release_version }} ${{ env.ASSET_FILENAME }}
164164

165165
update-helm-repo:
166166
runs-on: ubuntu-latest

Diff for: README.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
# Gaffer Docker
22

33
This repo contains the code needed to run Gaffer using Docker or Kubernetes.
4-
There are two main sub-folders, 'docker' and 'kubernetes' which contain the project files you need for starting Gaffer using those services.
4+
There are two main sub-folders, 'docker' and 'kubernetes', which contain the
5+
project files you need for starting Gaffer using those services.
56

6-
# Running Gaffer Using Docker
7+
## Running Gaffer Using Docker
78

8-
For information on how to run Gaffer using Docker containers, please see the documentation: [Gaffer Docker Docs](https://gchq.github.io/gaffer-doc/latest/dev/docker/)
9+
For information on how to run Gaffer using Docker containers please see the
10+
documentation: [Gaffer Docker Docs](https://gchq.github.io/gaffer-doc/latest/administration-guide/gaffer-deployment/gaffer-docker/gaffer-images.html)
911

10-
# Running Gaffer Using Kubernetes
12+
We also provide some example deployments with different store backings
13+
to help you get started learning and testing Gaffer. Please see the
14+
[example deployments](./docker/example-deployments/) directory for more
15+
details.
1116

12-
For information on how to run Gaffer using Kubernetes, please see the documentation: [Gaffer Kubernetes Docs](https://gchq.github.io/gaffer-doc/latest/dev/kubernetes-guide/kubernetes/)
17+
## Running Gaffer Using Kubernetes
1318

14-
# Versioning
19+
For information on how to run Gaffer using Kubernetes, please see the
20+
documentation: [Gaffer Kubernetes Docs](https://gchq.github.io/gaffer-doc/latest/administration-guide/gaffer-deployment/kubernetes-guide/running-on-kubernetes.html)
1521

16-
Each of our images which is released will be tagged with the version of the software they represent. Every release,
17-
we update the `latest` tag for each image and add a new release which has the corresponding version tag.
22+
## Versioning
23+
24+
Each of the released images will be tagged with the version of the
25+
software they represent. Every release we update the `latest` tag for each
26+
image and add a new release which has the corresponding version tag.
1827

1928
If we release Gaffer version 2.1.2, the following images would be uploaded:
2029

@@ -24,17 +33,20 @@ If we release Gaffer version 2.1.2, the following images would be uploaded:
2433
- gchq/gaffer:2.1.2
2534
- gchq/gaffer:2.1.2-accumulo-2.0.1
2635

27-
We maintain mutable versions of latest, as well as the major, minor and bugfix versions of Gaffer. For reproducibility
28-
make sure to use the full version in your build metadata. For `gaffer`/`gaffer-rest` images, we also create a tag including the
29-
accumulo version, this allows for compatibility with Accumulo 1.9.3 in our tests. The `-accumulo-1.9.3` tagged images
30-
are not published but can be build locally if required.
36+
We maintain mutable versions of latest, as well as the major, minor and bugfix
37+
versions of Gaffer. For reproducibility make sure to use the full version in
38+
your build metadata. For `gaffer`/`gaffer-rest` images, we also create a tag
39+
including the accumulo version, this allows for compatibility with Accumulo
40+
1.9.3 in our tests. The `-accumulo-1.9.3` tagged images are not published but
41+
can be built locally if required.
3142

3243
The release process is automated by GitHub actions.
3344

34-
# Known Compatible Docker Versions
45+
## Known Compatible Docker Versions
3546

3647
- 20.10.23
3748

38-
# Contributing
49+
## Contributing
3950

40-
We welcome contributions to this project. Detailed information on our ways of working can be found in our [developer docs](https://gchq.github.io/gaffer-doc/latest/dev/ways-of-working/).
51+
We welcome contributions to this project. Detailed information on our ways of
52+
working can be found in our [developer docs](https://gchq.github.io/gaffer-doc/latest/development-guide/ways-of-working.html).

Diff for: cd/build_core_images.sh

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ pushd "${ROOT_DIR}" || exit 1
2626
# HADOOP_VERSION
2727
# GAFFER_VERSION
2828
# ACCUMULO_VERSION
29-
# TINKERPOP_VERSION
3029
if [[ -f "${1}" ]]; then
3130
source "${1}"
3231
else

Diff for: cd/build_images.sh

+5-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ pushd "${ROOT_DIR}" || exit 1
2828
# GAFFERPY_VERSION
2929
# ACCUMULO_VERSION
3030
# SPARK_VERSION
31-
# TINKERPOP_VERSION
3231
if [[ -f "${1}" ]]; then
3332
source "${1}"
3433
else
@@ -42,12 +41,11 @@ docker compose --project-directory ./docker/gaffer-road-traffic-loader/ -f ./doc
4241
# Builds all of the notebook related images:
4342
docker compose --project-directory ./docker/gaffer-pyspark-notebook/ -f ./docker/gaffer-pyspark-notebook/docker-compose.yaml build notebook
4443
docker compose --project-directory ./docker/spark-py/ -f ./docker/spark-py/docker-compose.yaml build
45-
# Builds the Gaffer Gremlin server
46-
./docker/gaffer-gremlin/build.sh
4744

48-
# Set $JHUB_OPTIONS_SERVER_VERSION
49-
source ./docker/gaffer-jhub-options-server/get-version.sh
50-
# Builds the jhub options server:
51-
docker compose --project-directory ./docker/gaffer-jhub-options-server/ -f ./docker/gaffer-jhub-options-server/docker-compose.yaml build
45+
# Currently disabled due to npm depencency issue
46+
# # Set $JHUB_OPTIONS_SERVER_VERSION
47+
# source ./docker/gaffer-jhub-options-server/get-version.sh
48+
# # Builds the jhub options server:
49+
# docker compose --project-directory ./docker/gaffer-jhub-options-server/ -f ./docker/gaffer-jhub-options-server/docker-compose.yaml build
5250

5351
popd || exit 1

Diff for: cd/publish_images.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ pushContainer gchq/accumulo "${ACCUMULO_VERSION}"
102102
pushContainer gchq/gaffer "${GAFFER_VERSION}-accumulo-${ACCUMULO_VERSION}"
103103
pushContainer gchq/gaffer-rest "${GAFFER_VERSION}-accumulo-${ACCUMULO_VERSION}"
104104
pushContainer gchq/gaffer-road-traffic-loader "${GAFFER_VERSION}"
105-
pushContainer gchq/gaffer-gremlin "${GAFFER_VERSION}-gremlin-${TINKERPOP_VERSION}"
106105
pushContainer gchq/gaffer-pyspark-notebook "${GAFFER_VERSION}"
107-
pushContainer gchq/gaffer-jhub-options-server "${JHUB_OPTIONS_SERVER_VERSION}"
106+
# Currently disabled due to npm depencency issue
107+
# pushContainer gchq/gaffer-jhub-options-server "${JHUB_OPTIONS_SERVER_VERSION}"
108108
pushContainer gchq/spark-py "${SPARK_VERSION}"
109109

110110
# Push legacy versions to Container Repositories

Diff for: cd/update_versions.sh

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ source ./docker/gaffer-jhub-options-server/get-version.sh
3131
find . -type f -exec sed -i "s/GAFFER_VERSION=[0-9]\.[0-9]\.[0-9]/GAFFER_VERSION=${APP_VERSION}/g" {} +
3232
find . -type f -exec sed -E -i "s/GAFFERPY_VERSION=(gafferpy-)?[0-9]\.[0-9]\.[0-9]/GAFFERPY_VERSION=\1${APP_VERSION}/g" {} +
3333
find . -type f -exec sed -i "s/GAFFER_TESTER_VERSION=[0-9]\.[0-9]\.[0-9]/GAFFER_TESTER_VERSION=${APP_VERSION}/g" {} +
34-
sed -i'' -e "s/<gaffer.version>[0-9]\.[0-9]\.[0-9]/<gaffer.version>${APP_VERSION}/g" docker/gaffer-gremlin/pom.xml
3534
sed -i'' -e "s/BASE_IMAGE_TAG=[0-9]\.[0-9]\.[0-9]/BASE_IMAGE_TAG=${APP_VERSION}/g" docker/gaffer-kerberos/gaffer-krb/Dockerfile
3635
sed -i'' -e "s/BASE_IMAGE_TAG=[0-9]\.[0-9]\.[0-9]/BASE_IMAGE_TAG=${APP_VERSION}/g" docker/gaffer-kerberos/gaffer-rest-krb/Dockerfile
3736

Diff for: docker/accumulo1.env

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ HADOOP_VERSION=3.2.2
33
ACCUMULO_VERSION=1.9.3
44
HADOOP_CONF_DIR=/etc/hadoop/conf
55
ACCUMULO_CONF_DIR=/etc/accumulo/conf
6-
GAFFER_VERSION=2.3.0
7-
GAFFER_TESTER_VERSION=2.3.0
8-
GAFFERPY_VERSION=2.3.0
6+
GAFFER_VERSION=2.3.1
7+
GAFFER_TESTER_VERSION=2.3.1
8+
GAFFERPY_VERSION=2.3.1
99
SPARK_VERSION=3.1.2
10-
TINKERPOP_VERSION=3.7.1
1110
KUBECTL_VERSION=1.23.0

Diff for: docker/accumulo2.env

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ HADOOP_VERSION=3.3.3
33
ACCUMULO_VERSION=2.0.1
44
HADOOP_CONF_DIR=/etc/hadoop/conf
55
ACCUMULO_CONF_DIR=/etc/accumulo/conf
6-
GAFFER_VERSION=2.3.0
7-
GAFFER_TESTER_VERSION=2.3.0
8-
GAFFERPY_VERSION=2.3.0
6+
GAFFER_VERSION=2.3.1
7+
GAFFER_TESTER_VERSION=2.3.1
8+
GAFFERPY_VERSION=2.3.1
99
SPARK_VERSION=3.1.2
10-
TINKERPOP_VERSION=3.7.1
1110
KUBECTL_VERSION=1.23.0

Diff for: docker/example-deployments/README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Example Gaffer Deployments
2+
3+
These directories have basic examples of deploying containerised Gaffer with
4+
different store backings. Some example notebooks are also available which
5+
primarily feature the use of the Gremlin interface for interacting with the
6+
Graph.
7+
8+
All examples will provide a Gaffer REST API to start interacting with the
9+
deployed graph.
10+
11+
## Modern Example (Accumulo)
12+
13+
The modern example, which uses the [Tinkerpop modern dataset](https://tinkerpop.apache.org/docs/current/tutorials/the-gremlin-console/#toy-graphs),
14+
can be found under the `modern-example` directory which features an Accumulo
15+
store as its storage backing.
16+
17+
## Federation Example
18+
19+
A demo/example of using Gaffer REST with a Federated Store is available under
20+
the `federated-example` directory.
21+
22+
## Proxy Example
23+
24+
A demo/example of using Gaffer REST with a Proxy Store is available under the
25+
`proxy-example` directory.

Diff for: docker/gaffer-gremlin/example/notebooks/graphnotebook-modern-example.ipynb renamed to docker/example-deployments/example-notebooks/graphnotebook-modern-example.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"%%graph_notebook_config\n",
3939
"{\n",
4040
" \"host\": \"localhost\",\n",
41-
" \"port\": 8182,\n",
41+
" \"port\": 8080,\n",
4242
" \"ssl\": false,\n",
4343
" \"gremlin\": {\n",
4444
" \"traversal_source\": \"g\",\n",

Diff for: docker/gaffer-gremlin/example/notebooks/gremlinpython-modern-example.ipynb renamed to docker/example-deployments/example-notebooks/gremlinpython-modern-example.ipynb

+17-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
"# Common imports\n",
2222
"from gremlin_python.process.anonymous_traversal import traversal\n",
2323
"from gremlin_python.process.graph_traversal import __\n",
24-
"from gremlin_python.process.strategies import *\n",
25-
"from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection\n",
2624
"from gremlin_python.process.traversal import *\n",
25+
"from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection\n",
2726
"from gremlin_python.driver.client import Client\n",
27+
"from gremlin_python.driver.serializer import GraphSONSerializersV3d0\n",
2828
"import nest_asyncio\n",
2929
"\n",
3030
"from_ = Direction.OUT\n",
@@ -45,7 +45,11 @@
4545
"metadata": {},
4646
"outputs": [],
4747
"source": [
48-
"g = traversal().with_remote(DriverRemoteConnection('ws://localhost:8182/gremlin', 'g'))"
48+
"# Traversal root\n",
49+
"g = traversal().with_remote(DriverRemoteConnection('ws://localhost:8080/gremlin', 'g', message_serializer=GraphSONSerializersV3d0()))\n",
50+
"\n",
51+
"# Client connection\n",
52+
"client = Client('ws://localhost:8080/gremlin', 'g', message_serializer=GraphSONSerializersV3d0())"
4953
]
5054
},
5155
{
@@ -77,7 +81,7 @@
7781
"metadata": {},
7882
"outputs": [],
7983
"source": [
80-
"g.V('1', '2').hasLabel('person').outE('knows').values().is_(lt(1)).to_list()"
84+
"g.V('1', '2').hasLabel('person').outE('knows').values().is_(P.lt(1)).to_list()"
8185
]
8286
},
8387
{
@@ -96,13 +100,21 @@
96100
"g.V('1').repeat(__.both().simplePath()).until(__.has('name', 'lop')).limit(3).path().by(__.valueMap()).to_list()"
97101
]
98102
},
103+
{
104+
"cell_type": "markdown",
105+
"metadata": {},
106+
"source": [
107+
"Run a seeded cypher query via Gremlin. Submitted as a script rather than via gremlin-python bindings"
108+
]
109+
},
99110
{
100111
"cell_type": "code",
101112
"execution_count": null,
102113
"metadata": {},
103114
"outputs": [],
104115
"source": [
105-
"g.V('1').outE().as_(\"a\").V('1').values(\"name\").to_list()"
116+
"results = client.submit(\"g.with(\\\"cypher\\\", \\\"MATCH (p:person) WHERE ID(p) = '1' RETURN p\\\").call()\")\n",
117+
"results.all().result()"
106118
]
107119
}
108120
],

Diff for: docker/gaffer-rest/federated-example/compose.yaml renamed to docker/example-deployments/federated-example/compose.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ services:
2020
ports:
2121
- 8080:8080
2222
volumes:
23-
- ./config/store/store.properties:/gaffer/store/store.properties:ro
24-
- ./config/store/mergeFunctions.json:/gaffer/store/mergeFunctions.json:ro
25-
- ./config/store/defaultGraphIds.json:/gaffer/store/defaultGraphIds.json:ro
26-
- ./config/schema:/gaffer/schema:ro
23+
- ./conf/gaffer/schema:/gaffer/schema:ro
24+
- ./conf/gaffer/store/store.properties:/gaffer/store/store.properties:ro
25+
- ./conf/gaffer/store/mergeFunctions.json:/gaffer/store/mergeFunctions.json:ro
26+
- ./conf/gaffer/store/defaultGraphIds.json:/gaffer/store/defaultGraphIds.json:ro
27+
- ./conf/gaffer/gafferpop.properties:/gaffer/gafferpop.properties:ro
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#
12
# Copyright 2024 Crown Copyright
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,15 +12,7 @@
1112
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
# See the License for the specific language governing permissions and
1314
# limitations under the License.
14-
15-
version: "3.7"
16-
17-
services:
18-
gaffer-gremlin:
19-
image: gchq/gaffer-gremlin:${GAFFER_VERSION}-gremlin-${TINKERPOP_VERSION}
20-
build:
21-
context: .
22-
args:
23-
BASE_IMAGE_TAG: ${TINKERPOP_VERSION}
24-
ports:
25-
- 8182:8182
15+
#
16+
# Default operation config
17+
gaffer.elements.getalllimit=5000
18+
gaffer.elements.hasstepfilterstage=PRE_AGGREGATION

Diff for: docker/example-deployments/modern-example/README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Gaffer Modern Example
2+
3+
This is an example deployment of Gaffer on Accumulo. This uses a REST API
4+
deployment of Gaffer with full Accumulo and Hadoop storage backing.
5+
6+
The example uses the
7+
[Tinkerpop Modern Graph](https://tinkerpop.apache.org/docs/current/tutorials/the-gremlin-console/#toy-graphs)
8+
as its data set to demonstrate basic querying of data. The data can be queried
9+
via the REST API using standard Gaffer operations or by using the Gremlin
10+
websocket (see [the docs](https://gchq.github.io/gaffer-doc/latest/user-guide/query/gremlin/gremlin.html)
11+
for more info).
12+
13+
## Running the Example
14+
15+
To run the example please use the provided start script with an environment file
16+
to specify the image versions e.g. `accumulo2.env`:
17+
18+
```bash
19+
./create-deployment.sh ../../accumulo2.env
20+
```
21+
22+
With the demo deployment a standard Gaffer REST API will be started (available
23+
on port 8080 by default). Basic configuration for Accumulo and Hadoop have been
24+
added but can be modified to test out different
25+
scenarios, please see the [documentation](https://gchq.github.io/gaffer-doc/latest/administration-guide/gaffer-stores/accumulo-store.html)
26+
for more information.

Diff for: docker/gaffer-gremlin/example/compose.yaml renamed to docker/example-deployments/modern-example/compose.yaml

+1-12
Original file line numberDiff line numberDiff line change
@@ -173,16 +173,5 @@ services:
173173
volumes:
174174
- ./conf/gaffer/schema:/gaffer/schema:ro
175175
- ./conf/gaffer/store-accumulo.properties:/gaffer/store/store.properties:ro
176+
- ./conf/gaffer/gafferpop.properties:/gaffer/gafferpop.properties:ro
176177

177-
# Gremlin server
178-
gaffer-gremlin:
179-
image: gchq/gaffer-gremlin:${GAFFER_VERSION}-gremlin-${TINKERPOP_VERSION}
180-
depends_on:
181-
accumulo-tserver:
182-
condition: service_healthy
183-
ports:
184-
- 8182:8182
185-
volumes:
186-
- ./conf/gafferpop:/opt/gremlin-server/conf/gafferpop:ro
187-
- ./conf/gaffer/store-accumulo.properties:/opt/gremlin-server/conf/gaffer/store.properties:ro
188-
- ./conf/gaffer/schema:/opt/gremlin-server/conf/gaffer/schema:ro
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#
2-
# Copyright 2023-2024 Crown Copyright
1+
# Copyright 2024 Crown Copyright
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License");
54
# you may not use this file except in compliance with the License.
@@ -13,8 +12,6 @@
1312
# See the License for the specific language governing permissions and
1413
# limitations under the License.
1514
#
16-
gremlin.graph=uk.gov.gchq.gaffer.tinkerpop.GafferPopGraph
17-
gaffer.graphId=graph1
18-
gaffer.storeproperties=conf/gaffer/store.properties
19-
gaffer.schemas=conf/gaffer/schema/
20-
gaffer.userId=user01
15+
# Default operation config
16+
gaffer.elements.getalllimit=5000
17+
gaffer.elements.hasstepfilterstage=PRE_AGGREGATION
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"entities": {
3+
"id": {
4+
"vertex": "string.id"
5+
},
6+
"person": {
7+
"vertex": "string.id",
8+
"properties": {
9+
"name": "property.string",
10+
"age": "property.integer"
11+
}
12+
},
13+
"software": {
14+
"vertex": "string.id",
15+
"properties": {
16+
"name": "property.string",
17+
"lang": "property.string"
18+
}
19+
}
20+
},
21+
"edges": {
22+
"knows": {
23+
"source": "string.id",
24+
"destination": "string.id",
25+
"directed": "true",
26+
"properties": {
27+
"weight": "property.double"
28+
}
29+
},
30+
"created": {
31+
"source": "string.id",
32+
"destination": "string.id",
33+
"directed": "true",
34+
"properties": {
35+
"weight": "property.double"
36+
}
37+
},
38+
"dependsOn": {
39+
"source": "string.id",
40+
"destination": "string.id",
41+
"directed": "true"
42+
},
43+
"encapsulates": {
44+
"source": "string.id",
45+
"destination": "string.id",
46+
"directed": "true"
47+
}
48+
}
49+
}

0 commit comments

Comments
 (0)