-
Notifications
You must be signed in to change notification settings - Fork 5
/
test_deploy.sh
executable file
·52 lines (49 loc) · 1.55 KB
/
test_deploy.sh
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
#!/bin/bash
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2023, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
echo "Stop and remove containers"
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
echo "Prune docker networks"
docker network prune -f
echo "Creating zep network"
docker network create zep-network
echo "Creating rabbitmq container"
docker run --rm -d \
--user rabbitmq \
--name rbtmq-zep \
--network zep-network \
--network-alias rabbitmq \
--add-host rbt0:127.0.0.1 \
gcr.io/zing-registry-188222/rabbitmq:b9c8d4a \
/opt/rabbitmq/sbin/rabbitmq-server
echo "Creating redis container"
docker run --rm -d \
--name redis-zep \
--network zep-network \
--network-alias redis \
gcr.io/zing-registry-188222/redis:83ab373 \
/usr/bin/redis-server /etc/redis/redis.conf --daemonize no --bind 0.0.0.0
echo "Creating mysql container"
docker run --rm -d \
--name mysqlzep \
--network zep-network \
--network-alias mysql \
-p 3306:3306 \
-h 127.0.0.1 \
-e MYSQL_ROOT_PASSWORD='root' \
vsamov/mysql-5.1.73:latest
echo "Creating zep-test container"
docker run --rm -it \
--name zep-test \
--network zep-network \
-p 8084:8084 \
-w /opt/zenoss \
--entrypoint /bin/bash \
zenoss/zep-test-image