Skip to content

Commit aae4156

Browse files
author
Kyle Brown
committedJul 20, 2017
quay-enterprise:
- adds a doc that describes the process to redirect quay-enterprise logs to stdout. - edit to clair.md to reflect how the CA cert must be passed when using a self-signed cert for qe

File tree

2 files changed

+74
-1
lines changed

2 files changed

+74
-1
lines changed
 

‎quay-enterprise/clair.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Similar to the process for setting up Docker to [trust your self-signed certific
225225
2. Make sure the `ca.crt` file is mounted inside the Clair container under `/usr/local/share/ca-certificates/` as in the example below:
226226

227227
```
228-
docker run --restart=always -p 6060:6060 -p 6061:6061 -v /path/to/clair/config/directory:/config -v /path/to/quay/cert/directory:/usr/local/share/ca-certificates quay.io/coreos/clair-jwt:v2.0.0
228+
docker run --restart=always -p 6060:6060 -p 6061:6061 -v /path/to/clair/config/directory:/config -v /path/to/quay/cert/ca.crt:/usr/local/share/ca-certificates/ca.crt quay.io/coreos/clair-jwt:v2.0.0
229229
```
230230

231231
Now Clair will be able to trust the source of your TLS certificates and use them to secure communication between Clair and Quay.
+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## Redirecting syslog to /dev/stdout
2+
3+
By default, Quay Enterprise logs most relevant for debugging to `/var/log/syslog` within the container. [syslog-ng](https://en.wikipedia.org/wiki/Syslog-ng) can be configured to redirect these logs to `/dev/stdout` which will allow for collection by most logging solutions:
4+
5+
Create `syslog-ng-extra.conf` with the following content:
6+
7+
```
8+
source s_docker_syslog { file("/var/log/syslog"); };
9+
destination d_docker_syslog { file("/dev/stdout"); };
10+
log {
11+
source(s_docker_syslog);
12+
destination(d_docker_syslog);
13+
14+
};
15+
```
16+
### Single Container
17+
18+
Place the `syslog-ng-extra.conf` file into the configuration directory:
19+
20+
```
21+
$ ls quay/config/
22+
config.yaml license ssl.cert ssl.key syslog-ng-extra.conf
23+
```
24+
25+
Restart the Quay Enterprise container:
26+
27+
```
28+
$ docker ps
29+
0f6c27088c32 quay.io/coreos/quay:v2.4.0 "/sbin/my_init" 27 hours ago Up 3 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 8443/tcp epic_banach
30+
31+
docker restart 0f6c27088c32
32+
```
33+
34+
### Kubernetes
35+
36+
base64 encode the `syslog-ng-extra.conf` file:
37+
38+
```
39+
$ cat /config/syslog-ng-extra.conf | base64 -w 0
40+
41+
c291cmNlIHNfZG9ja2VyX3N5c2xvZyB7IGZpbGUoIi92YXIvbG9nL3N5c2xvZyIpOyB9Owpk
42+
ZXN0aW5hdGlvbiBkX2RvY2tlcl9zeXNsb2cgeyBmaWxlKCIvZGV2L3N0ZG91dCIpOyB9Owpsb
43+
2cgeyAKCXNvdXJjZShzX2RvY2tlcl9zeXNsb2cpOyAKCWRlc3RpbmF0aW9uKGRfZG9ja2VyX
44+
3N5c2xvZyk7IAoKfTsK
45+
```
46+
47+
Edit the Quay Enterprise config secret file:
48+
49+
```
50+
$ kubectl --namespace quay-enterprise edit secret/quay-enterprise-config-secret
51+
```
52+
53+
Add an entry for the `syslog-ng-extra.conf` file:
54+
55+
```
56+
syslog-ng-extra.conf:
57+
<-base64 encoded syslog-ng-extra.conf->
58+
```
59+
60+
Delete `quay-enterprise-app` pods to trigger the quay-enterprise deployment to schedule pods with the updated configuration:
61+
62+
```
63+
$ kubectl -n quay-enterprise get pods
64+
NAME READY STATUS RESTARTS AGE
65+
quay-enterprise-app-1576414776-vv4vv 1/1 Running 0 3h
66+
quay-enterprise-app-1623234786-twrc2 1/1 Running 0 3h
67+
quay-enterprise-redis-3163299701-mdw95 1/1 Running 0 3h
68+
```
69+
70+
```
71+
$ kubectl -n quay-enterprise delete pod/quay-enterprise-app-1576414776-vv4vv
72+
$ kubectl -n quay-enterprise delete pod/quay-enterprise-app-1623234786-twrc2
73+
```

0 commit comments

Comments
 (0)
Please sign in to comment.