summaryrefslogtreecommitdiffstats
path: root/asdctool
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-08-04 14:16:00 +0200
committersebdet <sebastien.determe@intl.att.com>2020-09-08 13:45:31 +0200
commit30670accb070b20c1c770d1ebbd6d72e24fee2db (patch)
tree8ddb5d70500aa1b3baa4e262de411e8394e22e6a /asdctool
parenta8a96339680fa1c4df5577285442e902b5637631 (diff)
Upgrade to java 11
MOve SDC to Java 11, this is one of the PR to move to Jdk 11, jenkins will have to be changed as well Issue-ID: SDC-2725 Change-Id: I85f13f14ba8004f6e9656093a837465a2e4af3e1 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Signed-off-by: xuegao <xg353y@intl.att.com> Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'asdctool')
-rw-r--r--asdctool/sdc-cassandra-init/Dockerfile31
-rw-r--r--asdctool/sdc-cassandra-init/startup.sh4
2 files changed, 32 insertions, 3 deletions
diff --git a/asdctool/sdc-cassandra-init/Dockerfile b/asdctool/sdc-cassandra-init/Dockerfile
index 1beec7e2f6..e35f841984 100644
--- a/asdctool/sdc-cassandra-init/Dockerfile
+++ b/asdctool/sdc-cassandra-init/Dockerfile
@@ -1,4 +1,33 @@
-FROM onap/base_sdc-cqlsh:1.7.0
+FROM onap/policy-jdk-debian:2.0.1
+
+#RUN addgroup --gid 1000 sdc
+RUN addgroup sdc
+#RUN adduser --gecos "sdc sdc,1,1,1" -u 1000 --disabled-password --ingroup sdc --shell /bin/sh sdc
+RUN adduser --gecos "sdc sdc,1,1,1" --disabled-password --ingroup sdc --shell /bin/sh sdc
+USER sdc
+RUN mkdir ~/.cassandra/ && \
+ echo '[cql]' > ~/.cassandra/cqlshrc && \
+ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc
+USER root
+
+RUN apt-get update && apt-get install -y python-pip && \
+ pip install cqlsh && \
+ mkdir ~/.cassandra/ && \
+ echo '[cql]' > ~/.cassandra/cqlshrc && \
+ echo 'version=3.4.4' >> ~/.cassandra/cqlshrc && \
+ set -ex && \
+ pip install cqlsh && \
+ apt-get install -y \
+ make \
+ gcc \
+ ruby \
+ ruby-dev \
+ libffi-dev \
+ libxml2-dev && \
+ gem install chef:13.8.5 berkshelf:6.3.1 io-console:0.4.6 etc webrick --no-document && \
+ apt-get update -y && \
+ apt-get install -y binutils && apt-get clean && gem cleanup
+USER sdc
COPY --chown=sdc:sdc chef-solo /home/sdc/chef-solo/
diff --git a/asdctool/sdc-cassandra-init/startup.sh b/asdctool/sdc-cassandra-init/startup.sh
index 3e474f3c89..2a20eaa67d 100644
--- a/asdctool/sdc-cassandra-init/startup.sh
+++ b/asdctool/sdc-cassandra-init/startup.sh
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
cd /home/sdc/chef-solo
chef-solo -c solo.rb -E ${ENVNAME}
rc=$?
-if [[ $rc != 0 ]]; then exit $rc; fi
+if [ $rc -ne 0 ]; then exit $rc; fi