Skip to content

Commit

Permalink
Merge pull request #1 from DecisiveAI/self-signed-cert
Browse files Browse the repository at this point in the history
create self-signed cert and import into ACM
  • Loading branch information
arcanez committed Mar 6, 2024
2 parents 331be70 + a481e00 commit f40abbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,12 @@ realclean:
.PHONY: install
.SILENT: install
install: npm-init bootstrap cdk kubectl-config set-role-map

.PHONY: cert
.SILENT: cert
cert:
ACM_ARN=$(shell openssl req -new -x509 -sha256 -nodes -newkey rsa:4096 -keyout /tmp/private_mdai.key -out /tmp/certificate_mdai.crt -subj "/CN=${MDAI_UI_HOSTNAME}" && \
aws acm import-certificate --region ${AWS_REGION} --certificate fileb:///tmp/certificate_mdai.crt --private-key fileb:///tmp/private_mdai.key --output text) ; \
grep -v "MDAI_UI_ACM_ARN" .env > .env.tmp && mv .env.tmp .env; \
echo "MDAI_UI_ACM_ARN=$${ACM_ARN}" >> .env; \
rm -f /tmp/certificate_mdai.crt /tmp/private_mdai.key
2 changes: 2 additions & 0 deletions values/aws.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ MDAI_EC2_INSTANCE_CLASS=t2
MDAI_EC2_INSTANCE_SIZE=micro
MDAI_CLUSTER_CAPACITY=10
MDAI_UI_ACM_ARN=
MDAI_UI_ACM_ARN=
MDAI_UI_HOSTNAME=

0 comments on commit f40abbb

Please sign in to comment.