Browse Source

Merge pull request #1569 from brenton/master

reverting back to pre-pulling the master image
Brenton Leanhardt 9 years ago
parent
commit
72fbab2939

+ 2 - 2
playbooks/common/openshift-master/scaleup.yml

@@ -33,9 +33,9 @@
     service: name={{ openshift.common.service_type }}-master-controllers state=restarted
   - name: verify api server
     command: >
-      curl -k --head --silent {{ openshift.master.api_url }}
+      curl -k --silent {{ openshift.master.api_url }}/healthz/ready
     register: api_available_output
-    until: api_available_output.stdout.find("200 OK") != -1
+    until: api_available_output.stdout == 'ok'
     retries: 120
     delay: 1
     changed_when: false

+ 2 - 2
playbooks/common/openshift-node/config.yml

@@ -258,9 +258,9 @@
     # Using curl here since the uri module requires python-httplib2 and
     # wait_for port doesn't provide health information.
     command: >
-      curl -k --head --silent {{ openshift.master.api_url }}
+      curl -k --silent {{ openshift.master.api_url }}/healthz/ready
     register: api_available_output
-    until: api_available_output.stdout.find("200 OK") != -1
+    until: api_available_output.stdout == 'ok'
     retries: 120
     delay: 1
     changed_when: false

+ 5 - 0
roles/openshift_cli/tasks/main.yml

@@ -8,6 +8,11 @@
 - name: Install clients
   action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-clients state=present"
   when: not openshift.common.is_containerized | bool
+
+- name: Pull CLI Image
+  command: >
+    docker pull {{ openshift.common.cli_image }}:{{ openshift_version }}
+  when: openshift.common.is_containerized | bool
   
 - name: Create /usr/local/bin/openshift cli wrapper
   template:

+ 2 - 2
roles/openshift_master/handlers/main.yml

@@ -17,9 +17,9 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --head --silent {{ openshift.master.api_url }}
+    curl -k --silent {{ openshift.master.api_url }}/healthz/ready
   register: api_available_output
-  until: api_available_output.stdout.find("200 OK") != -1
+  until: api_available_output.stdout == 'ok'
   retries: 120
   delay: 1
   changed_when: false

+ 7 - 2
roles/openshift_master/tasks/main.yml

@@ -92,6 +92,11 @@
   action: "{{ ansible_pkg_mgr }} name={{ openshift.common.service_type }}-master{{ openshift_version  }} state=present"
   when: not openshift.common.is_containerized | bool
 
+- name: Pull master image
+  command: >
+    docker pull {{ openshift.master.master_image }}:{{ openshift_version }}
+  when: openshift.common.is_containerized | bool
+
 - name: Install Master docker service file
   template:
     dest: "/etc/systemd/system/{{ openshift.common.service_type }}-master.service"
@@ -277,9 +282,9 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --head --silent {{ openshift.master.api_url }}
+    curl -k --silent {{ openshift.master.api_url }}/healthz/ready
   register: api_available_output
-  until: api_available_output.stdout.find("200 OK") != -1
+  until: api_available_output.stdout == 'ok'
   retries: 120
   delay: 1
   changed_when: false

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

@@ -47,12 +47,12 @@
 
 - name: Pull node image
   command: >
-    docker pull {{ openshift.node.node_image }}
+    docker pull {{ openshift.node.node_image }}:{{ openshift_version }}
   when: openshift.common.is_containerized | bool
 
 - name: Pull OpenVSwitch image
   command: >
-    docker pull {{ openshift.node.ovs_image }}
+    docker pull {{ openshift.node.ovs_image }}:{{ openshift_version }}
   when: openshift.common.is_containerized | bool and openshift.common.use_openshift_sdn | bool
 
 - name: Install Node docker service file
@@ -124,9 +124,9 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl -k --head --silent {{ openshift_node_master_api_url }}
+    curl -k --silent {{ openshift_node_master_api_url }}/healthz/ready
   register: api_available_output
-  until: api_available_output.stdout.find("200 OK") != -1
+  until: api_available_output.stdout == 'ok'
   retries: 120
   delay: 1
   changed_when: false