Skip to content
This repository was archived by the owner on Jun 6, 2025. It is now read-only.

Commit 40b9272

Browse files
committed
Merge branch 'develop'
2 parents 2b69c92 + ac49ae4 commit 40b9272

26 files changed

+90
-42
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,22 @@ It also contains Helm Charts so that the following applications can be deployed
1414
* [Gaffer](kubernetes/gaffer/)
1515
* [Example Gaffer Graph containing Road Traffic Dataset](kubernetes/gaffer-road-traffic/)
1616

17+
These charts can be accessed by cloning our repository or by using our Helm repo hosted on our [Github Pages Site](https://gchq.github.io/gaffer-docker)
18+
19+
To use this repo, run:
20+
```bash
21+
helm repo add gaffer https://gchq.github.io/gaffer-docker
22+
```
23+
1724
There are guides on how to deploy the charts on:
1825
* a local Kubernetes cluster, [using kind (Kubernetes IN Docker)](kubernetes/kind-deployment.md)
1926
* an [AWS EKS cluster](kubernetes/aws-eks-deployment.md)
2027

28+
These guides assume you've cloned the repository and are using the Helm charts contained within. We do also host our Helm Charts index on our Github pages site. You can get access to them by running:
29+
```bash
30+
helm repo add gaffer https://gchq.github.io/gaffer-docker
31+
```
32+
2133
## Versioning
2234
Each of our images will be tagged in DockerHub with the version of the software they represent. Every release,
2335
we update the image for that tag and add a new release which has the corresponding git tag.

app_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.1
1+
0.6.2

cd/deploy.sh

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ uploadChart() {
4040
chart=$1
4141
version=$2
4242
token=$3
43+
id=$4
4344

4445
helm dependency update "kubernetes/${chart}"
4546
helm package "kubernetes/${chart}"
46-
curl -v -H "Authorization: token $token" -H "Content-Type: application/zip" --data-binary @${chart}-${version}.tgz "https://api.github.com/repos/gchq/gaffer-docker/releases/tag/v${version}/assets"
47-
rm ${chart}-${version}.tgz
47+
curl -v -H "Authorization: token $token" -H "Content-Type: application/zip" --data-binary @${chart}-${version}.tgz "https://uploads.github.com/repos/gchq/gaffer-docker/releases/${id}/assets?name=${chart}-${version}.tgz"
4848
}
4949

5050
# If branch is not master or is pull request, exit
@@ -95,18 +95,22 @@ JSON_DATA="{
9595
\"draft\": false
9696
}"
9797
echo "${JSON_DATA}"
98-
curl -v --data "${JSON_DATA}" -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/gchq/${REPO_NAME}/releases"
98+
curl -v -o output.json --data "${JSON_DATA}" -H "Authorization: token ${GITHUB_TOKEN}" "https://api.github.com/repos/gchq/${REPO_NAME}/releases"
99+
idLine="$(grep '^ "id"' output.json)"
100+
id="$(echo ${idLine} | sed -e 's|^"id": \([0-9]*\).*|\1|')"
101+
rm output.json
99102

100103
# Upload Charts to Github releases
101-
uploadChart hdfs "${APP_VERSION}" "${GITHUB_TOKEN}"
102-
uploadChart gaffer "${APP_VERSION}" "${GITHUB_TOKEN}"
103-
uploadChart gaffer-road-traffic "${APP_VERSION}" "${GITHUB_TOKEN}"
104+
uploadChart hdfs "${APP_VERSION}" "${GITHUB_TOKEN}" "${id}"
105+
uploadChart gaffer "${APP_VERSION}" "${GITHUB_TOKEN}" "${id}"
106+
uploadChart gaffer-road-traffic "${APP_VERSION}" "${GITHUB_TOKEN}" "${id}"
104107

105108
# Update gh-pages
106109
git checkout gh-pages
107-
git merge master -m "Updated docs to latest version"
108-
helm repo index . --url "https://github.com/gchq/gaffer-docker/releases/tag/${TAG_NAME}" --merge index.yaml
110+
helm repo index . --url "https://github.com/gchq/gaffer-docker/releases/download/${TAG_NAME}" --merge index.yaml
111+
rm *.tgz
109112
git commit -am "Updated index.yaml"
113+
git merge master -m "Updated docs to latest version"
110114
git push
111115

112116
# Update version on develop

