Skip to content

Commit

Permalink
Removed contrail var groups
Browse files Browse the repository at this point in the history
1. Removed contrail var groups as it had issues with accessing
2. closes support to have slaves different interface names,
   you need to provide the contrail_masters group, and comment
   the physical_interface so that contrail will be installed on
   the subnet of the contrail_master

Change-Id: I911f1d6207a7241ad2d0dfd9b2d5616541a06f8f
Closes-Bug: #1781305
  • Loading branch information
pvijayaragav committed Aug 1, 2018
1 parent f363bc6 commit dd5952d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 40 deletions.
32 changes: 17 additions & 15 deletions inventory/byo/ose-install
Expand Up @@ -34,11 +34,28 @@ contrail_registry=ci-repo.englab.juniper.net:5000
# Username /Password for private Docker regiteries
#contrail_registry_username=test
#contrail_registry_password=test
# Below option presides over contrail masters if set
#vrouter_physical_interface=ens160
contrail_vip=10.87.65.48
vrouter_gateway=10.87.65.126
#docker_version=1.13.1

# Contrail_vars
#kubernetes_api_server=10.87.65.48
#kubernetes_api_port=8080
#kubernetes_api_secure_port=8443
#cluster_name=k8s
#cluster_project={}
#cluster_network={}
#pod_subnets=10.32.0.0/12
#ip_fabric_subnets=10.64.0.0/12
#service_subnets=10.96.0.0/12
#ip_fabric_forwarding=false
#ip_fabric_snat=false
#public_fip_pool={}
#vnc_endpoint_ip=20.1.1.1
#vnc_endpoint_port=8082

[masters]
10.87.65.48 openshift_hostname=openshift-master

Expand All @@ -55,18 +72,3 @@ vrouter_gateway=10.87.65.126
[contrail_masters]
20.1.1.1 openshift_hostname=openshift-master

