summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-26 16:26:00 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2018-03-26 16:26:00 -0700
commit749870b8ce9dddd09e98a65fc4c57b295880c8bd (patch)
treea728d030df31ff63b6db7b8f953ce06fde94849f
parent7dd6e2f9e3725427c628b214cb31bda1dbe95234 (diff)
Fix minor path in code
This patch fixes a minor path minor issue which was found in CSIT tests. Change-Id: I3ca957248211fe9e89eeee8d0fb5e2b0b4593c5b Issue-ID: MUSIC-55 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
-rw-r--r--deployment/Dockerfile4
-rwxr-xr-xdeployment/docker-build.sh3
-rw-r--r--src/dkv/api/backendFilesystemConnection.go4
3 files changed, 10 insertions, 1 deletions
diff --git a/deployment/Dockerfile b/deployment/Dockerfile
index e9fe30d..1c1e3f6 100644
--- a/deployment/Dockerfile
+++ b/deployment/Dockerfile
@@ -5,7 +5,7 @@ ARG HTTPS_PROXY=${HTTPS_PROXY}
ENV http_proxy $HTTP_PROXY
ENV https_proxy $HTTPS_PROXY
-ENV CONSUL_IP $CONSUL_IP
+ENV DATASTORE_IP $DATASTORE_IP
ENV CONSUL_VERSION 1.0.6
RUN apk update && \
@@ -27,12 +27,14 @@ EXPOSE 8080
RUN mkdir /dkv_mount_path && \
+ mkdir /dkv_mount_path/api && \
mkdir /dkv_mount_path/consul_data && \
mkdir /dkv_mount_path/configs && \
mkdir /dkv_mount_path/configs/default
WORKDIR /dkv_mount_path
ADD ./dkv /dkv_mount_path/
+ADD ./token_service_map.json /dkv_mount_path/api/
ADD ./docker-entrypoint.sh /dkv_mount_path/
ENTRYPOINT /dkv_mount_path/docker-entrypoint.sh \ No newline at end of file
diff --git a/deployment/docker-build.sh b/deployment/docker-build.sh
index 50a2a89..3b7e3b3 100755
--- a/deployment/docker-build.sh
+++ b/deployment/docker-build.sh
@@ -21,6 +21,9 @@ function generate_binary {
make build
popd
cp ../target/dkv .
+
+ # Change the following work around for reading token_service.json
+ cp ../src/dkv/api/token_service_map.json .
}
function build_image {
diff --git a/src/dkv/api/backendFilesystemConnection.go b/src/dkv/api/backendFilesystemConnection.go
index 519022c..4f2bb8e 100644
--- a/src/dkv/api/backendFilesystemConnection.go
+++ b/src/dkv/api/backendFilesystemConnection.go
@@ -43,6 +43,10 @@ type DirectoryStruct struct {
directory string
}
+/*
+TODO(sshank): This needs to be made completely stateless or else each container running this API will not have
+same data in token_service_map.json
+*/
const (
JSONPATH = "api/token_service_map.json"
)