Skip to content

Commit 34e286a

Browse files
authored
Merge pull request #5 from gchq/gh-4-update-gaffer
Gh 4 update gaffer
2 parents fc4b492 + d5d537d commit 34e286a

10 files changed

+104
-289
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ target/
2727
.idea/*
2828
*/.classpath
2929
__pycache__
30-
*.pem
30+
*.pem
31+
wildfly*.zip
32+
product

Dockerfile.build

+15-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##########################################################
2-
# Copyright 2016 cybermaggedon
2+
# Copyright 2016 Crown Copyright, cybermaggedon
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,19 +14,24 @@
1414
# limitations under the License.
1515
##########################################################
1616

17-
FROM gaffer-dev
17+
FROM fedora:24
1818

19-
RUN dnf install -y patch
19+
RUN dnf install -y java-1.8.0-openjdk maven
20+
RUN dnf install -y git
2021

2122
RUN mkdir -p /usr/local/src/gaffer
2223
WORKDIR /usr/local/src/gaffer
23-
RUN git clone http://github.com/gchq/Gaffer.git .
24-
RUN git checkout gaffer2-0.3.9
25-
ADD PATCH PATCH
26-
ADD PATCH2 PATCH2
27-
RUN patch -p1 < PATCH
28-
RUN patch -p1 < PATCH2
2924

30-
RUN mvn install
25+
RUN git clone http://github.com/gchq/Gaffer.git .
3126

27+
ARG GAFFER_VERSION
28+
RUN git pull; \
29+
git checkout gaffer2-$GAFFER_VERSION
3230

31+
ARG proxy_host
32+
ARG proxy_port
33+
RUN export MAVEN_ARGS=; \
34+
if [[ $proxy_host ]]; then \
35+
export MAVEN_ARGS="-DproxySet=true -DproxyHost=$proxy_host -DproxyPort=$proxy_port"; \
36+
fi; \
37+
mvn $MAVEN_ARGS clean install -Pquick

Dockerfile.deploy

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##########################################################
2-
# Copyright 2016 cybermaggedon
2+
# Copyright 2016 Crown Copyright, cybermaggedon
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -24,15 +24,14 @@ RUN unzip wildfly-10.1.0.CR1.zip
2424
RUN ln -s wildfly-10.1.0.CR1 wildfly
2525

