File tree Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Expand file tree Collapse file tree 2 files changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -59,20 +59,6 @@ services:
59
59
registry :
60
60
condition : service_healthy
61
61
62
- # registry ca.crt download
63
- registry-ca-crt-download :
64
- image : alpine
65
- entrypoint : wget
66
- working_dir : /code
67
- command : ["http://$TINKERBELL_HOST_IP:42114/cert", "-O", "ca.pem"]
68
- volumes :
69
- - ${REPO_TOP_LEVEL:-.}/state/webroot/workflow:/code
70
- depends_on :
71
- tink-server :
72
- condition : service_healthy
73
- db :
74
- condition : service_healthy
75
-
76
62
# Create hardware, template, and workflow records in tink-server
77
63
create-tink-records :
78
64
image : ${TINK_CLI_IMAGE}
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
# This script handles the generation of the TLS certificates.
3
- # The output is 4 files:
3
+ # This generates the files:
4
4
# 1. /certs/${FACILITY:-onprem}/ca-crt.pem (CA TLS public certificate)
5
5
# 2. /certs/${FACILITY:-onprem}/server-crt.pem (server TLS certificate)
6
6
# 3. /certs/${FACILITY:-onprem}/server-key.pem (server TLS private key)
7
7
# 4. /certs/${FACILITY:-onprem}/bundle.pem (server TLS certificate; backward compat)
8
+ # 5. /code/state/webroot/workflow/ca.pem (CA TLS public certificate)
8
9
9
- set -xo pipefail
10
+ set -euxo pipefail
10
11
11
12
# update_csr will add the sans_ip, as a valid host domain in the csr
12
13
update_csr () {
@@ -36,6 +37,7 @@ gen() {
36
37
main () {
37
38
local sans_ip=" $1 "
38
39
local csr_file=" /code/tls/csr.json"
40
+ local ca_crt_workflow_file=" /code/state/webroot/workflow/ca.pem"
39
41
local ca_crt_file=" /certs/${FACILITY:- onprem} /ca-crt.pem"
40
42
local server_crt_file=" /certs/${FACILITY:- onprem} /server-crt.pem"
41
43
local server_key_file=" /certs/${FACILITY:- onprem} /server-key.pem"
@@ -55,6 +57,11 @@ main() {
55
57
else
56
58
echo " Files [${ca_crt_file} , ${server_crt_file} , ${server_key_file} ] already exist"
57
59
fi
60
+ if [ ! -f " ${ca_crt_workflow_file} " ]; then
61
+ cp " ${ca_crt_file} " " ${ca_crt_workflow_file} "
62
+ else
63
+ echo " File ${ca_crt_workflow_file} already exist"
64
+ fi
58
65
cleanup
59
66
}
60
67
You can’t perform that action at this time.
0 commit comments