diff options
Diffstat (limited to 'auth/docker')
-rw-r--r-- | auth/docker/aaf.sh | 3 | ||||
-rw-r--r-- | auth/docker/d.props.init | 5 | ||||
-rw-r--r-- | auth/docker/drun.sh | 13 |
3 files changed, 17 insertions, 4 deletions
diff --git a/auth/docker/aaf.sh b/auth/docker/aaf.sh index 53b3d60e..c09e7b03 100644 --- a/auth/docker/aaf.sh +++ b/auth/docker/aaf.sh @@ -48,6 +48,9 @@ if [ "$(docker volume ls | grep aaf_config)" = "" ] && [ ${P12_LOAD} = "yes" ]; 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 diff --git a/auth/docker/d.props.init b/auth/docker/d.props.init index e114e018..0322cd67 100644 --- a/auth/docker/d.props.init +++ b/auth/docker/d.props.init @@ -16,7 +16,7 @@ AAF_ENV=DEV AAF_REGISTER_AS=$HOSTNAME LATITUDE= LONGITUDE= -# + # Initial AAF Certificate (not Generated) CADI_X509_ISSUERS="CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US" AAF_INITIAL_X509_P12= @@ -24,7 +24,8 @@ AAF_INITIAL_X509_PASSWORD= CADI_X509_ISSUERS= # CA info (leave blank unless functioning as CA) +CM_CA_LOCAL= AAF_SIGNER_P12= AAF_SIGNER_PASSWORD= -CM_CA_LOCAL= +AAF_SIGNER_ALIAS= diff --git a/auth/docker/drun.sh b/auth/docker/drun.sh index 04f5b323..2eb025ea 100644 --- a/auth/docker/drun.sh +++ b/auth/docker/drun.sh @@ -5,8 +5,17 @@ # Only need Cassandra Link Info when initializing the container. if [ ! -e ./cass.props ]; then cp cass.props.init cass.props - echo "Edit appropriate Cassandra Link Info into cass.props" - exit +fi + +CASS_IS_SET="$(grep '<Cass IP>' cass.props)" +if [ -n "$CASS_IS_SET" ]; then + CASS_IP="$(docker container inspect aaf_cass | grep \"IPAddress\": -m 1 | cut -d '"' -f 4)" + if [ -n "$CASS_IP" ]; then + sed -i -e "s/\(^.*:\).*/\1$CASS_IP/" cass.props + else + echo "Set CASSASNDRA IP in cass.props" + exit + fi fi . ./cass.props |