2626
WORKDIR /usr/local/wildfly
27-
28-
COPY product/example-rest-*.war standalone/deployments/example-rest.war
27+
COPY product/*.war standalone/deployments/
2928
COPY product/*.jar /usr/local/accumulo/lib/ext/
30-
COPY standalone.xml standalone/configuration/
31-
RUN mkdir schema
32-
COPY product/*.json schema/
33-
COPY product/mockaccumulostore.properties store.properties
29+
COPY resources/standalone.xml standalone/configuration/
30+
COPY resources/schema schema
31+
COPY resources/store.properties store.properties
3432

35-
CMD cd /; /start-accumulo; cd /usr/local/wildfly; bin/standalone.sh -Dgaffer.rest-api.basePath=/example-rest/v1 -Dgaffer.schemas=/usr/local/wildfly/schema -Dgaffer.storeProperties=/usr/local/wildfly/store.properties
33+
CMD cd /; /start-accumulo; \
34+
cd /usr/local/wildfly; bin/standalone.sh -Dgaffer.schemas=/usr/local/wildfly/schema -Dgaffer.storeProperties=/usr/local/wildfly/store.properties; \
35+
/bin/bash
3636

3737
EXPOSE 8080
38-

Makefile

+14-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##########################################################
2-
# Copyright 2016 cybermaggedon
2+
# Copyright 2016 Crown Copyright, cybermaggedon
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -14,65 +14,46 @@
1414
# limitations under the License.
1515
##########################################################
1616

17-
GAFFER_VERSION=0.3.9
18-
19-
JACKSON=com/fasterxml/jackson
17+
GAFFER_VERSION=0.4.4
2018

2119
REPOSITORY=docker.io/gchq/gaffer
2220

2321
WAR_FILES=\
24-
gaffer/example-rest/${GAFFER_VERSION}/example-rest-${GAFFER_VERSION}.war
22+
gaffer/example-rest/${GAFFER_VERSION}/example-rest-${GAFFER_VERSION}.war \
23+
gaffer/ui/${GAFFER_VERSION}/ui-${GAFFER_VERSION}.war
2524

2625
JAR_FILES=\
2726
gaffer/accumulo-store/${GAFFER_VERSION}/accumulo-store-${GAFFER_VERSION}-iterators.jar \
28-
gaffer/simple-function-library/${GAFFER_VERSION}/simple-function-library-${GAFFER_VERSION}.jar \
29-
gaffer/simple-serialisation-library/${GAFFER_VERSION}/simple-serialisation-library-${GAFFER_VERSION}.jar \
30-
${JACKSON}/core/jackson-annotations/2.6.2/jackson-annotations-2.6.2.jar \
31-
${JACKSON}/core/jackson-core/2.6.2/jackson-core-2.6.2.jar \
32-
${JACKSON}/core/jackson-databind/2.6.2/jackson-databind-2.6.2.jar \
33-
${JACKSON}/datatype/jackson-datatype-json-org/2.3.3/jackson-datatype-json-org-2.3.3.jar \
34-
${JACKSON}/jaxrs/jackson-jaxrs-base/2.6.2/jackson-jaxrs-base-2.6.2.jar \
35-
${JACKSON}/jaxrs/jackson-jaxrs-json-provider/2.6.2/jackson-jaxrs-json-provider-2.6.2.jar \
36-
${JACKSON}/module/jackson-module-jaxb-annotations/2.6.2/jackson-module-jaxb-annotations-2.6.2.jar \
37-
${JACKSON}/module/jackson-module-jsonSchema/2.1.0/jackson-module-jsonSchema-2.1.0.jar \
38-
${JACKSON}/module/jackson-module-scala_2.10/2.1.5/jackson-module-scala_2.10-2.1.5.jar
27+
gaffer/common-util/${GAFFER_VERSION}/common-util-${GAFFER_VERSION}.jar \
28+
gaffer/simple-function-library/${GAFFER_VERSION}/simple-function-library-${GAFFER_VERSION}-shaded.jar \
29+
gaffer/simple-serialisation-library/${GAFFER_VERSION}/simple-serialisation-library-${GAFFER_VERSION}-shaded.jar \
30+
31+
VERSION=${GAFFER_VERSION}
3932

4033
SUDO=
4134

42-
SCHEMA_FILES=\
43-
example-rest/target/classes/schema/dataSchema.json \
44-
example-rest/target/classes/schema/dataTypes.json \
45-
example-rest/target/classes/schema/storeSchema.json \
46-
example-rest/target/classes/schema/storeTypes.json
35+
PROXY_ARGS=--build-arg HTTP_PROXY=${http_proxy} --build-arg http_proxy=${http_proxy} --build-arg HTTPS_PROXY=${https_proxy} --build-arg https_proxy=${https_proxy}
4736

48-
PROP_FILES= \
49-
example-rest/target/classes/mockaccumulostore.properties
37+
PROXY_HOST_PORT_ARGS=--build-arg proxy_host=${proxy_host} --build-arg proxy_port=${proxy_port}
5038

5139
all: build container
5240

5341
product:
5442
mkdir product
5543

44+
# In the future this could be removed when the Gaffer binaries are published to Maven Central.
5645
build: product
57-
${SUDO} docker build ${BUILD_ARGS} -t gaffer-dev -f Dockerfile.dev .
58-
${SUDO} docker build ${BUILD_ARGS} -t gaffer-build -f Dockerfile.build .
46+
${SUDO} docker build ${PROXY_ARGS} ${PROXY_HOST_PORT_ARGS} ${BUILD_ARGS} --build-arg GAFFER_VERSION=${GAFFER_VERSION} -t gaffer-build -f Dockerfile.build .
5947
id=$$(${SUDO} docker run -d gaffer-build sleep 3600); \
6048
dir=/root/.m2/repository; \
6149
for file in ${WAR_FILES} ${JAR_FILES}; do \
6250
bn=$$(basename $$file); \
6351
${SUDO} docker cp $${id}:$${dir}/$${file} product/$${bn}; \
6452
done; \
65-
dir=/usr/local/src/gaffer; \
66-
for file in ${SCHEMA_FILES} ${PROP_FILES}; do \
67-
bn=$$(basename $$file); \
68-
${SUDO} docker cp $${id}:$${dir}/$${file} product/$${bn}; \
69-
done; \
7053
${SUDO} docker rm -f $${id}
7154

72-
VERSION=${GAFFER_VERSION}
73-
7455
container: wildfly-10.1.0.CR1.zip
75-
${SUDO} docker build ${BUILD_ARGS} -t gaffer -f Dockerfile.deploy .
56+
${SUDO} docker build ${PROXY_ARGS} ${BUILD_ARGS} -t gaffer -f Dockerfile.deploy .
7657
${SUDO} docker tag gaffer ${REPOSITORY}:${VERSION}
7758

7859
wildfly-10.1.0.CR1.zip:

PATCH

-186
This file was deleted.

PATCH2

-37
This file was deleted.

0 commit comments

Comments
 (0)