-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for fips and some minor code allignments (#359)
This is the support for fips in Agend-based Installer (ABI). And solves issue #305. In addition some minor code changes based on ansible-lint. Signed-off-by: Amadeuds Podvratnik <[email protected]> Co-authored-by: Sumit Solanki <[email protected]>
- Loading branch information
1 parent
d530b2b
commit 0f68843
Showing
19 changed files
with
148 additions
and
49 deletions.
There are no files selected for viewing
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,4 +1,5 @@ | ||
/* | ||
!group_vars | ||
!host_vars | ||
!.gitignore | ||
!.gitignore | ||
!hosts |
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 |
---|---|---|
|
@@ -2,4 +2,6 @@ | |
!.gitignore | ||
!all.yaml.template | ||
!hcp.yaml.template | ||
!disconnected.yaml | ||
!zvm.yaml | ||
|
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
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 |
---|---|---|
|
@@ -7,4 +7,4 @@ | |
vars_files: | ||
- "{{ inventory_dir }}/group_vars/all.yaml" | ||
roles: | ||
- abi_install_complete | ||
- abi_install_complete |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Openshift Settings | ||
install_config_defaults: | ||
api_version: v1 | ||
compute: | ||
architecture: s390x | ||
hyperthreading: Enabled | ||
control: | ||
architecture: s390x | ||
hyperthreading: Enabled | ||
cluster_network: | ||
cidr: 10.128.0.0/14 | ||
host_prefix: 23 | ||
type: OVNKubernetes | ||
service_network: 172.30.0.0/16 | ||
machine_network: 192.168.122.0/24 | ||
fips: false |
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,27 +1,41 @@ | ||
--- | ||
|
||
- name: Create Agent Using PXE Boot | ||
command: openshift-install agent create pxe-files --log-level=debug | ||
- name: Create Agent Using PXE Boot (fips = false) | ||
ansible.builtin.command: openshift-install agent create pxe-files --log-level=debug | ||
args: | ||
chdir: ~/{{ abi.ansible_workdir }} | ||
when: abi.boot_method | lower == "pxe" | ||
when: abi.boot_method | lower == "pxe" and not install_config_vars.fips | ||
|
||
- name: Create Agent Using ISO Image | ||
command: openshift-install agent create image --log-level=debug | ||
- name: Create Agent Using ISO Image (fips = false) | ||
ansible.builtin.command: openshift-install agent create image --log-level=debug | ||
args: | ||
chdir: ~/{{ abi.ansible_workdir }} | ||
when: abi.boot_method | lower == "iso" | ||
when: abi.boot_method | lower == "iso" and not install_config_vars.fips | ||
|
||
- name: Create Agent Using PXE Boot (fips = true) | ||
ansible.builtin.command: openshift-install-fips agent create pxe-files --log-level=debug | ||
args: | ||
chdir: ~/{{ abi.ansible_workdir }} | ||
when: abi.boot_method | lower == "pxe" and install_config_vars.fips | ||
|
||
- name: Create Agent Using ISO Image (fips = true) | ||
ansible.builtin.command: openshift-install-fips agent create image --log-level=debug | ||
args: | ||
chdir: ~/{{ abi.ansible_workdir }} | ||
when: abi.boot_method | lower == "iso" and install_config_vars.fips | ||
|
||
- name: Copy initrd.img, kernel.img, and rootfs.img for PXE | ||
ansible.builtin.copy: | ||
src: "~/{{ abi.ansible_workdir }}/boot-artifacts/" | ||
dest: /var/www/html/ | ||
remote_src: yes | ||
mode: '645' | ||
remote_src: true | ||
when: abi.boot_method | lower == "pxe" | ||
|
||
- name: Copy ISO image to the server | ||
ansible.builtin.copy: | ||
src: "~/{{ abi.ansible_workdir }}/" | ||
dest: /var/www/html/ | ||
remote_src: yes | ||
mode: '645' | ||
remote_src: true | ||
when: abi.boot_method | lower == "iso" |
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,6 @@ | ||
install_config_vars: | | ||
{%- if install_config is defined and install_config is iterable -%} | ||
{{ install_config_defaults | combine (install_config, recursive=True) }} | ||
{%- else -%} | ||
{{ install_config_defaults }} | ||
{%- endif -%} |
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
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,5 +1,23 @@ | ||
# Openshift Settings | ||
install_config_defaults: | ||
api_version: v1 | ||
compute: | ||
architecture: s390x | ||
hyperthreading: Enabled | ||
control: | ||
architecture: s390x | ||
hyperthreading: Enabled | ||
cluster_network: | ||
cidr: 10.128.0.0/14 | ||
host_prefix: 23 | ||
type: OVNKubernetes | ||
service_network: 172.30.0.0/16 | ||
machine_network: 192.168.122.0/24 | ||
fips: false | ||
|
||
# ocp_download_url with '/' at the end ! | ||
ocp_download_url: "https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/latest/s390x/" | ||
# ocp client and installer filenames | ||
ocp_client_tgz: "openshift-client-linux.tar.gz" | ||
ocp_install_tgz: "openshift-install-linux.tar.gz" | ||
ocp_install_fips_tgz: "openshift-install-rhel9" |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
install_config_vars: | | ||
{%- if install_config is defined and install_config is iterable -%} | ||
{{ install_config_defaults | combine (install_config, recursive=True) }} | ||
{%- else -%} | ||
{{ install_config_defaults }} | ||
{%- endif -%} |
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
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
Oops, something went wrong.