-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of Neustar DNS provisioning and wildcard certificate provisi…
…oning (#157) * Reference playbook in openshift-tooling repo to setup cluster DNS records * Test removing post-deployment registry cert tasks * Removal of certbot as a tool to request Let's Encrypt certificates * Tidy up post-deployment certificate tasks and split acme.sh into individual playbook * Remove unnecessary condition since getCertificates is a boolean * Remove unnecessary conditions from boolean variables * Addition of playbook to replace certificates used within cluster as part of acme.sh post-renew hook * Change task name for clarity * Change delegate_to tasks to loopback IP as opposed to hostname * Remove * from directory name * Remove * from directory name
- Loading branch information
Showing
6 changed files
with
62 additions
and
139 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
- hosts: dns, dns_net2 | ||
roles: | ||
- dns | ||
|
||
- name: Create external DNS records for cluster | ||
import_playbook: /home/cloud-user/openshift-tooling/neustar-ultradns/deployment.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
- import_playbook: /usr/share/ansible/openshift-ansible/playbooks/openshift-master/redeploy-certificates.yml | ||
|
||
- import_playbook: /usr/share/ansible/openshift-ansible/playbooks/openshift-hosted/redeploy-router-certificates.yml | ||
|
||
- hosts: masters[0] | ||
|
||
vars: | ||
certificate: "{{ lookup('file', '/home/cloud-user/' + domainSuffix + '/fullchain.pem').split('\n') }}" | ||
key: "{{ lookup('file', '/home/cloud-user/' + domainSuffix + '/privkey.pem').split('\n') }}" | ||
|
||
tasks: | ||
- name: Setup default router environment | ||
command: /usr/local/bin/oc set env dc/router {{ item }} -n default | ||
with_items: | ||
- ROUTER_USE_PROXY_PROTOCOL=true | ||
- ROUTER_LOG_LEVEL=debug | ||
|
||
- name: Patch syslog pod into router deployment | ||
command: /usr/local/bin/oc patch dc/router -p '{"spec":{"template":{"spec":{"containers":[{"name":"router","env":[{"name":"ROUTER_SYSLOG_ADDRESS","value":"/var/lib/rsyslog/rsyslog.sock"}],"volumeMounts":[{"mountPath":"/var/lib/rsyslog","name":"rsyslog-socket"}]},{"name":"syslog","command":["/sbin/rsyslogd","-n","-i","/tmp/rsyslog.pid","-f","/etc/rsyslog/rsyslog.conf"],"image":"registry.redhat.io/openshift3/ose-haproxy-router:v3.11","imagePullPolicy":"IfNotPresent","resources":{"requests":{"cpu":"50m","memory":"256Mi"}},"volumeMounts":[{"mountPath":"/etc/rsyslog","name":"rsyslog-config"},{"mountPath":"/var/lib/rsyslog","name":"rsyslog-socket"}]}],"volumes":[{"configMap":{"name":"rsyslog-config"},"name":"rsyslog-config"},{"emptyDir":{},"name":"rsyslog-socket"}]}}}}' -n default | ||
|
||
- name: Create registry console cert | ||
shell: cat fullchain.pem privkey.pem > registry.cert | ||
args: | ||
chdir: "/home/cloud-user/{{ domainSuffix }}" | ||
delegate_to: 127.0.0.1 | ||
run_once: yes | ||
|
||
- name: Move registry.cert across to masters[0] | ||
copy: | ||
src: /home/cloud-user/{{ domainSuffix }}/registry.cert | ||
dest: /home/cloud-user/registry.cert | ||
owner: cloud-user | ||
mode: 0644 | ||
|
||
- name: Delete registry cert secret | ||
command: /usr/local/bin/oc delete secret console-secret -n default | ||
|
||
- name: Create registry cert secret | ||
command: /usr/local/bin/oc secrets new console-secret /home/cloud-user/registry.cert -n default | ||
|
||
- name: Rollout deployment | ||
command: /usr/local/bin/oc rollout latest dc/registry-console -n default | ||
|
||
- name: Patch docker-registry | ||
command: /usr/local/bin/oc patch route docker-registry -p '{"spec":{"tls":{"certificate":"'"{{ certificate | join("\n") }}"'","key":"'"{{ key | join("\n") }}"'"}}}' -n default |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
- import_playbook: upgrade_and_reboot_servers.yml | ||
- import_playbook: loadbalancers.yml | ||
- import_playbook: dns.yml | ||
- import_playbook: /home/cloud-user/openshift-tooling/acme.sh/deployment.yml | ||
when: getCertificates | ||
- import_playbook: all_servers.yml | ||
- import_playbook: certbot.yml | ||
- import_playbook: openshift.yml | ||
- import_playbook: backup.yml | ||
- import_playbook: upgrade_bastion.yml |