summaryrefslogtreecommitdiffstats
path: root/auth/docker
diff options
context:
space:
mode:
Diffstat (limited to 'auth/docker')
-rw-r--r--auth/docker/Dockerfile.client2
-rw-r--r--auth/docker/Dockerfile.config2
-rw-r--r--auth/docker/aaf.sh37
-rw-r--r--auth/docker/agent.sh10
-rw-r--r--auth/docker/cass.props-e3
-rwxr-xr-xauth/docker/dbuild.sh14
-rw-r--r--auth/docker/dpush.sh3
-rw-r--r--auth/docker/drun.sh2
8 files changed, 28 insertions, 45 deletions
diff --git a/auth/docker/Dockerfile.client b/auth/docker/Dockerfile.client
index aed42212..2ecf6a5d 100644
--- a/auth/docker/Dockerfile.client
+++ b/auth/docker/Dockerfile.client
@@ -8,7 +8,7 @@ LABEL version=${AAF_VERSION}
COPY logs /opt/app/aaf_config/logs
COPY bin/client.sh /opt/app/aaf_config/bin/agent.sh
COPY bin/aaf-cadi*full.jar /opt/app/aaf_config/bin/
-COPY public/*all.jks /opt/app/aaf_config/public/
+COPY cert/*trust*.b64 /opt/app/aaf_config/cert/
ENTRYPOINT ["/bin/bash","/opt/app/aaf_config/bin/agent.sh"]
CMD []
diff --git a/auth/docker/Dockerfile.config b/auth/docker/Dockerfile.config
index 3402fe54..b2f2becf 100644
--- a/auth/docker/Dockerfile.config
+++ b/auth/docker/Dockerfile.config
@@ -8,7 +8,9 @@ LABEL version=${AAF_VERSION}
COPY data/sample.identities.dat /opt/app/aaf_config/data/
COPY etc /opt/app/aaf_config/etc
COPY local /opt/app/aaf_config/local
+COPY cert /opt/app/aaf_config/cert
COPY public /opt/app/aaf_config/public
+COPY CA /opt/app/aaf_config/CA
COPY logs /opt/app/aaf_config/logs
COPY bin/service.sh /opt/app/aaf_config/bin/agent.sh
COPY bin/aaf-cadi-aaf-${VERSION}-full.jar /opt/app/aaf_config/bin/
diff --git a/auth/docker/aaf.sh b/auth/docker/aaf.sh
index c09e7b03..3fc41496 100644
--- a/auth/docker/aaf.sh
+++ b/auth/docker/aaf.sh
@@ -6,6 +6,7 @@ function run_it() {
--mount 'type=volume,src=aaf_config,dst='$CONF_ROOT_DIR',volume-driver=local' \
--add-host="$HOSTNAME:$HOST_IP" \
--add-host="aaf.osaaf.org:$HOST_IP" \
+ --env HOSTNAME=${HOSTNAME} \
--env AAF_ENV=${AAF_ENV} \
--env AAF_REGISTER_AS=${AAF_REGISTER_AS} \
--env LATITUDE=${LATITUDE} \
@@ -27,42 +28,6 @@ function set_it() {
docker exec -t aaf_config_$USER /bin/bash /opt/app/aaf_config/bin/agent.sh NOOP setProp "$1" "$2"
}
-P12_LOAD="no"
-
-for PROP in AAF_INITIAL_X509_P12 AAF_INITIAL_X509_PASSWORD AAF_SIGNER_P12 AAF_SIGNER_PASSWORD CADI_X509_ISSUERS; do
- if [ "${!PROP}" != "" ]; then
- P12_LOAD='yes'
- break;
- fi
-done
-
-# First Time Run does a bit more setup
-if [ "$(docker volume ls | grep aaf_config)" = "" ] && [ ${P12_LOAD} = "yes" ]; then
- echo "Initializing first aaf_config"
- if [ "$(docker container ls | grep aaf_config_$USER)" = "" ]; then
- PARAMS="bash"
- run_it -t -d
- else
- echo "aaf_config_$USER is already running"
- fi
- docker container cp ${AAF_INITIAL_X509_P12} aaf_config_$USER:/opt/app/osaaf/local/org.osaaf.aaf.p12
- docker container cp ${AAF_SIGNER_P12} aaf_config_$USER:/opt/app/osaaf/local/org.osaaf.aaf.signer.p12
-
- if [ -z "$CM_CA_LOCAL" ]; then
- CM_CA_LOCAL="org.onap.aaf.auth.cm.ca.LocalCA,/opt/app/osaaf/local/org.osaaf.aaf.signer.p12;${AAF_SIGNER_ALIAS};enc:"
- fi
- set_prop cm_ca.local "${CM_CA_LOCAL}" org.osaaf.aaf.cm.ca.props
- set_prop cadi_x509_issuers "${CADI_X509_ISSUERS}" org.osaaf.aaf.props
-
- encrypt_it cadi_keystore_password "${AAF_INITIAL_X509_PASSWORD}"
- encrypt_it cm_ca.local "${AAF_SIGNER_PASSWORD}"
-
- echo -n "Stopping "
- docker container stop aaf_config_$USER
- echo -n "Removing "
- docker container rm aaf_config_$USER
-fi
-
PARAMS="$@"
if [ "$PARAMS" != "" ]; then
run_it -it --rm
diff --git a/auth/docker/agent.sh b/auth/docker/agent.sh
index 1ca12eb8..38b1070d 100644
--- a/auth/docker/agent.sh
+++ b/auth/docker/agent.sh
@@ -16,7 +16,7 @@ for V in VERSION DOCKER_REPOSITORY AAF_FQDN AAF_FQDN_IP DEPLOY_FQI APP_FQDN APP_
case $V in
DOCKER_REPOSITORY)
PROMPT="Docker Repo"
- DEF=nexus3.onap.org:10003
+ DEF=""
;;
AAF_FQDN) PROMPT="AAF's FQDN";;
DEPLOY_FQI) PROMPT="Deployer's FQI";;
@@ -58,6 +58,12 @@ if [ "$(docker volume ls | grep ${VOLUME})" = "" ]; then
docker volume create -d ${DRIVER} ${VOLUME}
fi
+if [ -n "$DOCKER_REPOSITORY" ]; then
+ PREFIX="$DOCKER_REPOSITORY/"
+else
+ PREFIX=""
+fi
+
docker run \
-it \
--rm \
@@ -71,5 +77,5 @@ docker run \
--env LATITUDE=${LATITUDE} \
--env LONGITUDE=${LONGITUDE} \
--name aaf_agent_$USER \
- $DOCKER_REPOSITORY/onap/aaf/aaf_agent:$VERSION \
+ "$PREFIX"onap/aaf/aaf_agent:$VERSION \
/bin/bash "$@"
diff --git a/auth/docker/cass.props-e b/auth/docker/cass.props-e
new file mode 100644
index 00000000..fc9bab43
--- /dev/null
+++ b/auth/docker/cass.props-e
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+CASS_HOST=cass.aaf.osaaf.org:<Cass IP>
diff --git a/auth/docker/dbuild.sh b/auth/docker/dbuild.sh
index dbe5884b..94fc7f46 100755
--- a/auth/docker/dbuild.sh
+++ b/auth/docker/dbuild.sh
@@ -9,25 +9,33 @@ fi
. ./d.props
+echo "Building Containers for aaf components, version $VERSION"
+
+# AAF_cass now needs a version...
+cd ../auth-cass/docker
+bash ./dbuild.sh
+cd -
+
# Create the AAF Config (Security) Images
cd ..
cp ../cadi/aaf/target/aaf-cadi-aaf-${VERSION}-full.jar sample/bin
+cp -Rf ../conf/CA sample
# AAF Config image (for AAF itself)
sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' docker/Dockerfile.config > sample/Dockerfile
docker build -t ${ORG}/${PROJECT}/aaf_config:${VERSION} sample
docker tag ${ORG}/${PROJECT}/aaf_config:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_config:${VERSION}
-docker tag ${ORG}/${PROJECT}/aaf_config:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_config:latest
# AAF Agent Image (for Clients)
sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT}'/g' docker/Dockerfile.client > sample/Dockerfile
docker build -t ${ORG}/${PROJECT}/aaf_agent:${VERSION} sample
docker tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:${VERSION}
-docker tag ${ORG}/${PROJECT}/aaf_agent:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_agent:latest
# Clean up
rm sample/Dockerfile sample/bin/aaf-cadi-aaf-${VERSION}-full.jar
+rm -Rf sample/CA
cd -
+
########
# Second, build a core Docker Image
echo Building aaf_$AAF_COMPONENT...
@@ -36,7 +44,6 @@ sed -e 's/${AAF_VERSION}/'${VERSION}'/g' -e 's/${AAF_COMPONENT}/'${AAF_COMPONENT
cd ..
docker build -t ${ORG}/${PROJECT}/aaf_core:${VERSION} aaf_${VERSION}
docker tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:${VERSION}
-docker tag ${ORG}/${PROJECT}/aaf_core:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_core:latest
rm aaf_${VERSION}/Dockerfile
cd -
@@ -52,7 +59,6 @@ for AAF_COMPONENT in ${AAF_COMPONENTS}; do
cd ..
docker build -t ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} aaf_${VERSION}
docker tag ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
- docker tag ${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION} ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:latest
rm aaf_${VERSION}/Dockerfile
cd -
done
diff --git a/auth/docker/dpush.sh b/auth/docker/dpush.sh
index b969a346..5e9403da 100644
--- a/auth/docker/dpush.sh
+++ b/auth/docker/dpush.sh
@@ -4,11 +4,10 @@
# Pull in Variables from d.props
. ./d.props
-AAF_COMPONENTS="$(cat components) core agent config"
+AAF_COMPONENTS="config agent core cass $(cat components) "
for AAF_COMPONENT in ${AAF_COMPONENTS}; do
# docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${OLD_VERSION}
docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${VERSION}
- docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:latest
# docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/aaf_${AAF_COMPONENT}:${NEW_VERSION}
done
diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh
index 2eb025ea..350ce3db 100644
--- a/auth/docker/drun.sh
+++ b/auth/docker/drun.sh
@@ -20,6 +20,8 @@ fi
. ./cass.props
+bash aaf.sh onap
+
if [ "$1" == "" ]; then
AAF_COMPONENTS=$(cat components)
else