Clone bifrost repo and install its requirements
Change-Id: If83386fdbf1ead8590987d88f5c121689f6cd9ea
diff --git a/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/tasks/main.yml b/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/tasks/main.yml
index 917652d..b15663b 100644
--- a/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/tasks/main.yml
+++ b/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/tasks/main.yml
@@ -18,4 +18,20 @@
# ============LICENSE_END=========================================================
- include_tasks: cleanup-bifrost.yml
+- name: Clone bifrost repository and checkout '{{ bifrost_version }}'
+ git:
+ repo: "{{ bifrost_git_url }}"
+ dest: "{{ engine_cache }}/repos/bifrost"
+ version: "{{ bifrost_version }}"
+ force: yes
+ environment:
+ http_proxy: "{{ lookup('env','http_proxy') }}"
+ https_proxy: "{{ lookup('env','https_proxy') }}"
+ no_proxy: "{{ lookup('env','no_proxy') }}"
+
+- name: Install bifrost requirements
+ pip:
+ requirements: "{{ engine_cache }}/repos/bifrost/requirements.txt"
+ extra_args: --upgrade
+
# vim: set ts=2 sw=2 expandtab:
diff --git a/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/vars/main.yml b/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/vars/main.yml
new file mode 100644
index 0000000..235f220
--- /dev/null
+++ b/engine/infra/bifrost/playbooks/roles/install-configure-bifrost/vars/main.yml
@@ -0,0 +1,21 @@
+---
+# ============LICENSE_START=======================================================
+# Copyright (C) 2019 The Nordix Foundation. All rights reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+bifrost_git_url: https://git.openstack.org/openstack/bifrost
+
+# vim: set ts=2 sw=2 expandtab:
diff --git a/engine/var/global.yml b/engine/var/global.yml
index b080fd7..9b022e3 100644
--- a/engine/var/global.yml
+++ b/engine/var/global.yml
@@ -17,4 +17,5 @@
# SPDX-License-Identifier: Apache-2.0
# ============LICENSE_END=========================================================
engine_path: "{{ lookup('env', 'ENGINE_PATH') }}"
+engine_cache: "{{ lookup('env', 'ENGINE_CACHE') }}"
installer_type: "{{ lookup('env', 'INSTALLER_TYPE') | default('kubespray') }}"