Skip to content

Commit

Permalink
Merge pull request #171 from jbernal0019/master
Browse files Browse the repository at this point in the history
Change service name from 'pman_service' to 'pman'
  • Loading branch information
jbernal0019 authored Apr 26, 2021
2 parents f67f81d + 33eed78 commit 35eb25b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
docker build --build-arg ENVIRONMENT=local -t fnndsc/pman:dev .
./make.sh -s -U -i
- name: nosetests
run: docker exec $(docker ps -f name=pman_dev_stack_pman_service.1 -q) nosetests --exe tests
run: docker exec $(docker ps -f name=pman_dev_stack_pman.1 -q) nosetests --exe tests
- name: teardown
run: |
./unmake.sh
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Docker Swarm:

.. code-block:: bash
$> pman_dev=$(docker ps -f name=pman_dev_stack_pman_service.1 -q)
$> pman_dev=$(docker ps -f name=pman_dev_stack_pman.1 -q)
$> docker exec $pman_dev mkdir -p /home/localuser/storeBase/key-chris-jid-1/incoming
$> docker exec $pman_dev mkdir -p /home/localuser/storeBase/key-chris-jid-1/outgoing
$> docker exec $pman_dev touch /home/localuser/storeBase/key-chris-jid-1/incoming/test.txt
Expand Down
16 changes: 6 additions & 10 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ title -d 1 "Setting global exports..."
fi
echo -e "exporting STOREBASE=$STOREBASE " | ./boxes.sh
export STOREBASE=$STOREBASE
echo -e "exporting SOURCEDIR=$HERE " | ./boxes.sh
export SOURCEDIR=$HERE
export SOURCEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo -e "exporting SOURCEDIR=$SOURCEDIR " | ./boxes.sh
windowBottom

if (( ! b_skipIntro )) ; then
Expand Down Expand Up @@ -198,15 +198,11 @@ windowBottom
title -d 1 "Starting pman containerized dev environment on $ORCHESTRATOR"
if [[ $ORCHESTRATOR == swarm ]]; then
echo "docker stack deploy -c swarm/docker-compose_dev.yml pman_dev_stack" | ./boxes.sh ${LightCyan}
windowBottom
docker stack deploy -c swarm/docker-compose_dev.yml pman_dev_stack >& dc.out > /dev/null
docker stack deploy -c swarm/docker-compose_dev.yml pman_dev_stack
elif [[ $ORCHESTRATOR == kubernetes ]]; then
echo "envsubst < kubernetes/pman_dev.yaml | kubectl apply -f -" | ./boxes.sh ${LightCyan}
windowBottom
envsubst < kubernetes/pman_dev.yaml | kubectl apply -f - >& dc.out > /dev/null
echo "envsubst < kubernetes/pman_dev.yaml | kubectl apply -f -" | ./boxes.sh ${LightCyan}
envsubst < kubernetes/pman_dev.yaml | kubectl apply -f -
fi
echo -en "\033[2A\033[2K"
cat dc.out | sed -E 's/(.{80})/\1\n/g' | ./boxes.sh ${LightGreen}
windowBottom

title -d 1 "Waiting until pman container is running on $ORCHESTRATOR"
Expand All @@ -215,7 +211,7 @@ title -d 1 "Waiting until pman container is running on $ORCHESTRATOR"
for i in {1..30}; do
sleep 5
if [[ $ORCHESTRATOR == swarm ]]; then
pman_dev=$(docker ps -f name=pman_dev_stack_pman_service.1 -q)
pman_dev=$(docker ps -f name=pman_dev_stack_pman.1 -q)
elif [[ $ORCHESTRATOR == kubernetes ]]; then
pman_dev=$(kubectl get pods --selector="app=pman,env=development" --field-selector=status.phase=Running --output=jsonpath='{.items[*].metadata.name}')
fi
Expand Down
2 changes: 1 addition & 1 deletion swarm/docker-compose_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
version: '3.7'

services:
pman_service:
pman:
image: ${PMANREPO:?}/pman:dev
stdin_open: true # docker run -i
tty: true # docker run -t
Expand Down
12 changes: 4 additions & 8 deletions unmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,12 @@ shift $(($OPTIND - 1))

title -d 1 "Destroying pman containerized dev environment on $ORCHESTRATOR"
if [[ $ORCHESTRATOR == swarm ]]; then
echo "docker stack rm pman_dev_stack" | ./boxes.sh ${LightCyan}
windowBottom
docker stack rm pman_dev_stack >& dc.out >/dev/null
echo "docker stack rm pman_dev_stack" | ./boxes.sh ${LightCyan}
docker stack rm pman_dev_stack
elif [[ $ORCHESTRATOR == kubernetes ]]; then
echo "kubectl delete -f kubernetes/pman_dev.yaml" | ./boxes.sh ${LightCyan}
windowBottom
kubectl delete -f kubernetes/pman_dev.yaml >& dc.out >/dev/null
echo "kubectl delete -f kubernetes/pman_dev.yaml" | ./boxes.sh ${LightCyan}
kubectl delete -f kubernetes/pman_dev.yaml
fi
echo -en "\033[2A\033[2K"
cat dc.out | sed -E 's/(.{80})/\1\n/g' | ./boxes.sh ${LightGreen}
echo "Removing ./FS tree" | ./boxes.sh
rm -fr ./FS
windowBottom

0 comments on commit 35eb25b

Please sign in to comment.