From 09db9c1968ed9586078d193b16e226553754dd92 Mon Sep 17 00:00:00 2001 From: zhichaozhu Date: Sat, 5 May 2018 17:23:02 +0800 Subject: use contrail-ansible-deployer to integrate opencontrail into k8s Change-Id: If78430a159e13cf9456b9985d923a8ec107dc7cc Signed-off-by: Forrest Zhu --- .../ansible/kubernetes/ansible-kubernetes.yml | 5 +++- deploy/compass_conf/flavor/kubernetes.conf | 4 +--- deploy/compass_conf/role/kubernetes_ansible.conf | 4 ++++ .../conf/vm_environment/k8-ocl-nofeature-noha.yml | 27 ++++++++++++++++++++++ 4 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 deploy/conf/vm_environment/k8-ocl-nofeature-noha.yml (limited to 'deploy') diff --git a/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml b/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml index 68dec5c2..094c6488 100755 --- a/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml +++ b/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml @@ -35,7 +35,10 @@ remote_user: root max_fail_percentage: 0 roles: - - kargo + - role: kargo + when: opencontrail is not defined + - role: install-k8s-opencontrail + when: opencontrail is defined and opencontrail == "Enable" - hosts: kube_master remote_user: root diff --git a/deploy/compass_conf/flavor/kubernetes.conf b/deploy/compass_conf/flavor/kubernetes.conf index e7e8ffc8..2e808a83 100755 --- a/deploy/compass_conf/flavor/kubernetes.conf +++ b/deploy/compass_conf/flavor/kubernetes.conf @@ -4,8 +4,6 @@ FLAVORS = [{ 'display_name': 'ansible-kubernetes', 'template': 'ansible-kubernetes.tmpl', 'roles': [ - 'kube_master', 'etcd', 'kube_node', 'ha', 'storage_master', 'storage_node' + 'kube_master', 'etcd', 'kube_node', 'ha', 'storage_master', 'storage_node', 'opencontrail' ], }] - - diff --git a/deploy/compass_conf/role/kubernetes_ansible.conf b/deploy/compass_conf/role/kubernetes_ansible.conf index 3e79cbb9..87bbaf56 100755 --- a/deploy/compass_conf/role/kubernetes_ansible.conf +++ b/deploy/compass_conf/role/kubernetes_ansible.conf @@ -12,6 +12,10 @@ ROLES = [{ 'display_name': 'kube node', 'description': 'kube Node' }, { + 'role': 'opencontrail', + 'display_name': 'opencontrail node', + 'description': 'opencontrail node' +},{ 'role': 'ha', 'display_name': 'ha', 'description': 'ha' diff --git a/deploy/conf/vm_environment/k8-ocl-nofeature-noha.yml b/deploy/conf/vm_environment/k8-ocl-nofeature-noha.yml new file mode 100644 index 00000000..fd7bfda0 --- /dev/null +++ b/deploy/conf/vm_environment/k8-ocl-nofeature-noha.yml @@ -0,0 +1,27 @@ +############################################################################## +# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +--- +TYPE: virtual +FLAVOR: cluster + +plugins: + - opencontrail: "Enable" + +hosts: + - name: host1 + roles: + - kube_master + - etcd + - opencontrail + - ha + + - name: host2 + roles: + - kube_node -- cgit 1.2.3-korg