Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 904 Bytes

self-signed-certs.md

File metadata and controls

36 lines (23 loc) · 904 Bytes

Certificates

Creation

To create a certificate - run:

openssl req -x509 -sha256 -nodes -newkey rsa:4096 -keyout infra.key -out infra.crt -days 365 -addext "subjectAltName = DNS:*.${infra.domain}"

Note that we use -nodes to not require a password to not pass it to Traefik

Automatic

  • Copy the certificates to the infra/services/core/config/certs/.

  • Run vagrant provision --provision-with=preconfigure,configure

  • Run vagrant provision --provision-with=core-install,core

  • Enter virtual machine with vagrant ssh

  • Run sudo systemctl restart docker.service

Manual Usage

To use the Registry with self-signed certificates it's important to add them to each node:

For Linux:

/etc/docker/certs.d/registry.${infra.domain}/ca.crt

For Windows:

Import-Certificate -FilePath "C:\vagrant\..." -CertStoreLocation Cert:\LocalMachine\Root