Skip to content

Commit 6b1e9aa

Browse files
committed
Precreate default SSL certificate for CDS machine
1 parent cfcb3cf commit 6b1e9aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

provision-contest/ansible/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ SSL_DOMSERVER=roles/ssl/files/domserver
1414
SSL_DOMSERVER_FILES=$(addprefix $(SSL_DOMSERVER),.key .crt)
1515
SSL_LOCALHOST=roles/ssl/files/localhost
1616
SSL_LOCALHOST_FILES=$(addprefix $(SSL_LOCALHOST),.key .crt)
17+
SSL_CDS=roles/ssl/files/cds
18+
SSL_CDS_FILES=$(addprefix $(SSL_CDS),.key .crt)
1719
SSL_GRAFANA=roles/grafana/files/ssl
1820
SSL_GRAFANA_FILES=$(addprefix $(SSL_GRAFANA),.key .crt)
1921

@@ -31,6 +33,7 @@ domserver judgehost admin grafana cds scoreboard mgmt: %: %.yml hosts group_vars
3133
admin: $(SSL_LOCALHOST_FILES)
3234
grafana: $(SSL_GRAFANA_FILES)
3335
domserver: $(SSL_DOMSERVER_FILES)
36+
cds: $(SSL_CDS_FILES)
3437

3538
$(SSHKEY) $(SSHKEY).pub:
3639
ssh-keygen -t rsa -f $(SSHKEY) -P ''
@@ -41,6 +44,9 @@ $(SSL_DOMSERVER_FILES):
4144
$(SSL_LOCALHOST_FILES):
4245
openssl req -x509 -nodes -newkey rsa:4096 -subj "/O=DOMjudge/CN=localhost" \
4346
-sha256 -days 365 -keyout $(SSL_LOCALHOST).key -out $(SSL_LOCALHOST).crt
47+
$(SSL_CDS_FILES):
48+
openssl req -x509 -nodes -newkey rsa:4096 -subj "/O=DOMjudge/CN=cds" \
49+
-sha256 -days 365 -keyout $(SSL_CDS).key -out $(SSL_CDS).crt
4450
$(SSL_GRAFANA_FILES):
4551
openssl req -x509 -nodes -newkey rsa:4096 -subj "/O=DOMjudge/CN=grafana" \
4652
-sha256 -days 365 -keyout $(SSL_GRAFANA).key -out $(SSL_GRAFANA).crt
@@ -52,6 +58,7 @@ distclean: clean
5258
rm -f $(SSHKEY) $(SSHKEY).pub
5359
rm -f $(SSL_DOMSERVER_FILES)
5460
rm -f $(SSL_LOCALHOST_FILES)
61+
rm -f $(SSL_CDS_FILES)
5562
rm -f $(SSL_GRAFANA_FILES)
5663

5764
.PHONY: default clean distclean domserver judgehost admin grafana cds scoreboard

0 commit comments

Comments
 (0)