cd/update_app_version.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ createNewVersion() {
4343

4444
# Performs a Find and replace on the Helm charts and the app_version file
4545
findAndReplace() {
46-
find "$(getRootDirectory)" \( -iname Chart.y*ml -o -name app_version \) -exec sed -i'' -e "s:$1:$2:g" {} +
46+
# Replace the app version file
47+
echo $2 > "$(getRootDirectory)/app_version"
48+
# Replace version marked with # managed version in the Chart.yaml files
49+
managed_version_tag='# managed version'
50+
find "$(getRootDirectory)" -iname Chart.y*ml -exec sed -i'' -e "s:$1 ${managed_version_tag}:$2 ${managed_version_tag}:g" {} +
51+
4752
}
4853

4954
if [ $# -gt 1 ]; then

kubernetes/aws-eks-deployment.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ The following instructions will guide you through provisioning and configuring a
1616

1717
If the versions of the container images you would like to deploy are not available in [Docker Hub](https://hub.docker.com/u/gchq) then you will need to host them in a registry yourself.
1818

19-
The following instructions build all the container images and host them in AWS ECR:
19+
The following instructions build all the container images and host them in AWS ECR when run from the ./kubernetes folder:
20+
2021

2122
```bash
2223
export HADOOP_VERSION=${HADOOP_VERSION:-3.2.1}

kubernetes/gaffer-road-traffic/Chart.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ apiVersion: v2
1616
name: gaffer-road-traffic
1717
description: A Gaffer instance containing sample GB road traffic data from the Department of Transport
1818
type: application
19-
version: 0.6.1
20-
appVersion: 1.12.0
19+
version: 0.6.2 # managed version
20+
appVersion: 1.12.0
2121
home: https://github.com/gchq/Gaffer
2222
sources:
2323
- https://github.com/gchq/gaffer-docker
2424
- https://data.gov.uk/dataset/208c0e7b-353f-4e2d-8b7a-1a7118467acc/gb-road-traffic-counts
2525
dependencies:
2626
- name: gaffer
27-
version: ^0.6.1
27+
version: ^0.6.2 # managed version
2828
repository: file://../gaffer/

kubernetes/gaffer-road-traffic/docs/aws-eks-deployment.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# Deploying Road Traffic Gaffer Graph on AWS EKS
2+
All scripts listed here are intended to be run from the kubernetes/gaffer-road-traffic folder
23

34
First follow the [instructions here](../../aws-eks-deployment.md) to provision and configure an [AWS EKS](https://aws.amazon.com/eks/) cluster that the Gaffer Road Traffic Helm Chart can be deployed on.
45

6+
## Using ECR
57
If you are hosting the container images in your AWS account, using ECR, then run the following commands to configure the Helm Chart to use them:
68

79
```bash
@@ -23,7 +25,11 @@ else
2325
fi
2426
```
2527

26-
Deploy the Helm Chart with:
28+
## Deploy Helm Chart
29+
30+
The last thing before deploying is to set the passwords for the various accumulo users in the values.yaml file. These are found under `accumulo.config.userManagement`.
31+
32+
Finally, deploy the Helm Chart by running this from the kubernetes/gaffer-road-traffic folder:
2733

2834
```
2935
export HADOOP_VERSION=${HADOOP_VERSION:-3.2.1}

kubernetes/gaffer-road-traffic/docs/kind-deployment.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
# Deploying Road Traffic Gaffer Graph using kind
2+
All scripts listed here are intended to be run from the kubernetes/gaffer-road-traffic folder
23

34
First follow the [instructions here](../../kind-deployment.md) to provision and configure a local Kubernetes cluster, using [kind](https://kind.sigs.k8s.io/) (Kubernetes IN Docker), that the Gaffer Road Traffic Helm Chart can be deployed on.
45

6+
After the cluster is provisioned, update the values.yaml with the passwords for the various accumulo users. These are found under `accumulo.config.userManagement`.
7+
8+
Once that's done, run this to deploy and test the Road Traffic Graph.
59
```bash
610
export HADOOP_VERSION=${HADOOP_VERSION:-3.2.1}
711
export GAFFER_VERSION=${GAFFER_VERSION:-1.12.0}

kubernetes/gaffer-road-traffic/templates/check-data-loaded-hook.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ metadata:
2525
app.kubernetes.io/component: hook
2626
annotations:
2727
helm.sh/hook: post-install,post-upgrade
28+
helm.sh/hook-delete-policy: hook-succeeded
2829
helm.sh/hook-weight: "40"
2930
spec:
3031
containers:

kubernetes/gaffer-road-traffic/templates/data-loader-job.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ spec:
3636
- name: graph-config
3737
mountPath: /gaffer/graph/
3838
readOnly: true
39-
# Schema isn't mounted because of GAFFER-2262
40-
# Can be un-commented once it has been resolved and released
41-
# In the mean time use the schema built into the container
42-
# - name: schema
43-
# mountPath: /gaffer/schema/
44-
# readOnly: true
39+
- name: schema
40+
mountPath: /gaffer/schema/
41+
readOnly: true
4542
- name: store-properties
4643
mountPath: /gaffer/store/
4744
readOnly: true

0 commit comments

Comments
 (0)