diff options
author | Sai Gandham <gandham.saiprasad@gmail.com> | 2020-04-25 21:29:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-25 21:29:29 +0000 |
commit | d7c1a1b6c4218e3f470f86e4ff67fdcdc86f0ea5 (patch) | |
tree | deb33803d25e4a5d11aa7e42131d3490b08dc6ba /auth/auth-cass/docker | |
parent | e4220946ef3feb864ed45e4fc14682be2016dc1b (diff) | |
parent | 475da40b0d58acdf4dd1a3590c490ce7b95a1af8 (diff) |
Merge "Add StandAlone Unix Configurations Include scripts, podman starts, minor code changes."
Diffstat (limited to 'auth/auth-cass/docker')
-rw-r--r-- | auth/auth-cass/docker/drun.sh | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/auth/auth-cass/docker/drun.sh b/auth/auth-cass/docker/drun.sh index cd8ab78c..33b59d7c 100644 --- a/auth/auth-cass/docker/drun.sh +++ b/auth/auth-cass/docker/drun.sh @@ -23,8 +23,22 @@ if [ -e ../../docker/d.props ]; then . ../../docker/d.props fi DOCKER=${DOCKER:-docker} - -if [ "$1" = "publish" ]; then +if [ "$DOCKER" = "podman" ]; then + PODNAME=aaf-cass.onap + if $(podman pod exists $PODNAME); then + echo "Using existing 'podman' pod $PODNAME" + POD="--pod $PODNAME " + else + echo "Create new 'podman' pod $PODNAME" + # Note: Cassandra needs "infra" to work + # Keep in separate pod + #podman pod create --infra=true -n $PODNAME --publish 9042:9042 + podman pod create --infra=false -n $PODNAME + #POD="--pod new:$PODNAME " + POD="--pod $PODNAME " + PUBLISH='--publish 9042:9042 ' + fi +else PUBLISH='--publish 9042:9042 ' fi @@ -47,6 +61,7 @@ if [ "`$DOCKER ps -a | grep aaf-cass`" == "" ]; then -e CASSANDRA_CLUSTER_NAME=osaaf \ -v "aaf_cass_data:/var/lib/cassandra" \ -v "aaf_status:/opt/app/aaf/status" \ + ${POD} \ $PUBLISH \ -d ${PREFIX}${ORG}/${PROJECT}/aaf_cass:${VERSION} "onap" else |