-
Notifications
You must be signed in to change notification settings - Fork 8
How to Integrate Contrail Playbooks to an existing openshift ansible deployer
Disclaimer1 : This document is validated for OSE3.9 and will not work for other OSE version. Please contact the author incase you need support for other OSE versions
Disclaimer2: >
1> Clone the Openshift 3.9 Deployer from the Juniper git repo to a new directory (say foo)
2> Now copy contrail_master and contrail_nodes folder from the foo/openshift-ansible/roles directory to the roles directory of your openshift-ansible deployer
cp -r foo/openshift-ansible/roles/contrail_master openshift-ansible/roles/. cp -r foo/openshift-ansible/roles/contrail_node openshift-ansible/roles/.
3> Now add the following Patch to openshift_master playbook to ensure the contrail_master role gets executed
file openshift-ansible/playbooks/openshift-master/private/config.yml
Snippet of Code to be added >>>
- role: calico_master when: openshift_use_calico | default(false) | bool
- role: contrail_master when: openshift_use_contrail | default(false) | bool
4> Similarly add the contrail_nodes role to the openshift_nodes playbook
file openshift-ansible/playbooks/openshift-node/private/additional_config.yml
Snippet pf code to be added >>>>
>>> # Create group for kuryr nodes
- group_by: key: oo_nodes_use_{{ (openshift_use_kuryr | default(False)) | ternary('kuryr','nothing') }} changed_when: False
- group_by: key: oo_nodes_use_{{ (openshift_use_contrail | default(False)) | ternary('contrail','nothing') }} changed_when: False
name: kuryr tasks_from: node
when: openshift_use_kuryr | default(false) | bool
- name: Additional node config
hosts: oo_nodes_use_contrail
roles:
- role: contrail_node contrail_master: "{{ groups.masters.0 }}" when: openshift_use_contrail | default(false) | bool
5> Now update the ose-intall (Openshift Inventory to include contrail Parameters for installation)
6> Update the ose-pre-requisite file (Add all the contrail pre-req to the ose-prerequisite file)
Copyright (c) 2018 Juniper Networks, Inc. All rights reserved