Przeglądaj źródła

Add openshift_version to set RPM versions

Mostly necessary for debugging / testing upgrade paths
Scott Dodson 9 lat temu
rodzic
commit
633c651285

+ 3 - 0
inventory/byo/hosts.example

@@ -69,6 +69,9 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
 # default project node selector
 #osm_default_node_selector='region=primary'
 
+# set RPM version for debugging purposes
+#openshift_version=-3.0.0.0
+
 # host group for masters
 [masters]
 ose3-master[1:3]-ansible.test.example.com

+ 1 - 1
roles/openshift_master/tasks/main.yml

@@ -56,7 +56,7 @@
       controller_args: "{{ osm_controller_args | default(None) }}"
 
 - name: Install Master package
-  yum: pkg={{ openshift.common.service_type }}-master state=present
+  yum: pkg={{ openshift.common.service_type }}-master{{ openshift_version  }} state=present
   register: install_result
 
 - name: Check for RPM generated config marker file /etc/origin/.config_managed

+ 1 - 0
roles/openshift_master/vars/main.yml

@@ -3,6 +3,7 @@ openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
 openshift_master_config_file: "{{ openshift_master_config_dir }}/master-config.yaml"
 openshift_master_scheduler_conf: "{{ openshift_master_config_dir }}/scheduler.json"
 openshift_master_policy: "{{ openshift_master_config_dir }}/policy.json"
+openshift_version: "{{ openshift_version | default('') }}"
 
 openshift_master_valid_grant_methods:
 - auto

+ 1 - 1
roles/openshift_master_ca/tasks/main.yml

@@ -1,6 +1,6 @@
 ---
 - name: Install the base package for admin tooling
-  yum: pkg={{ openshift.common.service_type }} state=present
+  yum: pkg={{ openshift.common.service_type }}{{ openshift_version  }} state=present
   register: install_result
 
 - name: Reload generated facts

+ 1 - 0
roles/openshift_master_ca/vars/main.yml

@@ -3,3 +3,4 @@ openshift_master_config_dir: "{{ openshift.common.config_base }}/master"
 openshift_master_ca_cert: "{{ openshift_master_config_dir }}/ca.crt"
 openshift_master_ca_key: "{{ openshift_master_config_dir }}/ca.key"
 openshift_master_ca_serial: "{{ openshift_master_config_dir }}/ca.serial.txt"
+openshift_version: "{{ openshift_version | default('') }}"

+ 0 - 2
roles/openshift_master_certificates/tasks/main.yml

@@ -44,5 +44,3 @@
   args:
     creates: "{{ openshift_generated_configs_dir }}/{{ item.master_cert_subdir }}/master.server.crt"
   with_items: masters_needing_certs
-
-

+ 4 - 2
roles/openshift_node/tasks/main.yml

@@ -30,12 +30,14 @@
       kubelet_args: "{{ openshift_node_kubelet_args | default(None) }}"
       sdn_mtu: "{{ openshift_node_sdn_mtu | default(None) }}"
 
+# We have to add tuned-profiles in the same transaction otherwise we run into depsolving
+# problems because the rpms don't pin the version properly.
 - name: Install Node package
-  yum: pkg={{ openshift.common.service_type }}-node state=present
+  yum: pkg={{ openshift.common.service_type }}-node{{ openshift_version  }},tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_version  }} state=present
   register: node_install_result
 
 - name: Install sdn-ovs package
-  yum: pkg={{ openshift.common.service_type }}-sdn-ovs state=present
+  yum: pkg={{ openshift.common.service_type }}-sdn-ovs{{ openshift_version }} state=present
   register: sdn_install_result
   when: openshift.common.use_openshift_sdn
 

+ 1 - 0
roles/openshift_node/vars/main.yml

@@ -1,3 +1,4 @@
 ---
 openshift_node_config_dir: "{{ openshift.common.config_base }}/node"
 openshift_node_config_file: "{{ openshift_node_config_dir }}/node-config.yaml"
+openshift_version: "{{ openshift_version | default('') }}"