Skip to content

Commit d86884a

Browse files
committed
add sign-cert script and update tls.toml
Signed-off-by: hexilee <[email protected]>
1 parent 38cf039 commit d86884a

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

config-examples/tls.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
ca-path = "/root/.tifs/tls/ca.pem"
2-
cert-path = "/root/.tifs/tls/cert.pem"
3-
key-path = "/root/.tifs/tls/key.pem"
1+
ca-path = "/root/.tifs/tls/ca.crt"
2+
cert-path = "/root/.tifs/tls/client.crt"
3+
key-path = "/root/.tifs/tls/client.key"

sign-cert.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#! /bin/bash
2+
set +e
3+
4+
mkdir -p easyrsa
5+
cd easyrsa
6+
curl -L https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.6/EasyRSA-unix-v3.0.6.tgz \
7+
| tar xzv --strip-components=1
8+
9+
./easyrsa init-pki \
10+
&& ./easyrsa build-ca nopass
11+
12+
NUM_PD_NODES=1
13+
for i in $(seq 1 $NUM_PD_NODES); do
14+
./easyrsa gen-req pd$i nopass
15+
./easyrsa sign-req server pd$i
16+
done
17+
18+
NUM_TIKV_NODES=1
19+
for i in $(seq 1 $NUM_TIKV_NODES); do
20+
./easyrsa gen-req tikv$i nopass
21+
./easyrsa sign-req server tikv$i
22+
done
23+
24+
./easyrsa gen-req client nopass
25+
./easyrsa sign-req server client

0 commit comments

Comments
 (0)