From 90dff47feb06b1223ff4a450a287f34b7ec8c01f Mon Sep 17 00:00:00 2001 From: Joel Johnston Date: Sun, 29 Oct 2023 20:18:38 -0600 Subject: [PATCH] Try updating cert for 2023 --- .vscode/settings.json | 3 +++ cicd/Ansible-Playbook-Gateway-Deploy.yml | 4 ++-- cicd/PS-Activate-BLUE.ps1 | 2 +- cicd/PS-Activate-GREEN.ps1 | 2 +- ...tificate-2022.ps1 => PS-Get-Certificate-2023.ps1} | 4 ++-- gateway/joeljca.site.blue | 12 ++++++------ gateway/joeljca.site.green | 12 ++++++------ 7 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 .vscode/settings.json rename cicd/{PS-Get-Certificate-2022.ps1 => PS-Get-Certificate-2023.ps1} (61%) diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..781717b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "ansible.python.interpreterPath": "c:\\Users\\colte\\AppData\\Local\\Microsoft\\WindowsApps\\python3.11.exe" +} \ No newline at end of file diff --git a/cicd/Ansible-Playbook-Gateway-Deploy.yml b/cicd/Ansible-Playbook-Gateway-Deploy.yml index 0ddba23..4d71fa5 100644 --- a/cicd/Ansible-Playbook-Gateway-Deploy.yml +++ b/cicd/Ansible-Playbook-Gateway-Deploy.yml @@ -3,12 +3,12 @@ - name: copy TLS certificate copy: - src: ../tmp/joeljca-2022.crt + src: ../tmp/joeljca-2023.crt dest: /etc/ssl/certs/ - name: copy TLS key copy: - src: ../tmp/joeljca-2022.rsa + src: ../tmp/joeljca-2023.rsa dest: /etc/ssl/certs/ - name: copy http configuration diff --git a/cicd/PS-Activate-BLUE.ps1 b/cicd/PS-Activate-BLUE.ps1 index 3675de8..90a5899 100644 --- a/cicd/PS-Activate-BLUE.ps1 +++ b/cicd/PS-Activate-BLUE.ps1 @@ -7,7 +7,7 @@ Write-Host -ForegroundColor blue 'In Activate-BLUE' $CICDPath = Split-Path -Parent $MyInvocation.MyCommand.Path $RepoRootPath = Split-Path -Parent $CICDPath -& ${CICDPath}/PS-Get-Certificate-2022.ps1 $RepoRootPath +& ${CICDPath}/PS-Get-Certificate-3.ps1 $RepoRootPath $NginxConfigContent = & ${CICDPath}/PS-Generate-Nginx-Upstreams.ps1 Out-File -FilePath $RepoRootPath/tmp/joeljca.conf -InputObject $NginxConfigContent diff --git a/cicd/PS-Activate-GREEN.ps1 b/cicd/PS-Activate-GREEN.ps1 index 3e0fa23..f4be7dd 100644 --- a/cicd/PS-Activate-GREEN.ps1 +++ b/cicd/PS-Activate-GREEN.ps1 @@ -7,7 +7,7 @@ Write-Host -ForegroundColor green 'In Activate-GREEN' $CICDPath = Split-Path -Parent $MyInvocation.MyCommand.Path $RepoRootPath = Split-Path -Parent $CICDPath -& ${CICDPath}/PS-Get-Certificate-2022.ps1 $RepoRootPath +& ${CICDPath}/PS-Get-Certificate-2023.ps1 $RepoRootPath $NginxConfigContent = & ${CICDPath}/PS-Generate-Nginx-Upstreams.ps1 Out-File -FilePath $RepoRootPath/tmp/joeljca.conf -InputObject $NginxConfigContent diff --git a/cicd/PS-Get-Certificate-2022.ps1 b/cicd/PS-Get-Certificate-2023.ps1 similarity index 61% rename from cicd/PS-Get-Certificate-2022.ps1 rename to cicd/PS-Get-Certificate-2023.ps1 index 297081d..62c3d22 100644 --- a/cicd/PS-Get-Certificate-2022.ps1 +++ b/cicd/PS-Get-Certificate-2023.ps1 @@ -5,5 +5,5 @@ param( $ErrorActionPreference = "Stop" -Get-AzKeyVaultSecret -VaultName "joeljcakeys" -Name "joeljca-2022-chained-crt" -AsPlainText | Out-File -Path $RepoRootPath/tmp/joeljca-2022.crt -Get-AzKeyVaultSecret -VaultName "joeljcakeys" -Name "joeljca-2022-rsa" -AsPlainText | Out-File -Path $RepoRootPath/tmp/joeljca-2022.rsa \ No newline at end of file +Get-AzKeyVaultSecret -VaultName "joeljcakeys" -Name "joeljca-2023-crt" -AsPlainText | Out-File -Path $RepoRootPath/tmp/joeljca-2023.crt +Get-AzKeyVaultSecret -VaultName "joeljcakeys" -Name "joeljca-2023-rsa" -AsPlainText | Out-File -Path $RepoRootPath/tmp/joeljca-2023.rsa \ No newline at end of file diff --git a/gateway/joeljca.site.blue b/gateway/joeljca.site.blue index c296e09..c910109 100644 --- a/gateway/joeljca.site.blue +++ b/gateway/joeljca.site.blue @@ -10,8 +10,8 @@ server { # SSL configuration # listen 443 ssl default_server; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name www.joelj.ca joelj.ca; @@ -25,8 +25,8 @@ server { # SSL configuration # listen 443 ssl; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name wwwblue.joelj.ca; @@ -39,8 +39,8 @@ server { # SSL configuration # listen 443 ssl; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name wwwgreen.joelj.ca; diff --git a/gateway/joeljca.site.green b/gateway/joeljca.site.green index 2f065d1..d66c8fe 100644 --- a/gateway/joeljca.site.green +++ b/gateway/joeljca.site.green @@ -10,8 +10,8 @@ server { # SSL configuration # listen 443 ssl default_server; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name www.joelj.ca joelj.ca; @@ -25,8 +25,8 @@ server { # SSL configuration # listen 443 ssl; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name wwwblue.joelj.ca; @@ -39,8 +39,8 @@ server { # SSL configuration # listen 443 ssl; - ssl_certificate /etc/ssl/certs/joeljca-2022.crt; - ssl_certificate_key /etc/ssl/certs/joeljca-2022.rsa; + ssl_certificate /etc/ssl/certs/joeljca-2023.crt; + ssl_certificate_key /etc/ssl/certs/joeljca-2023.rsa; server_name wwwgreen.joelj.ca;