-
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
15 changed files
with
353 additions
and
21 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
17 changes: 17 additions & 0 deletions
17
docker/example-deployments/modern-example/conf/gaffer/gafferpop.properties
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,17 @@ | ||
# Copyright 2024 Crown Copyright | ||
# | ||
# 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. | ||
# | ||
# Default operation config | ||
gaffer.elements.getalllimit=5000 | ||
gaffer.elements.hasstepfilterstage=PRE_AGGREGATION |
2 changes: 1 addition & 1 deletion
2
docker/example-deployments/modern-example/conf/gaffer/schema/elements.json
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,6 +1,6 @@ | ||
{ | ||
"entities": { | ||
"vertex": { | ||
"id": { | ||
"vertex": "string.id" | ||
}, | ||
"person": { | ||
|
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
File renamed without changes.
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
19 changes: 19 additions & 0 deletions
19
docker/example-deployments/proxy-example/conf/map/store.properties
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,19 @@ | ||
# Copyright 2024 Crown Copyright | ||
# | ||
# 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. | ||
gaffer.store.class=uk.gov.gchq.gaffer.mapstore.MapStore | ||
gaffer.store.properties.class=uk.gov.gchq.gaffer.mapstore.MapStoreProperties | ||
|
||
# General store config | ||
gaffer.cache.service.class=uk.gov.gchq.gaffer.cache.impl.HashMapCacheService | ||
gaffer.store.job.tracker.enabled=true |
17 changes: 17 additions & 0 deletions
17
docker/example-deployments/proxy-example/conf/proxy/gafferpop.properties
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,17 @@ | ||
# Copyright 2024 Crown Copyright | ||
# | ||
# 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. | ||
# | ||
# Default operation config | ||
gaffer.elements.getalllimit=5000 | ||
gaffer.elements.hasstepfilterstage=PRE_AGGREGATION |
File renamed without changes.
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
49 changes: 49 additions & 0 deletions
49
docker/example-deployments/proxy-example/conf/schema/elements.json
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,49 @@ | ||
{ | ||
"entities": { | ||
"vertex": { | ||
"vertex": "string.id" | ||
}, | ||
"person": { | ||
"vertex": "string.id", | ||
"properties": { | ||
"name": "property.string", | ||
"age": "property.integer" | ||
} | ||
}, | ||
"software": { | ||
"vertex": "string.id", | ||
"properties": { | ||
"name": "property.string", | ||
"lang": "property.string" | ||
} | ||
} | ||
}, | ||
"edges": { | ||
"knows": { | ||
"source": "string.id", | ||
"destination": "string.id", | ||
"directed": "true", | ||
"properties": { | ||
"weight": "property.double" | ||
} | ||
}, | ||
"created": { | ||
"source": "string.id", | ||
"destination": "string.id", | ||
"directed": "true", | ||
"properties": { | ||
"weight": "property.double" | ||
} | ||
}, | ||
"dependsOn": { | ||
"source": "string.id", | ||
"destination": "string.id", | ||
"directed": "true" | ||
}, | ||
"encapsulates": { | ||
"source": "string.id", | ||
"destination": "string.id", | ||
"directed": "true" | ||
} | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
docker/example-deployments/proxy-example/conf/schema/types.json
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,43 @@ | ||
{ | ||
"types": { | ||
"int.id": { | ||
"class": "java.lang.Integer" | ||
}, | ||
"long.id": { | ||
"class": "java.lang.Long" | ||
}, | ||
"string.id": { | ||
"class": "java.lang.String" | ||
}, | ||
"uuid.id": { | ||
"class": "java.util.UUID" | ||
}, | ||
"true": { | ||
"class": "java.lang.Boolean" | ||
}, | ||
"property.string": { | ||
"class": "java.lang.String", | ||
"aggregateFunction": { | ||
"class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" | ||
} | ||
}, | ||
"property.integer": { | ||
"class": "java.lang.Integer", | ||
"aggregateFunction": { | ||
"class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" | ||
} | ||
}, | ||
"property.double": { | ||
"class": "java.lang.Double", | ||
"aggregateFunction": { | ||
"class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" | ||
} | ||
}, | ||
"property.float": { | ||
"class": "java.lang.Float", | ||
"aggregateFunction": { | ||
"class": "uk.gov.gchq.koryphe.impl.binaryoperator.First" | ||
} | ||
} | ||
} | ||
} |
59 changes: 59 additions & 0 deletions
59
docker/example-deployments/proxy-example/create-deployment.sh
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,59 @@ | ||
#!/bin/sh | ||
# Copyright 2024 Crown Copyright | ||
# | ||
# 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. | ||
|
||
CURRENT_DIR="$(dirname "$(readlink -f "${0}")")" | ||
TINKERPOP_MODERN_JSON="${CURRENT_DIR}/operations/add-tinkerpop-modern.json" | ||
GAFFER_REST_URL="http://localhost:8081" | ||
|
||
# Make sure we have an evironment file for the image versions | ||
if [ ! -f "${1}" ]; then | ||
echo "Error - Environment file not set" | ||
echo "Example: ${0} <envfile>.env" | ||
exit 1 | ||
fi | ||
|
||
# Remove any existing containers | ||
docker compose --env-file "${1}" -f "${CURRENT_DIR}/compose.yaml" down | ||
|
||
# Start new deployment | ||
echo "-----------------------------------" | ||
echo "Starting new deployment..." | ||
docker compose --env-file "${1}" -f "${CURRENT_DIR}/compose.yaml" up --detach | ||
|
||
# Check can connect to instance | ||
echo "-----------------------------------" | ||
echo "Attempting to connect to Gaffer instance..." | ||
if ! docker run --rm --network=host curlimages/curl:latest \ | ||
curl --retry 20 \ | ||
--retry-delay 5 \ | ||
--retry-all-errors "${GAFFER_REST_URL}"/rest/graph/status | ||
then | ||
echo "Failed to connect to Gaffer instance" | ||
exit 1 | ||
fi | ||
|
||
# Load dataset | ||
echo "-----------------------------------" | ||
echo "Loading data into Gaffer instance..." | ||
if ! docker run --rm --network=host curlimages/curl:latest \ | ||
curl -H "Content-Type: application/json" \ | ||
--data "$(cat "${TINKERPOP_MODERN_JSON}")" "${GAFFER_REST_URL}"/rest/graph/operations/execute | ||
then | ||
echo "Failed to load tinkerpop modern JSON: ${TINKERPOP_MODERN_JSON}" | ||
exit 1 | ||
fi | ||
|
||
echo "-----------------------------------" | ||
echo "Deployment started!" |
Oops, something went wrong.