@@ -19,52 +19,38 @@ openssl req -new -x509 -sha256 -newkey rsa:4096 -nodes -keyout ca_loki.key -out
19
19
20
20
# Create the Promtail ca
21
21
echo " Create the Promtail ca"
22
- openssl req -new -x509 -sha256 -newkey rsa:4096 -nodes -keyout ca_promtail.key -out ca_promtail.crt -days 3650 \
23
- -extensions ext \
24
- -config $path /ca_promtail.conf
22
+ openssl req -new -x509 -sha256 -newkey rsa:4096 -nodes -keyout ca_promtail.key -out ca_promtail.crt -days 3650 -extensions ext -config $path /ca_promtail.conf
25
23
26
24
# Create the server certificates
27
25
echo " Create the Loki server certificates"
28
26
openssl genrsa -out loki.key 4096
29
- openssl req -new -key loki.key -out loki.csr \
30
- -extensions v3_req \
31
- -config $path /server_loki.conf
32
- openssl x509 -inform der -req -days 1825 -in loki.csr -CA ca_loki.crt -CAkey ca_loki.key -CAcreateserial -out loki.pem -extensions v3_req -extfile $path /server_loki.conf
27
+ openssl req -new -key loki.key -out loki.csr -extensions v3_req -config $path /server_loki.conf
28
+ openssl x509 -inform pem -req -days 1825 -in loki.csr -CA ca_loki.crt -CAkey ca_loki.key -CAcreateserial -out loki.pem -extensions v3_req -extfile $path /server_loki.conf
33
29
34
30
# Create the Promtail certificates
35
31
echo " Create the Promtail server certificates"
36
32
openssl genrsa -out promtail.key 4096
37
- openssl req -new -key promtail.key -out promtail.csr \
38
- -extensions v3_req \
39
- -config $path /server_promtail.conf
40
- openssl x509 -inform der -req -days 1825 -in promtail.csr -CA ca_promtail.crt -CAkey ca_promtail.key -CAcreateserial -out promtail.pem -extensions v3_req -extfile $path /server_promtail.conf
33
+ openssl req -new -key promtail.key -out promtail.csr -extensions v3_req -config $path /server_promtail.conf
34
+ openssl x509 -inform pem -req -days 1825 -in promtail.csr -CA ca_promtail.crt -CAkey ca_promtail.key -CAcreateserial -out promtail.pem -extensions v3_req -extfile $path /server_promtail.conf
41
35
42
36
# Create the Syslog certificates
43
37
echo " Create the Syslog server certificates"
44
38
openssl genrsa -out syslog.key 4096
45
- openssl req -new -key syslog.key -out syslog.csr \
46
- -extensions v3_req \
47
- -config $path /server_syslog.conf
48
- openssl x509 -inform der -req -days 1825 -in syslog.csr -CA ca_syslog.crt -CAkey ca_syslog.key -CAcreateserial -out syslog.pem -extensions v3_req -extfile $path /server_syslog.conf
39
+ openssl req -new -key syslog.key -out syslog.csr -extensions v3_req -config $path /server_syslog.conf
40
+ openssl x509 -inform pem -req -days 1825 -in syslog.csr -CA ca_syslog.crt -CAkey ca_syslog.key -CAcreateserial -out syslog.pem -extensions v3_req -extfile $path /server_syslog.conf
49
41
50
42
# Create the client certificates
51
43
echo " Create the Grafana client certificates"
52
44
openssl genrsa -out grafana_client.key 4096
53
- openssl req -new -key grafana_client.key -out grafana_client.csr \
54
- -extensions v3_req \
55
- -config $path /client_loki.conf
56
- openssl x509 -req -days 1825 -in grafana_client.csr -CA ca_loki.crt -CAkey ca_loki.key -CAcreateserial -out grafana_client.crt -extensions v3_req -extfile $path /client_loki.conf
45
+ openssl req -new -key grafana_client.key -out grafana_client.csr -extensions v3_req -config $path /client_loki.conf
46
+ openssl x509 -inform pem -req -days 1825 -in grafana_client.csr -CA ca_loki.crt -CAkey ca_loki.key -CAcreateserial -out grafana_client.pem -extensions v3_req -extfile $path /client_loki.conf
57
47
58
48
echo " Create the Loki client certificates"
59
49
openssl genrsa -out loki_client.key 4096
60
- openssl req -new -key loki_client.key -out loki_client.csr \
61
- -extensions v3_req \
62
- -config $path /client_promtail.conf
63
- openssl x509 -req -days 1825 -in loki_client.csr -CA ca_promtail.crt -CAkey ca_promtail.key -CAcreateserial -out loki_client.crt -extensions v3_req -extfile $path /client_promtail.conf
50
+ openssl req -new -key loki_client.key -out loki_client.csr -extensions v3_req -config $path /client_promtail.conf
51
+ openssl x509 -inform pem -req -days 1825 -in loki_client.csr -CA ca_promtail.crt -CAkey ca_promtail.key -CAcreateserial -out loki_client.pem -extensions v3_req -extfile $path /client_promtail.conf
64
52
65
53
echo " Create the UPS client certificates"
66
54
openssl genrsa -out ups_client.key 4096
67
- openssl req -new -key ups_client.key -out ups_client.csr \
68
- -extensions v3_req \
69
- -config $path /client_syslog.conf
70
- openssl x509 -req -days 1825 -in ups_client.csr -CA ca_syslog.crt -CAkey ca_syslog.key -CAcreateserial -out ups_client.crt -extensions v3_req -extfile $path /client_syslog.conf
55
+ openssl req -new -key ups_client.key -out ups_client.csr -extensions v3_req -config $path /client_syslog.conf
56
+ openssl x509 -inform pem -req -days 1825 -in ups_client.csr -CA ca_syslog.crt -CAkey ca_syslog.key -CAcreateserial -out ups_client.pem -extensions v3_req -extfile $path /client_syslog.conf
0 commit comments