@@ -9,25 +9,20 @@ Now hosted on https://coverage.seattlecommunitynetwork.org/
9
9
To install this service, the fist time, you will need to:
10
10
11
11
1 . Required tools and versions:
12
- 1 . node
13
- 2 . npm
12
+ 1 . Install ` node ` and ` npm ` according to the directions at https://nodejs.org/en/download/package-manager
13
+ 2 . Install ` pm2 ` using: ` npm install pm2 -g ` (as per https://www.npmjs.com/package/pm2#installing-pm2 )
14
14
2 . Configure:
15
- 1 . x
16
- 2 . y
17
- 3 . z
15
+ 1 . Edit ` src/utils/config.ts ` and set the correct URL for your API host (if you're testing or you're deploying to a new URL).
18
16
3 . Deploy as below.
19
17
20
- * What tools are needed and how are they installed?
21
- * What configuration is needed?
22
- * How is configuration set?
23
-
24
18
25
19
## Deploying
26
20
Once the service has been setup (as above), it can be deployed using the following process:
27
21
1 . Login to the <coverage-host >
28
22
2 . Pull the lastest version from github
29
23
3 . Restart the server
30
24
25
+ The shell commands are:
31
26
```
32
27
ssh <coverage-host>
33
28
cd ccn-coverage-vis
@@ -43,28 +38,57 @@ When a problem occurs, there are several checks to determine where the failure i
43
38
3 . Confirm nginx is operating as expected
44
39
45
40
### Checking HTTP errors in the browser
41
+ First, open your browser and go to: https://coverage.seattlecommunitynetwork.org/
42
+
43
+ Is it working?
44
+
45
+ If not, open up the browser ** Web Developer Tools** , usually under the menu Tools > Developer Tools > Web Developer Tools.
46
+
47
+ With this panel open at the bottom of the screen select the ** Network** tab and refresh the browser page.
46
48
49
+ Look in the first column, Status:
50
+ * 200: Ok
51
+ * 502: Error with the backend services (behind nginx)
52
+ * 500 errors: problem with nxginx. Look in ` /var/log/nginx/error.log ` for details.
53
+ * 400 errors: problem with the service. Check the service logs and nginx logs.
54
+ * Timeout or unreachable error: Something is broken in the network between your web browser and the coverage-vis host.
47
55
48
56
49
57
### Checking ccn-coverage-vis with pm2
58
+ Next, confirm ccn-coverage-vis is operating as expected. To do this, you will need to be able to log into the server hosting the coverage service.
50
59
60
+ Use ` pm2 list ` to confirm the "Vis Server" is ** online**
51
61
```
52
62
ssh <coverage-host>
53
63
pm2 list
54
- # expect "API" in the list, expect running, screenshot
55
64
```
65
+ ![ Online services under PM2] ( pm2-running-services.png " Online services under PM2 ")
56
66
57
-
58
- Running? check pm2
67
+ If the "Vis Server" is not online as expected, restart it with:
68
+ ```
69
+ pm2 restart Vis Server
70
+ ```
59
71
60
72
61
73
### Checking nginx
74
+ If there appear problems with nginx, then check that the
62
75
63
- Check service operation
76
+ Check service operation:
77
+ ```
78
+ systemctl status nginx
79
+ ```
64
80
65
- Check nginx logs
81
+ Check nginx logs:
82
+ ```
83
+ sudo tail /var/log/nginx/error.log
84
+ ```
66
85
86
+ Sources of errors might include nginx configuration in ` /etc/nginx/conf.d/01-ccn-coverage.conf `
67
87
88
+ If you need to restart nginx, use:
89
+ ```
90
+ sudo systemctl restart nginx
91
+ ```
68
92
69
93
## Testing
70
94
0 commit comments