Skip to content

Commit

Permalink
feat: seperate sec12 add contrib upd lic (#328)
Browse files Browse the repository at this point in the history
This PR moves the section 12 into default values including the switch to
rhel 9 and latest for s390x architecture.

In addition issue #308 is fixed, update license file and add a
contribution file.

Tested this PR with SNO cluster (NAT) installation and 1 master, 1
worker node installation.

---------

Signed-off-by: Amadeuds Podvratnik <[email protected]>
  • Loading branch information
AmadeusPodvratnik authored Sep 17, 2024
1 parent 95b45c5 commit f711c21
Show file tree
Hide file tree
Showing 13 changed files with 135 additions and 29 deletions.
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Contributing to Ansible-Openshift-Provisiong
============================================

License
-------
All contributions have to be submitted under the MIT license. See also
the [LICENSE](LICENSE) file.

Developer's Certificate of Origin and Signed-off-by
---------------------------------------------------
The sign-off is a simple line at the end of the explanation for the patch,
which certifies that you wrote it or otherwise have the right to pass it on as
an open-source patch.

With the Signed-off-by line you certify the below:

```
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
```

If you can certify the above, just add a line stating the following at the
bottom of each of your commit messages:

```
Signed-off-by: Developers Name <[email protected]>
```

Use your real name and a valid e-mail address (no pseudonyms or anonymous
contributions).

Submitting code
---------------
The preferred way is to create GitHub pull requests for your code contributions.
Please create separate pull requests for each logical enhancement, new feature,
or fix.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021, 2023 IBM Corporation. All rights reserved.
Copyright (c) 2021, 2024 IBM Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
SOFTWARE
15 changes: 8 additions & 7 deletions docs/set-variables-group-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,18 @@
**env.jumphost.path_to_keypair** | (Optional) The absolute path to the public key file on the jumphost to be copied to the bastion. | /home/admin/.ssh/id_rsa.pub

## 12 - OCP and RHCOS (CoreOS)
* These parameters are responsible which version of OCP, RHCOS and os variant AOP is using. The default value is 'latest' for s390x architecture. I you want to install a different version or a different architecture you need to specify specify the following parameters in all.yaml file:

**Variable Name** | **Description** | **Example**
**Variable Name** | **Description** | **Example/Default**
:--- | :--- | :---
**ocp_download_url** | Link to the mirror for the OpenShift client and installer from Red Hat. | https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/4.13.1/s390x/
**ocp_download_url** | Link to the mirror for the OpenShift client and installer from Red Hat. | https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/
**ocp_client_tgz** | OpenShift client filename (tar.gz). | openshift-client-linux.tar.gz
**ocp_install_tgz** | OpenShift installer filename (tar.gz). | openshift-install-linux.tar.gz
**rhcos_download_url** | Link to the CoreOS files to be used for the bootstrap, control and compute nodes. Feel free to change to a different version. | https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/4.12/4.12.3/
**rhcos_os_variant** | CoreOS base OS. Use the OS string as defined in 'osinfo-query os -f short-id' | rhel8.6
**rhcos_live_kernel** | CoreOS kernel filename to be used for the bootstrap, control and compute nodes. | rhcos-4.12.3-s390x-live-kernel-s390x
**rhcos_live_initrd** | CoreOS initramfs to be used for the bootstrap, control and compute nodes. | rhcos-4.12.3-s390x-live-initramfs.s390x.img
**rhcos_live_rootfs** | CoreOS rootfs to be used for the bootstrap, control and compute nodes. | rhcos-4.12.3-s390x-live-rootfs.s390x.img
**rhcos_download_url** | Link to the CoreOS files to be used for the bootstrap, control and compute nodes. Feel free to change to a different version. | https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/latest/s390x/
**rhcos_os_variant** | CoreOS base OS. Use the OS string as defined in 'osinfo-query os -f short-id' | rhl9
**rhcos_live_kernel** | CoreOS kernel filename to be used for the bootstrap, control and compute nodes. | rhcos-live-kernel-s390x
**rhcos_live_initrd** | CoreOS initramfs to be used for the bootstrap, control and compute nodes. | rhcos-live-initramfs.s390x.img
**rhcos_live_rootfs** | CoreOS rootfs to be used for the bootstrap, control and compute nodes. | rhcos-live-rootfs.s390x.img

## 13 - (Optional) Create compute node in a day-2 operation

Expand Down
19 changes: 1 addition & 18 deletions inventories/default/group_vars/all.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -209,24 +209,7 @@ env:
path_to_keypair:

# Section 12 - OCP and RHCOS (CoreOS)

# ocp_download_url with '/' at the end !
ocp_download_url: "https://mirror.openshift.com/pub/openshift-v4/multi/clients/ocp/4.13.1/s390x/"
# ocp client and installer filenames
ocp_client_tgz: "openshift-client-linux.tar.gz"
ocp_install_tgz: "openshift-install-linux.tar.gz"

# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/4.12/4.12.3/"

# For rhcos_os_variant use the OS string as defined in 'osinfo-query os -f short-id'
rhcos_os_variant: rhel8.6

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-4.12.3-s390x-live-kernel-s390x"
rhcos_live_initrd: "rhcos-4.12.3-s390x-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-4.12.3-s390x-live-rootfs.s390x.img"

# ocp download_url and rhcos download url

# Section 13 - (Optional) Create additional compute node in a day-2 operation
day2_compute_node:
Expand Down
7 changes: 7 additions & 0 deletions roles/boot_LPAR/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-live-kernel-s390x"
rhcos_live_initrd: "rhcos-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"
4 changes: 2 additions & 2 deletions roles/boot_LPAR/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
--netset_password {{ node.lpar.livedisk.livedisk_root_pass }} \
--netset_dns "{{ node.networking.nameserver1 }},{{ node.networking.nameserver2 }}" \
--log_level DEBUG \
--cmdline 'rd.neednet=1 console=ttysclp0 coreos.inst.install_dev=sda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/{{ ignition }}.ign ip={{ node.networking.ip }}::{{ node.networking.gateway }}:{{ node.networking.subnetmask }}:{{ node.networking.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ node.networking.device1 }}:none nameserver={{ env.bastion.networking.ip }} cio_ignore=all,!condev zfcp.allow_lun_scan=0 rd.znet=qeth,{{ node.lpar.networking.nic.card1.dev_num }},layer2=1 {{ ipv6_string }} {% if node.lpar.storage_group_1.type | lower == "fcp" %}{{ rd_zfcp_string }}{% endif %}{% if node.lpar.storage_group_1.type | lower == "dasd" %}{{ rd_dasd_string }}{% endif %}'
--cmdline 'rd.neednet=1 console=ttysclp0 coreos.inst.install_dev=sda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/{{ ignition }}.ign ip={{ node.networking.ip }}::{{ node.networking.gateway }}:{{ node.networking.subnetmask }}:{{ node.networking.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ node.networking.device1 }}:none nameserver={{ env.cluster.networking.nameserver1 }} cio_ignore=all,!condev zfcp.allow_lun_scan=0 rd.znet=qeth,{{ node.lpar.networking.nic.card1.dev_num }},layer2=1 {{ ipv6_string }} {% if node.lpar.storage_group_1.type | lower == "fcp" %}{{ rd_zfcp_string }}{% endif %}{% if node.lpar.storage_group_1.type | lower == "dasd" %}{{ rd_dasd_string }}{% endif %}'

- name: Booting lpar node
shell: |
Expand All @@ -89,4 +89,4 @@
--netset_password {{ node.lpar.livedisk.livedisk_root_pass }} \
--netset_dns "{{ node.networking.nameserver1 }},{{ node.networking.nameserver2 }}" \
--log_level DEBUG \
--cmdline 'rd.neednet=1 console=ttysclp0 coreos.inst.install_dev=sda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/{{ ignition }}.ign ip={{ node.networking.ip }}::{{ node.networking.gateway }}:{{ node.networking.subnetmask }}:{{ node.networking.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ node.networking.device1 }}:none nameserver={{ env.bastion.networking.ip }} cio_ignore=all,!condev zfcp.allow_lun_scan=0 rd.znet=qeth,{{ node.lpar.networking.nic.card1.dev_num }},layer2=1 {{ ipv6_string }} {% if node.lpar.storage_group_1.type | lower == "fcp" %}{{ rd_zfcp_string }}{% endif %}{% if node.lpar.storage_group_1.type | lower == "dasd" %}{{ rd_dasd_string }}{% endif %}'
--cmdline 'rd.neednet=1 console=ttysclp0 coreos.inst.install_dev=sda coreos.live.rootfs_url=http://{{ env.bastion.networking.ip }}:8080/bin/{{ rhcos_live_rootfs }} coreos.inst.ignition_url=http://{{ env.bastion.networking.ip }}:8080/ignition/{{ ignition }}.ign ip={{ node.networking.ip }}::{{ node.networking.gateway }}:{{ node.networking.subnetmask }}:{{ node.networking.hostname }}.{{ env.cluster.networking.metadata_name }}.{{ env.cluster.networking.base_domain }}:{{ node.networking.device1 }}:none nameserver={{ env.cluster.networking.nameserver1 }} cio_ignore=all,!condev zfcp.allow_lun_scan=0 rd.znet=qeth,{{ node.lpar.networking.nic.card1.dev_num }},layer2=1 {{ ipv6_string }} {% if node.lpar.storage_group_1.type | lower == "fcp" %}{{ rd_zfcp_string }}{% endif %}{% if node.lpar.storage_group_1.type | lower == "dasd" %}{{ rd_dasd_string }}{% endif %}'
2 changes: 2 additions & 0 deletions roles/create_bastion/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ install_config_defaults:
service_network: 172.30.0.0/16
machine_network: 192.168.122.0/24
fips: 'false'

rhcos_os_variant: rhl9
9 changes: 9 additions & 0 deletions roles/create_bootstrap/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

rhcos_os_variant: rhl9

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-live-kernel-s390x"
rhcos_live_initrd: "rhcos-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"
9 changes: 9 additions & 0 deletions roles/create_compute_node/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

rhcos_os_variant: rhl9

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-live-kernel-s390x"
rhcos_live_initrd: "rhcos-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"
9 changes: 9 additions & 0 deletions roles/create_compute_nodes/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

rhcos_os_variant: rhl9

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-live-kernel-s390x"
rhcos_live_initrd: "rhcos-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"
9 changes: 9 additions & 0 deletions roles/create_control_nodes/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

rhcos_os_variant: rhl9

# RHCOS live image filenames
rhcos_live_kernel: "rhcos-live-kernel-s390x"
rhcos_live_initrd: "rhcos-live-initramfs.s390x.img"
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"
5 changes: 5 additions & 0 deletions roles/download_ocp_installer/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 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"
12 changes: 12 additions & 0 deletions roles/get_ocp/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 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"

# rhcos_download_url with '/' at the end !
rhcos_download_url: "https://mirror.openshift.com/pub/openshift-v4/s390x/dependencies/rhcos/latest/"

# RHCOS live image filenames
rhcos_live_rootfs: "rhcos-live-rootfs.s390x.img"

# Openshift Settings
install_config_defaults:
api_version: v1
Expand Down

0 comments on commit f711c21

Please sign in to comment.