forked from conjurdemos/conjur-intro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start
executable file
·59 lines (43 loc) · 1.37 KB
/
start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash -ex
function finish {
docker-compose down -v
rm -rf cli_cache
}
function print_help() {
cat << EOF
NAME
Starts and configures a Conjur Appliance. Once Conjur is configured, the
appliance logs are streamed.
SYNOPSIS
start [global options]
GLOBAL OPTIONS
-h, --help - Show this message
--skip-pull - Does not pull a fresh Conjur master before starting
-t, --tag <appliance-tag> - Starts a Conjur Appliance of the version specified
--with-config - Configures the Appliance using the `config/conjur.json` file
EOF
exit
}
PULL_ARGS="--pull"
TAG="5.0-stable"
CONFIG=""
while true ; do
case "$1" in
--skip-pull ) PULL_ARGS="" ; shift ;;
-h | --help ) print_help ; shift ;;
-t | --tag ) shift ; TAG="$1" ; shift ;;
--with-config ) CONFIG="-j /opt/config/conjur.json" ; shift ;;
* ) if [ -z "$1" ]; then break; else echo "$1 is not a valid option"; exit 1; fi;;
esac
done
trap finish EXIT
export IMAGE_TAG=$TAG
if [ "$PULL_ARGS" == "--pull" ]; then
docker pull registry2.itci.conjur.net/conjur-appliance:$IMAGE_TAG
docker pull conjurinc/cli5
fi
docker-compose up -d --no-deps conjur
docker-compose exec conjur bash -c "
evoke configure master $CONFIG -h conjur-master.local -p MySecretP@ss1 --accept-eula demo
"
docker-compose logs -f conjur