This repository has been archived by the owner on Feb 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathtest-broker.sh
115 lines (98 loc) · 3.25 KB
/
test-broker.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/bin/bash
# Test Broker Setup
# setup variables
source ./oo-install.conf
# Firewall on Broker
echo " === hit return to test firewall ==="
read testinput
echo "Testing Firewall"
echo " Firewall output should look like this"
echo " === begin cut here === "
echo "public"
echo " interfaces: eth0"
echo " sources:"
echo " services: mdns http dns dhcpv6-client ssh https"
echo " ports: 5672/tcp"
echo " masquerade: no "
echo " forward-ports: "
echo " icmp-blocks: "
echo " rich rules: "
echo " === end cut here === "
firewall-cmd --list-all
echo " === hit return to continue to next test ==="
read testinput
echo " "
echo " === hit return to test DNS server==="
read testinput
dig @127.0.0.1 ${BROKERHOSTNAME}
echo " "
## Services
echo "Checking Services"
echo " All services should be running without errors"
echo " "
echo " === hit return to test ntpd ==="
read testinput
/usr/bin/systemctl status ntpd.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart ntpd.service"
echo " "
echo " === hit return to test sshd ==="
read testinput
/usr/bin/systemctl status sshd.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart sshd.service"
echo " "
echo " === hit return to test named ==="
read testinput
/bin/systemctl status named.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart named.service"
echo " "
echo " === hit return to test qpid ==="
read testinput
/usr/bin/systemctl status qpidd.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart qpidd.service"
echo " "
echo " === hit return to test httpd ==="
read testinput
/usr/bin/systemctl status httpd.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart httpd.service"
echo " "
echo " === hit return to test mongod ==="
read testinput
/usr/bin/systemctl status mongod.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart mongod.service"
echo " "
echo " === hit return to test openshift-broker ==="
read testinput
/usr/bin/systemctl status openshift-broker.service
echo " "
echo " If this does not look correct, run the following to restart the service "
echo " /usr/bin/systemctl restart openshift-broker.service"
echo " "
echo "Done with service checking section"
echo " "
# Test broker rest api
echo " "
echo " === hit return to test broker rest api ==="
read testinput
echo "Testing Broker rest api"
echo " output should look sortof like this"
echo " === begin cut here === "
echo "{\"data\":{\"API\":{\"href\":\"https://localhost/broker/rest/api\",\"method\":\"GET\",\"optional_params\":[],\"rel\":\"API entry point\",\"required_params\":[]},\"GET_ENVIRONMENT"
echo "..."
echo "supported_api_versions\":[1.0,1.1,1.2,1.3],\"type\":\"links\",\"version\":\"1.3\"}"
echo " === end cut here === "
curl -k -u $OPENSHIFT_USER1:$OPENSHIFT_PASSWORD1 https://localhost/broker/rest/api
echo " "
echo " === hit return to continue to next test ==="
read testinput