Skip to content

Commit 02aeadf

Browse files
author
Javier Lopez
committed
configuration for redis, haproxy and go for the environments: DEV, ACC, ACCHF, PRO
1 parent 8393d3a commit 02aeadf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3488
-0
lines changed
+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Readme: Scripts configuration for the GATE
2+
3+
## REDIS
4+
5+
### Update configuration
6+
7+
Copy the files in:
8+
/wifi4eu-apply/src/main/scripts/redis/<ENV-NODE>/
9+
10+
to the following in the remote machine:
11+
/home/<USER>/redis
12+
13+
### Start/Restart REDIS
14+
15+
```
16+
[devel@AZ-W4EDEVLIAMQ03 ~]$ sh redis/wifi4eu-redis-restart.sh
17+
18+
Starting redis-server
19+
20+
Starting redis-sentinel
21+
```
22+
23+
### Stop Go script
24+
25+
kill all related processes
26+
27+
### Check if REDIS is running
28+
29+
Processes should look like:
30+
```
31+
[devel@AZW4EDEVLIAMQ02 ~]$ ps aux | grep redis
32+
devel 52521 0.0 0.0 156348 2944 pts/0 Sl 14:31 0:00 redis-server *:9000
33+
devel 52526 0.2 0.0 153788 2868 pts/0 Sl 14:31 0:00 redis-server 10.0.2.32:5000 [sentinel]
34+
devel 52534 0.0 0.0 112660 972 pts/0 S+ 14:31 0:00 grep --color=auto redis
35+
```
36+
37+
38+
## HA PROXY
39+
40+
### Update configuration
41+
42+
Copy the files in:
43+
/wifi4eu-apply/src/main/scripts/haproxy/<ENV>/
44+
45+
to the following in the remote machine:
46+
/home/<USER>/haproxy
47+
48+
Then, copy the configuration itno HA PROXY
49+
```
50+
[devel@az-w4edevliamq01 ~]$ sudo cp haproxy/haproxy.cfg /etc/haproxy/
51+
```
52+
53+
### Start HA Proxy
54+
55+
```
56+
[devel@AZW4EDEVLIAMQ02 ~]$ sudo service haproxy start
57+
Redirecting to /bin/systemctl start haproxy.service
58+
```
59+
60+
### Stop HA Proxy
61+
62+
```
63+
[devel@AZW4EDEVLIAMQ02 ~]$ sudo service haproxy stop
64+
Redirecting to /bin/systemctl stop haproxy.service
65+
```
66+
67+
### Check if HA Proxy is running
68+
69+
Processes should look like:
70+
```
71+
[devel@az-w4edevliamq01 ~]$ ps aux |grep proxy
72+
root 80529 0.0 0.0 44676 1716 ? Ss Aug29 0:00 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
73+
haproxy 80530 0.0 0.0 83064 7008 ? S Aug29 0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
74+
haproxy 80531 0.0 0.9 147532 76012 ? Ss Aug29 18:03 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
75+
```
76+
77+
78+
## GO SCRIPT (GATE)
79+
80+
### Update configuration
81+
82+
Copy the files in:
83+
/wifi4eu-apply/src/main/scripts/go/<ENV>/
84+
85+
to the following folder in the remote machine:
86+
/home/<USER>
87+
88+
### Start/Restart Go script
89+
90+
```
91+
92+
[devel@AZ-W4EDEVLIAMQ03 ~]$ sudo sh wifi4eu-gate-restart.sh
93+
94+
95+
```
96+
97+
### Stop Go script
98+
99+
kill all related processes
100+
101+
### Check if Go script is running
102+
103+
Processes should look like:
104+
```
105+
[devel@AZW4EDEVLIAMQ02 ~]$ ps aux | grep go
106+
root 38503 0.0 0.0 456840 8044 ? Sl Sep18 0:04 go run /home/devel/wifi4eu-gate-redis-sync.go
107+
root 38603 0.0 0.1 351152 8872 ? Sl Sep18 0:54 /tmp/go-build478238943/command-line-arguments/_obj/exe/wifi4eu-gate-redis-sync
108+
```
109+
110+
111+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
3+
"dbUserName" : "user_rw",
4+
"dbPassword" : "532V301vO205lHz",
5+
"dbHost" : "wifi4eu-dbserver-acc.database.windows.net",
6+
"dbPort" : 1433,
7+
"dbName" : "wifi4eu-dbserver-acchf",
8+
9+
"haproxyUri" : "127.0.0.1:8000",
10+
"sentinelUris" : ["202.3.2.11:5000", "202.3.2.12:5000", "202.3.2.13:5000"]
11+
}

0 commit comments

Comments
 (0)