fix build and deploy of sslproxy

This commit is contained in:
2020-06-06 01:25:44 -04:00
parent 7175a4fb2d
commit 4439ae493d
15 changed files with 98 additions and 25 deletions

View File

@@ -77,8 +77,8 @@ function assertTeapot() {
build_save() {
echo push to registry
docker tag $LOCAL_IMAGE $REMOTE_IMAGE
docker push $REMOTE_IMAGE
docker tag "$LOCAL_IMAGE:$TAG" "$REMOTE_IMAGE"
docker push "$REMOTE_IMAGE"
}
function trap_exit() {

View File

@@ -4,7 +4,7 @@ set -e
LOCAL_IMAGE=sslproxy
TAG=2.2.${BUILD_NUMBER:-dev}
TAG=2.1
#TAG=2.1
REMOTE_IMAGE=dkregistry.xai-corp.net:5000/${LOCAL_IMAGE}:${TAG}
APP_NAME=sslproxy_app
@@ -25,10 +25,10 @@ function deploy() {
-c docker-compose.prod.yml \
sslproxy
docker stack ps sslproxy
sleep 2
docker service ps --filter "desired-state=Running" sslproxy_app
docker stack ps sslproxy
# docker service ps --filter "desired-state=Running" sslproxy_app
wait_for_completed
}
@@ -41,6 +41,7 @@ wait_for_completed() {
sleep 3
state=$(docker service inspect sslproxy_app | jq -r .[0].UpdateStatus.State)
done
sleep 5
}
function deploy_test() {
@@ -57,8 +58,8 @@ function deploy_test() {
function deploy_save() {
#tag as latest
docker tag "$REMOTE_IMAGE" latest
docker push latest
docker tag "$REMOTE_IMAGE" "${REMOTE_IMAGE//${TAG}/latest}"
docker push "${REMOTE_IMAGE//${TAG}/latest}"
}
dc() {

View File

@@ -1,3 +1,8 @@
ARGS - The arguments you wish to provide to this command
-d deploy
-t test the deployment
-s mark the deployment as complete
TODO: Fill out the help information for this command.
Environment Variables:
BUILD_NUMBER : is used in the image tag 2.2.$BUILD_NUMBER
DOCKER_HOST

View File

@@ -1 +1 @@
ARGS...
[-d][-t][-s]

View File

@@ -3,9 +3,13 @@ set -e
export DOCKER_HOST=${DOCKER_HOST:-'dkhost:2376'}
#docker exec $@
container=$(docker ps -qn1)
# shellcheck disable=SC2068
docker exec -it "$container" $@
#docker network inspect ingress
#docker service $@
docker $@
#docker $@
#wget --no-check-certificate --spider -S --header='Host: abcapi.xai-corp.net' https://localhost/

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -e
export DOCKER_HOST=${DOCKER_HOST:-'dkhost:2376'}
#container=$(docker service ps -q --filter "desired-state=Running" sslproxy_app | head -n 1)
inspect_service() {
docker service ps --filter "desired-state=Running" sslproxy_app
}
inspect_stack() {
docker stack ps --filter "desired-state=Running" sslproxy
}
inspect_containers() {
docker ps -n2
}
if [ "$1" == "service" ]; then
inspect_service
elif [ "$1" == "stack" ]; then
inspect_stack
else
inspect_containers
fi

View File

@@ -0,0 +1,3 @@
ARGS - The arguments you wish to provide to this command
TODO: Fill out the help information for this command.

View File

@@ -0,0 +1 @@
ARGS...