aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkooper <sergey.sachkov@est.tech>2019-04-04 14:03:36 +0000
committerOren Kleks <orenkle@amdocs.com>2019-04-07 08:18:55 +0000
commitb087a8b55875bd0a100ba2cbfda376bab716741b (patch)
tree94c83754510cc19f2b0e57126c6366f49896cff3
parent2c25cbab17de51f9b9a688644be92d0afdb2fa42 (diff)
Certificate location is configurable
Change-Id: I05cf96dd21c891312a5b5e67da3baf7a37e50e54 Issue-ID: SDC-2195 Signed-off-by: kooper <sergey.sachkov@est.tech>
-rw-r--r--sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml7
-rw-r--r--sdc-os-chef/kubernetes/sdc/values.yaml4
-rwxr-xr-xsdc-os-chef/scripts/docker_run.sh6
-rw-r--r--sdc-os-chef/scripts/k8s/kubernetes_run.sh1
4 files changed, 16 insertions, 2 deletions
diff --git a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml
index 267b3bb3d2..b2bab6c752 100644
--- a/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml
+++ b/sdc-os-chef/kubernetes/sdc/templates/deployments/sdc-onboard.yaml
@@ -74,6 +74,8 @@ spec:
name: sdc-logs-2
- mountPath: /tmp/logback.xml
name: sdc-logback
+ - mountPath: "{{ .Values.certDir }}"
+ name: sdc-cert-dir
env:
- name: ENVNAME
value: "{{ .Values.env.name }}"
@@ -93,6 +95,8 @@ spec:
value: "-Xdebug -agentlib:jdwp=transport=dt_socket,address=4001,server=y,suspend=n -Xmx1g -Xms1g"
- name: cassandra_ssl_enabled
value: "false"
+ - name: SDC_CERT_DIR
+ value: "{{ .Values.certDir }}"
lifecycle:
postStart:
exec:
@@ -107,6 +111,9 @@ spec:
- name: filebeat-conf
hostPath:
path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ - name: sdc-cert-dir
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdc/cert
- name: sdc-logs-2
emptyDir: {}
- name: sdc-data-filebeat
diff --git a/sdc-os-chef/kubernetes/sdc/values.yaml b/sdc-os-chef/kubernetes/sdc/values.yaml
index d871190321..4fd2e3c40e 100644
--- a/sdc-os-chef/kubernetes/sdc/values.yaml
+++ b/sdc-os-chef/kubernetes/sdc/values.yaml
@@ -21,4 +21,6 @@ env:
secrets:
sdc_user: YXNkY191c2Vy
sdc_password: QWExMjM0JV4h
- cs_password: b25hcDEyMyNAIQ== \ No newline at end of file
+ cs_password: b25hcDEyMyNAIQ==
+
+certDir: /var/lib/jetty/cert \ No newline at end of file
diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh
index e7c78d9564..6378726b11 100755
--- a/sdc-os-chef/scripts/docker_run.sh
+++ b/sdc-os-chef/scripts/docker_run.sh
@@ -13,6 +13,7 @@ SDC_USER="asdc_user"
SDC_PASSWORD="Aa1234%^!"
JETTY_BASE="/var/lib/jetty"
+SDC_CERT_DIR="onap/cert"
RELEASE=latest
LOCAL=false
@@ -89,6 +90,9 @@ function dir_perms {
mkdir -p ${WORKSPACE}/data/logs/sdc-ui-tests/target
mkdir -p ${WORKSPACE}/data/logs/docker_logs
mkdir -p ${WORKSPACE}/data/logs/WS
+ echo "create dir"
+ echo "${WORKSPACE}data/${SDC_CERT_DIR}"
+ mkdir -p ${WORKSPACE}/data/${SDC_CERT_DIR}
chmod -R 777 ${WORKSPACE}/data/logs
}
#
@@ -427,7 +431,7 @@ function sdc-onboard-BE {
else
ADDITIONAL_ARGUMENTS=${ONBOARD_DEBUG_PORT}
fi
- docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/logs/ONBOARD:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
+ docker run --detach --name ${DOCKER_NAME} --env HOST_IP=${IP} --env ENVNAME="${DEP_ENV}" --env cassandra_ssl_enabled="false" --env SDC_CLUSTER_NAME="SDC-CS-${DEP_ENV}" --env SDC_USER="${SDC_USER}" --env SDC_PASSWORD="${SDC_PASSWORD}" --env SDC_CERT_DIR="${SDC_CERT_DIR}" --env JAVA_OPTIONS="${ONBOARD_BE_JAVA_OPTIONS}" --log-driver=json-file --log-opt max-size=100m --log-opt max-file=10 --ulimit memlock=-1:-1 --ulimit nofile=4096:100000 ${LOCAL_TIME_MOUNT_CMD} --volume ${WORKSPACE}/data/${SDC_CERT_DIR}:/var/lib/jetty/onap/cert --volume ${WORKSPACE}/data/logs/ONBOARD:/var/lib/jetty/logs --volume ${WORKSPACE}/data/environments:/root/chef-solo/environments --publish 8445:8445 --publish 8081:8081 ${ADDITIONAL_ARGUMENTS} ${PREFIX}/sdc-onboard-backend:${RELEASE}
command_exit_status $? ${DOCKER_NAME}
echo "please wait while sdc-onboard-BE is starting..."
monitor_docker ${DOCKER_NAME}
diff --git a/sdc-os-chef/scripts/k8s/kubernetes_run.sh b/sdc-os-chef/scripts/k8s/kubernetes_run.sh
index 41797fcdca..afbec358c9 100644
--- a/sdc-os-chef/scripts/k8s/kubernetes_run.sh
+++ b/sdc-os-chef/scripts/k8s/kubernetes_run.sh
@@ -93,4 +93,5 @@ print_header "SDC - Deploy Pods ..."
sudo mkdir -p /dockerdata-nfs/onap/sdc/logs//BE/SDC/SDC-BE
sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/FE/SDC/SDC-FE
sudo mkdir -p /dockerdata-nfs/onap/sdc/logs/ONBOARD/SDC/ONBOARD-BE
+sudo mkdir -p /dockerdata-nfs/onap/sdc/cert
sudo chmod -R 777 /dockerdata-nfs/onap/sdc/logs/*