Skip to content

Commit

Permalink
closes #23, closes #22, closes #21
Browse files Browse the repository at this point in the history
Signed-off-by: disposab1e <48065501+disposab1e@users.noreply.github.com>
  • Loading branch information
disposab1e committed Nov 18, 2021
1 parent 869b535 commit 6a1151b
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Requires=container-artifactory-postgres.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ After=network-online.target

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=always
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Requires=container-clair-postgres.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ After=network-online.target

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=always
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ After=container-quay-postgres.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Requires=container-quay-quay.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ After=network-online.target

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=always
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Requires=container-clair-clair.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
RestartSec=30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ After=network-online.target

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=always
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ After=container-quay-quay.service

[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
TimeoutSec=900

Restart=on-failure
ExecStartPre=/usr/bin/rm -f %t/%n-pid %t/%n-cid
ExecStart=/usr/bin/podman run \
Expand Down
2 changes: 1 addition & 1 deletion ansible/okd/roles/mirror-registry/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
shell: oc adm -a ${HOME}/installer/secret.json release mirror \
--from=quay.io/openshift/okd:{{ okd_lab_install_okd_version }} \
--to={{ okd_lab_quay_hostname }}/okd/{{ okd_lab_install_okd_name }} \
--to-release-image={{ okd_lab_quay_hostname }}/okd/{{ okd_lab_install_okd_name }}:{{ okd_lab_install_okd_version }}
--to-release-image={{ okd_lab_quay_hostname }}/okd/releases:{{ okd_lab_install_okd_version }}
tags:
- registry-mirror
- mirror
Expand Down
3 changes: 3 additions & 0 deletions ansible/okd/roles/okd-config/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@
password: admin
validate_certs: false
host: https://api.okd.example.com:6443
retries: 30
delay: 20
register: openshift_auth_admin_results
until: openshift_auth_admin_results.openshift_auth.api_key is defined

- name: If login succeeded, try to log out (revoke access token)
when: openshift_auth_admin_results.openshift_auth.api_key is defined
Expand Down
6 changes: 4 additions & 2 deletions ansible/okd/roles/okd-env/templates/install-config.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ pullSecret:
sshKey:
imageContentSources:
- mirrors:
- quay.okd.example.com/lab_okd/{{ okd_lab_install_okd_name }}
- quay.okd.example.com/okd/{{ okd_lab_install_okd_name }}
- quay.okd.example.com/okd/releases
source: quay.io/openshift/okd
- mirrors:
- quay.okd.example.com/lab_okd/{{ okd_lab_install_okd_name }}
- quay.okd.example.com/okd/{{ okd_lab_install_okd_name }}
- quay.okd.example.com/okd/releases
source: quay.io/openshift/okd-content
additionalTrustBundle: |
{{lookup('file', '/etc/ca.crt') | indent( width=2, indentfirst=True) }}
Expand Down
2 changes: 1 addition & 1 deletion ansible/okd/roles/okd-installer/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
- name: Setup installer to use Registry Mirror
shell: oc adm -a ${HOME}/installer/secret.json release extract --to="${HOME}/installer" --command=openshift-install "{{ okd_lab_quay_hostname }}/okd/{{ okd_lab_install_okd_name }}:{{ okd_lab_install_okd_version }}"
shell: oc adm -a ${HOME}/installer/secret.json release extract --to="${HOME}/installer" --command=openshift-install "{{ okd_lab_quay_hostname }}/okd/releases:{{ okd_lab_install_okd_version }}"
tags: installer-setup
2 changes: 1 addition & 1 deletion docs/03_install_okd.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ ssh lab@bastion "cat ~/installer/auth/kubeadmin-password" > ~/github/okd-lab/.se
# Apply (provision) Cluster with Terraform
ansible-playbook ~/github/okd-lab/ansible/okd/cluster.yml --tags apply

# In case the bbotstrap will not boot the first time just destroy and apply again
# In case the a VM will not boot the first time, just destroy and apply again
ansible-playbook ~/github/okd-lab/ansible/okd/cluster.yml --tags destroy
ansible-playbook ~/github/okd-lab/ansible/okd/cluster.yml --tags apply

Expand Down

0 comments on commit 6a1151b

Please sign in to comment.