Introduce basic support for provisioning nodes with centos7
This change introduces support for provisioning nodes with centos7
using bifrost. Please note that the node where the engine is run on
must still have ubuntu1804 since python3 support on centos7 is not
fully available. Lack of certain python3 packages such as selinux
causes issues for Ansible template module, making it nearly impossible
to use Ansible on centos7 in python3 setup.
It is also important to note that the package built for centos7 probably
has unnecessary distro dependencies coming from ubuntu1804. These
dependencies does not cause any issues for provisioning and they only
waste space. They will be adjusted once the dependencies are distributed
across stacks.
Depends-On: I58965e979a2be099a0c88c328cc87dafd88d3c16
Change-Id: Iba181f25851feb239a7ba1c0eb38569726c40fa3
diff --git a/playbooks/roles/bootstrap-swconfig/tasks/main.yaml b/playbooks/roles/bootstrap-swconfig/tasks/main.yaml
index fc55f99..5e3b879 100644
--- a/playbooks/roles/bootstrap-swconfig/tasks/main.yaml
+++ b/playbooks/roles/bootstrap-swconfig/tasks/main.yaml
@@ -19,7 +19,7 @@
- name: Set distribution
set_fact:
- distro: "{{ ansible_distribution | lower }}{{ ansible_distribution_version | replace('.','') }}"
+ distro: "{{ lookup('env', 'DISTRO') | default('ubuntu1804', true) }}"
- name: Log distribution to console
debug:
@@ -53,7 +53,7 @@
block: |
distro: "{{ distro }}"
provisioner_type: "{{ provisioner_type }}"
- marker: "# {mark} ANSIBLE MANAGED BLOCK engine-kubernetes"
+ marker: "# {mark} ANSIBLE MANAGED BLOCK engine-ironic"
- name: Reload deployment variables
include_vars: "{{ deployment_vars_file }}"
diff --git a/playbooks/roles/package/defaults/main.yaml b/playbooks/roles/package/defaults/main.yaml
index 00c5dfd..d714308 100644
--- a/playbooks/roles/package/defaults/main.yaml
+++ b/playbooks/roles/package/defaults/main.yaml
@@ -24,11 +24,13 @@
binaries_folder: "{{ offline_pkg_folder }}/binaries"
pip_folder: "{{ offline_pkg_folder }}/pip"
-# NOTE (fdegir): the image we use for provisioning defaults to ubuntu1804 for the timebeing as that's the only distro we support
+# NOTE (fdegir): the deployment image to download and include in the package is
+# listed here for the timebeing. it could be moved to a more/distro specific
+# place once the dependencies are distributed to stacks in future
dib_images:
- - https://artifactory.nordix.org/artifactory/cloud-infra/dib/deployment_image/ubuntu1804/deployment_image.qcow2
- - https://artifactory.nordix.org/artifactory/cloud-infra/dib/ipa_image/coreos/ipa.initramfs
- - https://artifactory.nordix.org/artifactory/cloud-infra/dib/ipa_image/coreos/ipa.kernel
+ - "https://artifactory.nordix.org/artifactory/cloud-infra/dib/deployment_image/{{ distro }}/deployment_image.qcow2"
+ - "https://artifactory.nordix.org/artifactory/cloud-infra/dib/ipa_image/coreos/ipa.initramfs"
+ - "https://artifactory.nordix.org/artifactory/cloud-infra/dib/ipa_image/coreos/ipa.kernel"
# git repositories
repositories:
diff --git a/vars/ironic.yaml b/vars/ironic.yaml
index f24bf63..44edc0d 100644
--- a/vars/ironic.yaml
+++ b/vars/ironic.yaml
@@ -19,6 +19,7 @@
distros:
- ubuntu1804
+ - centos7
provisioners:
bifrost: