summaryrefslogtreecommitdiffstats
path: root/auth/docker
diff options
context:
space:
mode:
Diffstat (limited to 'auth/docker')
-rw-r--r--auth/docker/Dockerfile.config2
-rw-r--r--auth/docker/aaf.sh36
-rw-r--r--auth/docker/cass.props-e3
-rwxr-xr-xauth/docker/dbuild.sh8
-rw-r--r--auth/docker/drun.sh2
5 files changed, 11 insertions, 40 deletions
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..1290ea78 100644
--- a/auth/docker/aaf.sh
+++ b/auth/docker/aaf.sh
@@ -27,42 +27,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/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..6f2be640 100755
--- a/auth/docker/dbuild.sh
+++ b/auth/docker/dbuild.sh
@@ -9,24 +9,26 @@ fi
. ./d.props
+echo "Building Containers for aaf components, version $VERSION"
+
# 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
@@ -36,7 +38,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 +53,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/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