diff options
author | Zenghui Shi <zshi@redhat.com> | 2018-04-04 11:24:40 +0800 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2018-07-06 16:13:06 -0400 |
commit | 10c4d35315d7ffd909520a1c7bc6a3b5b9b871ab (patch) | |
tree | e7ab984038098b931d82527f52d2a85a35fdd780 /apex/common | |
parent | ae22c3358b53a68b68de7d3ac5d6f56a1c384b61 (diff) |
Add support for kubernetes deployment
This patch adds capability to deploy kubernetes cluster instead of openstack.
Kubernetes will be deployed using kubespray and is run after TripleO bookstraps
overcloud nodes.
JIRA: APEX-574
Change-Id: If9c171620c933a052b719e7112a50e22bbab667f
Signed-off-by: Feng Pan <fpan@redhat.com>
Signed-off-by: Zenghui Shi <zshi@redhat.com>
Diffstat (limited to 'apex/common')
-rw-r--r-- | apex/common/constants.py | 1 | ||||
-rw-r--r-- | apex/common/utils.py | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/apex/common/constants.py b/apex/common/constants.py index 89c3e6e1..ee260b4f 100644 --- a/apex/common/constants.py +++ b/apex/common/constants.py @@ -70,3 +70,4 @@ VALID_DOCKER_SERVICES = { } DOCKERHUB_OOO = 'https://registry.hub.docker.com/v2/repositories' \ '/tripleomaster/' +KUBESPRAY_URL = 'https://github.com/kubernetes-incubator/kubespray.git' diff --git a/apex/common/utils.py b/apex/common/utils.py index 2ac900a3..013c7ac8 100644 --- a/apex/common/utils.py +++ b/apex/common/utils.py @@ -75,12 +75,17 @@ def run_ansible(ansible_vars, playbook, host='localhost', user='root', Executes ansible playbook and checks for errors :param ansible_vars: dictionary of variables to inject into ansible run :param playbook: playbook to execute + :param host: inventory file or string of target hosts + :param user: remote user to run ansible tasks :param tmp_dir: temp directory to store ansible command :param dry_run: Do not actually apply changes :return: None """ logging.info("Executing ansible playbook: {}".format(playbook)) - inv_host = "{},".format(host) + if not os.path.isfile(host): + inv_host = "{},".format(host) + else: + inv_host = host if host == 'localhost': conn_type = 'local' else: |