diff options
Diffstat (limited to 'auth/sample')
-rwxr-xr-x | auth/sample/bin/client.sh | 10 | ||||
-rw-r--r-- | auth/sample/bin/pod_wait.sh | 2 | ||||
-rw-r--r-- | auth/sample/bin/service.sh | 43 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.cm.props | 6 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.fs.props | 4 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.gui.props | 4 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.hello.props | 4 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.locate.props | 5 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.oauth.props | 6 | ||||
-rw-r--r-- | auth/sample/etc/org.osaaf.aaf.service.props | 4 | ||||
-rw-r--r-- | auth/sample/local/aaf.props | 6 | ||||
-rw-r--r-- | auth/sample/local/initialConfig.props | 15 |
12 files changed, 64 insertions, 45 deletions
diff --git a/auth/sample/bin/client.sh b/auth/sample/bin/client.sh index b69646df..f4048f30 100755 --- a/auth/sample/bin/client.sh +++ b/auth/sample/bin/client.sh @@ -49,7 +49,8 @@ JAVA_AAFCLI="$JAVA -cp $CONFIG/bin/aaf-auth-cmd-*-full.jar -Dcadi_prop_files=$LO if [ ! -d $LOCAL ]; then mkdir -p $LOCAL for D in bin logs; do - rsync -avzh --exclude=.gitignore $CONFIG/$D/* /opt/app/osaaf/$D + mkdir -p $OSAAF/$D + cp $CONFIG/$D/*.* $OSAAF/$D done fi @@ -152,11 +153,6 @@ else fi fi ;; - update) - for D in bin logs; do - rsync -uh --exclude=.gitignore $CONFIG/$D/* /opt/app/osaaf/$D - done - ;; showpass) echo "## Show Passwords" $JAVA_AGENT showpass ${APP_FQI} ${APP_FQDN} @@ -171,7 +167,7 @@ else bash) shift cd $LOCAL || exit - /bin/bash "$@" + exec bash "$@" ;; setProp) cd $LOCAL || exit diff --git a/auth/sample/bin/pod_wait.sh b/auth/sample/bin/pod_wait.sh index 732edffc..07ff9814 100644 --- a/auth/sample/bin/pod_wait.sh +++ b/auth/sample/bin/pod_wait.sh @@ -102,4 +102,4 @@ case "$OTHER" in ;; esac -eval "$@" +eval "$@" diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh index 78f6693b..20be29c4 100644 --- a/auth/sample/bin/service.sh +++ b/auth/sample/bin/service.sh @@ -34,7 +34,7 @@ JAVA_AGENT="$JAVA -cp $CONFIG/bin/aaf-auth-cmd-*-full.jar -Dcadi_prop_files=$LOC JAVA_AAFCLI="$JAVA -cp $CONFIG/bin/aaf-auth-cmd-*-full.jar -Dcadi_prop_files=$LOCAL/org.osaaf.aaf.props org.onap.aaf.auth.cmd.AAFcli" # If doesn't exist... still create -mkdir -p /opt/app/osaaf +mkdir -p $OSAAF # Temp use for clarity of code FILE= @@ -42,7 +42,7 @@ FILE= # Setup Bash, first time only if [ ! -e "$HOME/.bash_aliases" ] || [ -z "$(grep cadi $HOME/.bash_aliases)" ]; then echo "alias cadi='$JAVA_CADI \$*'" >>$HOME/.bash_aliases - echo "alias agent='$CONFIG/bin/agent.sh EMPTY \$*'" >>$HOME/.bash_aliases + echo "alias agent='$CONFIG/bin/agent.sh \$*'" >>$HOME/.bash_aliases echo "alias aafcli='$JAVA_AAFCLI \$*'" >>$HOME/.bash_aliases chmod a+x $CONFIG/bin/agent.sh . $HOME/.bash_aliases @@ -114,9 +114,10 @@ fi # Only initialize once, automatically... if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then - rsync -avzh --exclude=.gitignore $CONFIG/local/org.osaaf.aaf* $LOCAL + cp $CONFIG/local/org.osaaf.aaf* $LOCAL for D in public etc logs; do - rsync -avzh --exclude=.gitignore $CONFIG/$D/* /opt/app/osaaf/$D + mkdir -p $OSAAF/$D + cp $CONFIG/$D/* $OSAAF/$D done TMP=$(mktemp) @@ -125,9 +126,16 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then echo cadi_latitude=${LATITUDE} >> ${TMP} echo cadi_longitude=${LONGITUDE} >> ${TMP} echo cadi_x509_issuers=${CADI_X509_ISSUERS} >> ${TMP} - echo aaf_register_as=${AAF_REGISTER_AS} >> ${TMP} - AAF_LOCATOR_AS=${AAF_LOCATOR_AS:=$AAF_REGISTER_AS} - echo aaf_locate_url=https://${AAF_LOCATOR_AS}:8095 >> ${TMP} + AAF_LOCATE_URL=${aaf_locate_url:="https://${HOSTNAME}:8095"} + echo aaf_locate_url=${AAF_LOCATE_URL} >> ${TMP} + for P in `env`; do + if [[ "$P" == aaf_locator* ]]; then + echo "$P" >> ${TMP} + if [[ "$P" == aaf_locator_container=* ]]; then + echo aaf_locator_container.hostname=${HOSTNAME} >> ${TMP} + fi + fi + done cat $TMP @@ -139,7 +147,7 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then # Cassandra Config stuff # Default is expect a Cassandra on same Node - CASS_HOST=${CASS_HOST:="aaf_cass"} + CASS_HOST=${CASS_HOST:="aaf-cass"} CASS_PASS=$($JAVA_CADI digest "${CASSANDRA_PASSWORD:-cassandra}" $LOCAL/org.osaaf.aaf.keyfile) CASS_NAME=${CASS_HOST/:*/} sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTERS:=$CASS_HOST}/" \ @@ -165,7 +173,7 @@ fi # Now run a command -CMD=$2 +CMD=$1 if [ -z "$CMD" ]; then if [ -n "$INITIALIZED" ]; then echo "Initialization Complete" @@ -174,11 +182,10 @@ if [ -z "$CMD" ]; then fi else shift - shift case "$CMD" in ls) echo ls requested - find /opt/app/osaaf -depth + find $OSAAF -depth ;; cat) if [ "$1" = "" ]; then @@ -195,12 +202,6 @@ else fi fi ;; - update) - rsync -uh --exclude=.gitignore $CONFIG/local/org.osaaf.aaf* $LOCAL - for D in public data etc logs; do - rsync -uh --exclude=.gitignore $CONFIG/$D/* /opt/app/osaaf/$D - done - ;; validate) echo "## validate requested" $JAVA_AAFCLI perm list user aaf@aaf.osaaf.org @@ -211,7 +212,7 @@ else bash) shift cd $LOCAL || exit - /bin/bash "$@" + exec /bin/bash -c "$@" ;; setProp) cd $LOCAL || exit @@ -226,11 +227,11 @@ else fi for F in $FILES; do if [ "$ADD" = "Y" ]; then - echo "Changing $1 to $F" + echo "Changing $1 for $F" echo "$1=$2" >> $F else echo "Changing $1 in $F" - sed -i.backup -e "s/\\(${1}.*=\\).*/\\1${2}/" $F + sed -i.backup -e "s/\\(${1}=\\).*/\\1${2}/" $F fi cat $F done @@ -265,7 +266,7 @@ else done ;; taillog) - sh /opt/app/osaaf/logs/taillog + sh $OSAAF/logs/taillog ;; wait) bash $CONFIG/bin/pod_wait.sh wait $1 diff --git a/auth/sample/etc/org.osaaf.aaf.cm.props b/auth/sample/etc/org.osaaf.aaf.cm.props index c1593e58..dc43c282 100644 --- a/auth/sample/etc/org.osaaf.aaf.cm.props +++ b/auth/sample/etc/org.osaaf.aaf.cm.props @@ -23,8 +23,10 @@ ## Note: Link to CA Properties in "local" dir ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props:/opt/app/osaaf/local/org.osaaf.aaf.cm.ca.props -aaf_component=AAF_NS.cm:AAF_RELEASE -port=8150 +aaf_locator_names=cm +port=8100 +aaf_locator_public_port.helm=30084 +# aaf_locator_public_port.oom= #Certman cm_public_dir=/opt/app/osaaf/public diff --git a/auth/sample/etc/org.osaaf.aaf.fs.props b/auth/sample/etc/org.osaaf.aaf.fs.props index 7125e466..9de81af6 100644 --- a/auth/sample/etc/org.osaaf.aaf.fs.props +++ b/auth/sample/etc/org.osaaf.aaf.fs.props @@ -22,7 +22,9 @@ ## AAF Fileserver Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props -aaf_component=AAF_NS.fs:AAF_RELEASE +aaf_locator_names=fs port=8096 +aaf_locator_port.helm=30085 +# aaf_locator_port.oom= aaf_public_dir=/opt/app/osaaf/public diff --git a/auth/sample/etc/org.osaaf.aaf.gui.props b/auth/sample/etc/org.osaaf.aaf.gui.props index 4228eb30..81d04ea0 100644 --- a/auth/sample/etc/org.osaaf.aaf.gui.props +++ b/auth/sample/etc/org.osaaf.aaf.gui.props @@ -22,8 +22,10 @@ ## AAF GUI Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props -aaf_component=AAF_NS.gui:AAF_RELEASE +aaf_locator_names=gui port=8200 +aaf_locator_port.helm=30083 +#aaf_locator_port.oom= aaf_gui_title=AAF aaf_gui_copyright=(c) 2018 AT&T Intellectual Property. All rights reserved. diff --git a/auth/sample/etc/org.osaaf.aaf.hello.props b/auth/sample/etc/org.osaaf.aaf.hello.props index 45299140..5add3014 100644 --- a/auth/sample/etc/org.osaaf.aaf.hello.props +++ b/auth/sample/etc/org.osaaf.aaf.hello.props @@ -22,6 +22,8 @@ ## AAF Hello Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props -aaf_component=AAF_NS.hello:AAF_RELEASE +aaf_locator_names=hello port=8130 +aaf_locator_public_port.helm=30086 +#aaf_locator_public_port.oom= diff --git a/auth/sample/etc/org.osaaf.aaf.locate.props b/auth/sample/etc/org.osaaf.aaf.locate.props index 41474d40..1b74f654 100644 --- a/auth/sample/etc/org.osaaf.aaf.locate.props +++ b/auth/sample/etc/org.osaaf.aaf.locate.props @@ -22,6 +22,9 @@ ## AAF Locator Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props -aaf_component=AAF_NS.locator:AAF_RELEASE +aaf_locator_names=locator port=8095 +aaf_locator_public_port.helm=30081 +#aaf_locator_public_port.oom= + diff --git a/auth/sample/etc/org.osaaf.aaf.oauth.props b/auth/sample/etc/org.osaaf.aaf.oauth.props index 19b657d5..a968b949 100644 --- a/auth/sample/etc/org.osaaf.aaf.oauth.props +++ b/auth/sample/etc/org.osaaf.aaf.oauth.props @@ -18,10 +18,12 @@ # ============LICENSE_END==================================================== # ## -## org.osaaf.aaf.oauth ## AAF OAuth2 Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props -aaf_component=AAF_NS.oauth:AAF_RELEASE +aaf_locator_names=oauth,token,introspect port=8140 +aaf_locator_public_port.helm=30082 +#aaf_locator_public_port.oom= + diff --git a/auth/sample/etc/org.osaaf.aaf.service.props b/auth/sample/etc/org.osaaf.aaf.service.props index 3f5e7c4a..5c9714c4 100644 --- a/auth/sample/etc/org.osaaf.aaf.service.props +++ b/auth/sample/etc/org.osaaf.aaf.service.props @@ -22,6 +22,8 @@ ## AAF Service Properties ## cadi_prop_files=/opt/app/osaaf/local/org.osaaf.aaf.props:/opt/app/osaaf/etc/org.osaaf.aaf.log4j.props:/opt/app/osaaf/local/org.osaaf.aaf.cassandra.props:/opt/app/osaaf/etc/org.osaaf.aaf.orgs.props -aaf_component=AAF_NS.service:AAF_RELEASE +aaf_locator_names=service port=8100 +aaf_locator_public_port.helm=30080 +#aaf_locator_public_port.oom= diff --git a/auth/sample/local/aaf.props b/auth/sample/local/aaf.props index 4eb70a9b..bae24d42 100644 --- a/auth/sample/local/aaf.props +++ b/auth/sample/local/aaf.props @@ -35,6 +35,12 @@ cadi_truststore=/opt/app/osaaf/public/truststoreONAPall.jks cadi_truststore_password=changeit cadi_x509_issuers= +# Locator info +aaf_locator_ns=AAF_NS +aaf_locator_fqdn.docker=aaf-%N +aaf_locator_fqdn.oom=%CNS.aaf-%N +aaf_locator_fqdn.helm=%CNS.aaf-%N + # Other aaf_data_dir=/opt/app/osaaf/data cadi_token_dir=/opt/app/osaaf/tokens diff --git a/auth/sample/local/initialConfig.props b/auth/sample/local/initialConfig.props index fa2bc174..9c7e3df0 100644 --- a/auth/sample/local/initialConfig.props +++ b/auth/sample/local/initialConfig.props @@ -17,11 +17,12 @@ # limitations under the License.
# ============LICENSE_END====================================================
#
-aaf_locate_url=https://localhost:8095
-aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/AAF_NS.introspect:2.1/introspect
-aaf_oauth2_token_url=https://AAF_LOCATE_URL/AAF_NS.token:2.1/token
-aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.1
cadi_protocols=TLSv1.1,TLSv1.2
-cm_url=https://AAF_LOCATE_URL/AAF_NS.cm:2.1
-fs_url=https://AAF_LOCATE_URL/AAF_NS.fs.2.1
-gui_url=https://AAF_LOCATE_URL/AAF_NS.gui.2.1
+
+aaf_locate_url=https://localhost:8095
+aaf_url=https://AAF_LOCATE_URL/%C%AAF_NS.service:2.1
+aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/%C%AAF_NS.introspect:2.1/introspect
+aaf_oauth2_token_url=https://AAF_LOCATE_URL/%C%AAF_NS.token:2.1/token
+cm_url=https://AAF_LOCATE_URL/%C%AAF_NS.cm:2.1
+gui_url=https://AAF_LOCATE_URL/%C%AAF_NS.gui.2.1
+fs_url=https://AAF_LOCATE_URL/%C%AAF_NS.fs.2.1
|