TLS Certificates Requirer

  • Canonical Telco
Channel Revision Published Runs on
latest/stable 102 17 Sep 2024
Ubuntu 22.04
latest/stable 89 29 May 2024
Ubuntu 22.04
latest/candidate 102 17 Sep 2024
Ubuntu 22.04
latest/beta 102 17 Sep 2024
Ubuntu 22.04
latest/edge 108 18 Oct 2024
Ubuntu 22.04
latest/edge 107 18 Oct 2024
Ubuntu 22.04
juju deploy tls-certificates-requirer --channel beta
Show information

Platform:

Ubuntu
22.04

Getting Started

In this tutorial, we will use the Self Signed Certificates Operator to provide X509 certificates to the TLS Certificates Requirer tusing the tls-certificates integration.

1. Install pre-requisites

Install MicroK8s:

sudo snap install microk8s

Enable the hostpath-storage MicroK8s add-on:

microk8s enable hostpath-storage

Install Juju:

sudo snap install juju

2. Bootstrap a Juju controller

Bootstrap a Juju controller:

juju bootstrap microk8s

Create a Juju model:

juju add-model demo

3. Deploy and integrate the charms

Deploy the Self Signed Certificates operator:

juju deploy self-signed-certificates

Deploy the TLS Certificates Requirer operator:

juju deploy tls-certificates-requirer --channel=edge

Integrate the two:

juju integrate tls-certificates-requirer self-signed-certificates

Wait for both charms to be in the Active/Idle state:

ubuntu@server:~$ juju status
Model  Controller     Cloud/Region   Version  SLA          Timestamp
demo   aws-us-east-2  aws/us-east-2  3.1.7    unsupported  20:06:22-05:00

App                        Version  Status  Scale  Charm                      Channel  Rev  Exposed  Message
self-signed-certificates            active      1  self-signed-certificates   stable    57  no       
tls-certificates-requirer           active      1  tls-certificates-requirer  edge      27  no       Certificate is available

Unit                          Workload  Agent  Machine  Public address  Ports  Message
self-signed-certificates/0*   active    idle   0        18.226.164.205         
tls-certificates-requirer/0*  active    idle   1        3.17.179.73            Certificate is available

Machine  State    Address         Inst id              Base          AZ          Message
0        started  18.226.164.205  i-02fef38d887ce357f  ubuntu@22.04  us-east-2a  running
1        started  3.17.179.73     i-0d9d6231ee5b7c1e9  ubuntu@22.04  us-east-2a  running

4. Retrieve the TLS Certificates

Use the TLS Certificates Requirer’s get-certificate action to retrieve the Let’s Encrypt certificate:

juju run tls-certificates-requirer/0 get-certificate

You should expect this output (with different certificates of course):

ubuntu@server:~$ juju run tls-certificates-requirer/0 get-certificate
Running operation 1 with 1 task
  - task 2 on unit-tls-certificates-requirer-0

Waiting for task 2...
ca-certificate: |-
  -----BEGIN CERTIFICATE-----
  MIIDZzCCAk+gAwIBAgIUVDNDj2jL72Qdmh19ACQDRjj0Wi0wDQYJKoZIhvcNAQEL
  BQAwOTELMAkGA1UEBhMCVVMxKjAoBgNVBAMMIXNlbGYtc2lnbmVkLWNlcnRpZmlj
  YXRlcy1vcGVyYXRvcjAeFw0yNDAxMTgwMTA0MDBaFw0yNTAxMTcwMTA0MDBaMDkx
  CzAJBgNVBAYTAlVTMSowKAYDVQQDDCFzZWxmLXNpZ25lZC1jZXJ0aWZpY2F0ZXMt
  b3BlcmF0b3IwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrFoRCfr9R
  PCnvAeewEPjXOF55WWhFjpRm4VcsO1uninMaSAYQc1TRJMdQvK00ia69dY2CmEE+
  UK0DrG4sCqnWH2RG0LzP/XN8YkM6eEs2BF9j66ytqA2JIvinAxdtnejaUNHqwiYc
  qtXffs8QYye15gCO2aq7bX4N7EH57g2w4aMXlzhWOLBFkD3Q0qL1P3N2i6WyA1iK
  YyAhisH3bbHNuJWyxQHjO8ZIBHoZfJqtCqG8ApgFwrxymZWI7dnRxJ7NPGzKiuxr
  E5GPeCk5X0hWqENhuXjrqVjD4KQt0lOMNBmaIHlYRwl5DCXRUH+wiEybMycAd++W
  b5q0jIxNKv//AgMBAAGjZzBlMB8GA1UdDgQYBBYEFI7WwNj89CcPj52In4ehI7xh
  B9Y7MCEGA1UdIwQaMBiAFgQUjtbA2Pz0Jw+PnYifh6EjvGEH1jswDgYDVR0PAQH/
  BAQDAgKkMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHic4ute
  X+iekxsjujKkHsIzF1cgpK83P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C2PC+Cx5CJdM0c3ZaUeS2T8Ng
  Ex0vEbNXsQIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAHNIvxBpCySo/eo4CtFC
  KoTMBTEh7EwoNXQ1mNaGsC9hT5FJSCemQLMoTNXL0NxcnpnOpubouFUiBP96jRB/
  92r+gtq1XkgZL2Qt51Qt6p+kgEIU8dmJ/0oTMjmYR3FuFQI5EiUopxrfeQz6Vzza
  4Zmje2VKiZ2vJw1brajGh9UcMSEuR8lQqDCdW06fYVUkCkB8sagUfQAG50e6sbiT
  xFonW9hw6ygx/dV427wfMM0s5rTAWds5WsERFF6RGt52xGADTc9vG/1TUJGUJ0px
  0ID2v6diQO9t5SErRBg2wKSQ80ZqHDUd1OEaBs5ekZd/+/+RxtWjPEvTQioJ2D4B
  13M=
  -----END CERTIFICATE REQUEST-----



Help improve this document in the forum (guidelines). Last updated 10 months ago.