Skip to content

Commit

Permalink
Merge pull request #92 from RedHat-EMEA-SSA-Team/ocp-44
Browse files Browse the repository at this point in the history
Release 4.3.sol
  • Loading branch information
Tero Ahonen authored Mar 20, 2020
2 parents ecbbb17 + a482221 commit 348c740
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
18 changes: 12 additions & 6 deletions ansible/roles/openshift-4-cluster/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,23 @@ compute_root_disk_size: '120G'

# Important: OpenShift version must match to RHEL CoreOS version!

# reference to OpenShift clients version
openshift_client_version: stable
# reference to OpenShift version
openshift_version: 4.3.0
openshift_version: 4.3
openshift_install_command: "/opt/openshift-install-{{ openshift_version }}/openshift-install"
# dev-pre:
# https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview
openshift_location: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp"
openshift_location: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp/{{openshift_client_version}}"

# reference to coreos qcow file
coreos_version: 43.81.202001142154.0
coreos_download_url: "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/4.3.0-0.nightly-2020-01-15-025207/rhcos-43.81.202001142154.0-qemu.x86_64.qcow2.gz"
coreos_version: 4.3.0
coreos_download_url: "https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/{{openshift_version}}/latest/rhcos-{{coreos_version}}-x86_64-qemu.qcow2.gz"

# How to get the checksum:
# ansible -m stat -a 'path=/var/lib/libvirt/images/rhcos-4.3.0.qcow2' localhost | grep checksum
coreos_checksum: "8cf621e0996881d759399c699d766f7a28ec000e"
coreos_image_location: /var/lib/libvirt/images/rhcos-{{ coreos_version }}.qcow2
coreos_image_location: /var/lib/libvirt/images/rhcos-{{ coreos_version }}.qcow2


certificates_dir: "{{ playbook_dir }}/../certificate"
Expand All @@ -52,9 +55,12 @@ certficate_key: "{{ certificates_dir }}/{{ cluster_name }}.{{ public_domain }}/c
# Staging directory: "https://acme-staging-v02.api.letsencrypt.org/directory"
letsencrypt_directory: "https://acme-v02.api.letsencrypt.org/directory"

# helm
helm_cli_location: "https://mirror.openshift.com/pub/openshift-v4/clients/helm/latest/helm-linux-amd64"

# NFS Storage
# storage_nfs do not support multi cluster support, it overwrites the
# /etc/exports
# /etc/exports
storage_nfs: false
storage_nfs_path_prefix: '/var/lib/libvirt/images'
storage_nfs_target_namespace: openshift-nfs-provisioner
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
command: "mv {{ coreos_image_location }} {{ coreos_image_location }}.gz"
- name: Unzip
command: "gzip -d {{ coreos_image_location }}.gz"
when: coreos_image.stat.mimetype == "application/x-gzip"
when: coreos_image.stat.mimetype == "application/x-gzip"

- name: CoreOS image checksum check
stat:
path: "{{ coreos_image_location }}"
Expand All @@ -27,31 +27,36 @@
- name: Compare checksum
fail:
msg: Please check coreos image, something looks wrong!
when: checksum_coreos_image.stat.checksum != coreos_checksum
when: checksum_coreos_image.stat.checksum != coreos_checksum

- name: Create OpenShift artifacts directory
file:
path: "/opt/openshift-{{ item }}-{{ openshift_version }}"
state: directory
mode: u+rwx,g-rx,o-rx
with_items:
- install
- client
- client

- name: Download Openshift installer
unarchive:
src: "{{ openshift_location }}/{{ openshift_version }}/openshift-install-linux-{{ openshift_version }}.tar.gz"
src: "{{ openshift_location }}/openshift-install-linux.tar.gz"
dest: "/opt/openshift-install-{{ openshift_version }}/"
remote_src: yes
creates: "/opt/openshift-install-{{ openshift_version }}/openshift-install"

- name: Download Openshift client
unarchive:
src: "{{ openshift_location }}/{{ openshift_version }}/openshift-client-linux-{{ openshift_version }}.tar.gz"
src: "{{ openshift_location }}/openshift-client-linux.tar.gz"
dest: "/opt/openshift-client-{{ openshift_version }}/"
remote_src: yes
creates: "/opt/openshift-client-{{ openshift_version }}/oc"

- name: Download Helm client
get_url:
url: "{{ helm_cli_location}}"
dest: "/opt/openshift-client-{{ openshift_version }}/helm"

- name: Create a symbolic link
file:
src: "{{ item.value }}"
Expand All @@ -62,4 +67,4 @@
"/usr/local/bin/oc": "/opt/openshift-client-{{ openshift_version }}/oc"
"/usr/local/bin/kubectl": "/opt/openshift-client-{{ openshift_version }}/kubectl"
"/usr/local/bin/openshift-install": "/opt/openshift-install-{{ openshift_version }}/openshift-install"

"/usr/local/bin/helm": "/opt/openshift-client-{{ openshift_version }}/helm"
21 changes: 21 additions & 0 deletions docs/ocp-pre-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# How to use prerelease

Add to `cluster.yml`:

```
# reference to OpenShift version
openshift_version: 4.4.0-0.nightly-2020-02-13-180133
openshift_install_command: "/opt/openshift-install-{{ openshift_version }}/openshift-install"
# dev-pre:
# https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview
openshift_location: "https://mirror.openshift.com/pub/openshift-v4/clients/ocp-dev-preview"
# reference to coreos qcow file
coreos_version: 44.81.202002161330-0
# curl -L -O https://releases-rhcos-art.cloud.privileged.psi.redhat.com/storage/releases/rhcos-4.4/44.81.202002161330-0/x86_64/rhcos-44.81.202002161330-0-qemu.x86_64.qcow2.gz
coreos_download_url: "https://releases-rhcos-art.cloud.privileged.psi.redhat.com/storage/releases/rhcos-4.4/44.81.202002161330-0/x86_64/rhcos-44.81.202002161330-0-qemu.x86_64.qcow2.gz"
# How to get the checksum:
# ansible -m stat -a 'path=/var/lib/libvirt/images/rhcos-4.3.0.qcow2' localhost | grep checksum
coreos_checksum: "5f2ab3ac96d8134b9010740699465ff0fd99abff"
coreos_image_location: /var/lib/libvirt/images/rhcos-{{ coreos_version }}.qcow2
```

0 comments on commit 348c740

Please sign in to comment.