Wolfgang Kulhanek
2019-04-05 1ad15d992b274aa28a3e6d3bb68a0995a432e8a3
Fixing logging and infra roles
1 files deleted
5 files modified
35 ■■■■ changed files
ansible/roles/ocp4-workload-infra-nodes/files/infra.sh 2 ●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-infra-nodes/readme.adoc 2 ●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-infra-nodes/tasks/workload.yml 1 ●●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-logging/files/infra.sh 14 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-logging/tasks/remove_workload.yml 4 ●●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-logging/tasks/workload.yml 12 ●●●● patch | view | raw | blame | history
ansible/roles/ocp4-workload-infra-nodes/files/infra.sh
@@ -7,7 +7,7 @@
  | jq '.spec.selector.matchLabels."machine.openshift.io/cluster-api-machineset"=env["NAME"]'\
  | jq '.spec.template.metadata.labels."machine.openshift.io/cluster-api-machineset"=env["NAME"]'\
  | jq '.spec.template.spec.metadata.labels."node-role.kubernetes.io/infra"=""'\
  | jq '.spec.template.spec.providerSpec.value.instanceType="m5.4xlarge"'\
  | jq '.spec.template.spec.providerSpec.value.instanceType="m4.4xlarge"'\
  | jq 'del (.metadata.annotations)'\
  | jq '.metadata.labels += {"machineset":"infra"}'\
  | jq '.spec.replicas=3'\
ansible/roles/ocp4-workload-infra-nodes/readme.adoc
@@ -2,7 +2,7 @@
== Role overview
* This role creates infrastructure nodes in an OpenShift 4 Cluster. It only creates a single infra machineset with 3 replicas of size m5.4xlarge. It consists of the following playbooks:
* This role creates infrastructure nodes in an OpenShift 4 Cluster. It only creates a single infra machineset with 3 replicas of size m4.4xlarge. It consists of the following playbooks:
** Playbook: link:./tasks/pre_workload.yml[pre_workload.yml] - Sets up an
 environment for the workload deployment.
*** Debug task will print out: `pre_workload Tasks completed successfully.`
ansible/roles/ocp4-workload-infra-nodes/tasks/workload.yml
@@ -8,7 +8,6 @@
    namespace: openshift-machine-api
  register: machinesets_out
#- name: determine the deployed AZ
#  shell: "oc get machineset -n openshift-machine-api -o jsonpath --template '{.items[0].spec.template.spec.providerSpec.value.placement.region}'"
#  register: deployed_az
ansible/roles/ocp4-workload-logging/files/infra.sh
File was deleted
ansible/roles/ocp4-workload-logging/tasks/remove_workload.yml
@@ -20,8 +20,8 @@
    namespace: openshift-logging
  register: logging_pods
  until: logging_pods.resources | list | length <= 1
  retries: 10
  delay: 60
  retries: 100
  delay: 10
- name: logging operatorgroup
  k8s:
ansible/roles/ocp4-workload-logging/tasks/workload.yml
@@ -99,8 +99,8 @@
    name: "{{ item }}"
  register: crd_exists
  until: crd_exists.resources | list | length >= 1
  retries: 10
  delay: 30
  retries: 30
  delay: 10
  with_items:
    - "clusterloggings.logging.openshift.io"
    - "elasticsearches.logging.openshift.io"
@@ -155,15 +155,15 @@
      - component = elasticsearch
  register: elastic_deployments
  until: elastic_deployments.resources | list | length >= 1
  retries: 10
  delay: 60
  retries: 100
  delay: 10
# could this also use k8s_facts in some way?
- name: wait for running elasticsearch
  shell: "oc get deployment {{ item.metadata.name }} -n openshift-logging -o jsonpath='{.status.readyReplicas}'"
  register: replicas_out
  retries: 10
  delay: 60
  retries: 100
  delay: 10
  with_items: "{{ elastic_deployments.resources }}"
  until: replicas_out.stdout | int == 1