[contrail_vars]
#kubernetes_api_server=10.87.65.48
#kubernetes_api_port=8080
#kubernetes_api_secure_port=8443
#cluster_name=k8s
#cluster_project={}
#cluster_network={}
#pod_subnets=10.32.0.0/12
#ip_fabric_subnets=10.64.0.0/12
#service_subnets=10.96.0.0/12
#ip_fabric_forwarding=false
#ip_fabric_snat=false
#public_fip_pool={}
#vnc_endpoint_ip=20.1.1.1
#vnc_endpoint_port=8082
22 changes: 11 additions & 11 deletions roles/contrail_master/templates/contrail-installer-5.1.j2
Expand Up @@ -108,18 +108,18 @@ metadata:
name: kube-manager-config
namespace: kube-system
data:
KUBERNETES_API_SERVER: {{ groups.contrail_vars.kubernetes_api_server | default(api_vip | ipaddr) }}
KUBERNETES_API_SECURE_PORT: "{{ groups.contrail_vars.kubernetes_api_secure_port | default('8443') }}"
KUBERNETES_API_SERVER: {{ kubernetes_api_server | default(api_vip | ipaddr) }}
KUBERNETES_API_SECURE_PORT: "{{ kubernetes_api_secure_port | default('8443') }}"
K8S_TOKEN_FILE: "/tmp/serviceaccount/token"
KUBERNETES_CLUSTER_NAME: "{{ groups.contrail_vars.cluster_name | default('k8s') }}"
KUBERNETES_CLUSTER_PROJECT: "{{ groups.contrail_vars.cluster_project | default('{}') }}"
KUBERNETES_CLUSTER_NETWORK: "{{ groups.contrail_vars.cluster_network | default('{}') }}"
KUBERNETES_POD_SUBNETS: "{{ groups.contrail_vars.pod_subnets | default('10.32.0.0/12') }}"
KUBERNETES_IP_FABRIC_SUBNETS: "{{ groups.contrail_vars.ip_fabric_subnets | default('10.64.0.0/12') }}"
KUBERNETES_SERVICE_SUBNETS: "{{ groups.contrail_vars.service_subnets | default('10.96.0.0/12') }}"
KUBERNETES_IP_FABRIC_FORWARDING: "{{ groups.contrail_vars.ip_fabric_forwarding | default('false') }}"
KUBERNETES_IP_FABRIC_SNAT: "{{ groups.contrail_vars.ip_fabric_snat | default('false') }}"
KUBERNETES_PUBLIC_FIP_POOL: "{{ groups.contrail_vars.public_fip_pool | default('{}') }}"
KUBERNETES_CLUSTER_NAME: "{{ cluster_name | default('k8s') }}"
KUBERNETES_CLUSTER_PROJECT: "{{ cluster_project | default('{}') }}"
KUBERNETES_CLUSTER_NETWORK: "{{ cluster_network | default('{}') }}"
KUBERNETES_POD_SUBNETS: "{{ pod_subnets | default('10.32.0.0/12') }}"
KUBERNETES_IP_FABRIC_SUBNETS: "{{ ip_fabric_subnets | default('10.64.0.0/12') }}"
KUBERNETES_SERVICE_SUBNETS: "{{ service_subnets | default('10.96.0.0/12') }}"
KUBERNETES_IP_FABRIC_FORWARDING: "{{ ip_fabric_forwarding | default('false') }}"
KUBERNETES_IP_FABRIC_SNAT: "{{ ip_fabric_snat | default('false') }}"
KUBERNETES_PUBLIC_FIP_POOL: "{{ public_fip_pool | default('{}') }}"
# Containers section
# Meta information section
---
Expand Down
22 changes: 11 additions & 11 deletions roles/contrail_master/templates/contrail-installer-5.j2
Expand Up @@ -108,18 +108,18 @@ metadata:
name: kube-manager-config
namespace: kube-system
data:
KUBERNETES_API_SERVER: {{ groups.contrail_vars.kubernetes_api_server | default(api_vip | ipaddr) }}
KUBERNETES_API_SECURE_PORT: "{{ groups.contrail_vars.kubernetes_api_secure_port | default('8443') }}"
KUBERNETES_API_SERVER: {{ kubernetes_api_server | default(api_vip | ipaddr) }}
KUBERNETES_API_SECURE_PORT: "{{ kubernetes_api_secure_port | default('8443') }}"
K8S_TOKEN_FILE: "/tmp/serviceaccount/token"
KUBERNETES_CLUSTER_NAME: "{{ groups.contrail_vars.cluster_name | default('k8s') }}"
KUBERNETES_CLUSTER_PROJECT: "{{ groups.contrail_vars.cluster_project | default('{}') }}"
KUBERNETES_CLUSTER_NETWORK: "{{ groups.contrail_vars.cluster_network | default('{}') }}"
KUBERNETES_POD_SUBNETS: "{{ groups.contrail_vars.pod_subnets | default('10.32.0.0/12') }}"
KUBERNETES_IP_FABRIC_SUBNETS: "{{ groups.contrail_vars.ip_fabric_subnets | default('10.64.0.0/12') }}"
KUBERNETES_SERVICE_SUBNETS: "{{ groups.contrail_vars.service_subnets | default('10.96.0.0/12') }}"
KUBERNETES_IP_FABRIC_FORWARDING: "{{ groups.contrail_vars.ip_fabric_forwarding | default('false') }}"
KUBERNETES_IP_FABRIC_SNAT: "{{ groups.contrail_vars.ip_fabric_snat | default('false') }}"
KUBERNETES_PUBLIC_FIP_POOL: "{{ groups.contrail_vars.public_fip_pool | default('{}') }}"
KUBERNETES_CLUSTER_NAME: "{{ cluster_name | default('k8s') }}"
KUBERNETES_CLUSTER_PROJECT: "{{ cluster_project | default('{}') }}"
KUBERNETES_CLUSTER_NETWORK: "{{ cluster_network | default('{}') }}"
KUBERNETES_POD_SUBNETS: "{{ pod_subnets | default('10.32.0.0/12') }}"
KUBERNETES_IP_FABRIC_SUBNETS: "{{ ip_fabric_subnets | default('10.64.0.0/12') }}"
KUBERNETES_SERVICE_SUBNETS: "{{ service_subnets | default('10.96.0.0/12') }}"
KUBERNETES_IP_FABRIC_FORWARDING: "{{ ip_fabric_forwarding | default('false') }}"
KUBERNETES_IP_FABRIC_SNAT: "{{ ip_fabric_snat | default('false') }}"
KUBERNETES_PUBLIC_FIP_POOL: "{{ public_fip_pool | default('{}') }}"
# Containers section
# Meta information section
---
Expand Down
6 changes: 3 additions & 3 deletions roles/contrail_node/tasks/main.yaml
Expand Up @@ -80,13 +80,13 @@

- name: Label master nodes with opencontrail.org/controller=true
command: oc label nodes {{ hostvars[item]['openshift_hostname'] }} opencontrail.org/controller=true --overwrite=true
with_items: "{{ groups.contrail_masters }}"
with_items: "{{ groups.masters }}"
run_once: True
delegate_to: "{{ contrail_master }}"

- name: Label master nodes with node-role.kubernetes.io/compute=true
command: oc label nodes {{ hostvars[item]['openshift_hostname'] }} node-role.kubernetes.io/compute=true --overwrite=true
with_items: "{{ groups.contrail_masters }}"
with_items: "{{ groups.masters }}"
run_once: True
delegate_to: "{{ contrail_master }}"

Expand All @@ -99,7 +99,7 @@

- name: Make master schedulable
command: oadm manage-node {{ hostvars[item]['openshift_hostname'] }} --schedulable
with_items: "{{ groups.contrail_masters }}"
with_items: "{{ groups.masters }}"
run_once: True
delegate_to: "{{ contrail_master }}"

Expand Down

0 comments on commit dd5952d

Please sign in to comment.