Remove support for non-venv deployments
It has been deprecated and untested since ussuri, time to move on. Change-Id: Ieddda38b12d07a2a5c51650850b150dd82f332a9
This commit is contained in:
parent
3bf9631ae5
commit
2cf21258af
|
@ -24,12 +24,9 @@ VENV = "/opt/stack/bifrost"
|
||||||
ANSIBLE = os.path.join(VENV, 'bin', 'ansible-playbook')
|
ANSIBLE = os.path.join(VENV, 'bin', 'ansible-playbook')
|
||||||
COMMON_ENV = {
|
COMMON_ENV = {
|
||||||
'VENV': VENV,
|
'VENV': VENV,
|
||||||
'USE_VENV': 'true',
|
|
||||||
'ENABLE_VENV': 'true',
|
|
||||||
}
|
}
|
||||||
COMMON_PARAMS = [
|
COMMON_PARAMS = [
|
||||||
'-e', 'ansible_python_interpreter=%s/bin/python3' % VENV,
|
'-e', 'ansible_python_interpreter=%s/bin/python3' % VENV,
|
||||||
'-e', 'enable_venv=true',
|
|
||||||
'-e', 'bifrost_venv_dir=%s' % VENV,
|
'-e', 'bifrost_venv_dir=%s' % VENV,
|
||||||
]
|
]
|
||||||
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
|
BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
|
||||||
|
|
|
@ -259,22 +259,13 @@ packages, Bifrost defaults to installing everything to a virtual environment.
|
||||||
``scripts/env-setup.sh`` will automatically create a virtual environment in
|
``scripts/env-setup.sh`` will automatically create a virtual environment in
|
||||||
``/opt/stack/bifrost`` if it does not exist.
|
``/opt/stack/bifrost`` if it does not exist.
|
||||||
|
|
||||||
If you want to enable system-wide installing, set ``ENABLE_VENV`` to ``false``
|
|
||||||
before calling ``env-setup.sh``::
|
|
||||||
|
|
||||||
export ENABLE_VENV=false
|
|
||||||
|
|
||||||
.. warning::
|
|
||||||
This is not recommended and not tested. Future versions of Bifrost may
|
|
||||||
remove support of running outside of a virtual environment.
|
|
||||||
|
|
||||||
If you want to relocate the virtual environment, export the ``VENV`` variable
|
If you want to relocate the virtual environment, export the ``VENV`` variable
|
||||||
before calling ``env-setup.sh``::
|
before calling ``env-setup.sh``::
|
||||||
|
|
||||||
export VENV=/path/to/my/venv
|
export VENV=/path/to/my/venv
|
||||||
|
|
||||||
If you're using the ansible playbooks directly (without the helper scripts),
|
If you're using the ansible playbooks directly (without the helper scripts),
|
||||||
set the ``enable_venv`` and ``bifrost_venv_dir`` variables accordingly.
|
set the ``bifrost_venv_dir`` variables accordingly.
|
||||||
|
|
||||||
Pre-installation settings
|
Pre-installation settings
|
||||||
=========================
|
=========================
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
UPPER_CONSTRAINTS_FILE: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
|
UPPER_CONSTRAINTS_FILE: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
|
||||||
WORKSPACE: "{{ ansible_user_dir }}/src/opendev.org"
|
WORKSPACE: "{{ ansible_user_dir }}/src/opendev.org"
|
||||||
USE_DHCP: "{{ use_dhcp | default(false) | bool | lower }}"
|
USE_DHCP: "{{ use_dhcp | default(false) | bool | lower }}"
|
||||||
ENABLE_VENV: "{{ use_venv | default(true) | bool | lower }}"
|
|
||||||
ZUUL_BRANCH: "{{ zuul.branch }}"
|
ZUUL_BRANCH: "{{ zuul.branch }}"
|
||||||
BOOT_MODE: "{{ boot_mode | default('') }}"
|
BOOT_MODE: "{{ boot_mode | default('') }}"
|
||||||
TEST_VM_NODE_DRIVER: "{{ test_driver | default('ipmi') }}"
|
TEST_VM_NODE_DRIVER: "{{ test_driver | default('ipmi') }}"
|
||||||
|
|
|
@ -26,6 +26,5 @@ iso_gen_utility: "mkisofs"
|
||||||
node_network_info: {}
|
node_network_info: {}
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -5,6 +5,5 @@ deploy_image: "{{http_boot_folder}}/{{deploy_image_filename}}"
|
||||||
|
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -20,9 +20,8 @@ ipa_git_folder: /opt/stack/ironic-python-agent
|
||||||
reqs_git_folder: /opt/stack/requirements
|
reqs_git_folder: /opt/stack/requirements
|
||||||
ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder
|
ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder
|
||||||
# Settings related to installing bifrost in a virtual environment
|
# Settings related to installing bifrost in a virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
bifrost_venv_env:
|
bifrost_venv_env:
|
||||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -185,7 +185,7 @@
|
||||||
and ("debian" in dib_os_element or "ubuntu" in dib_os_element)
|
and ("debian" in dib_os_element or "ubuntu" in dib_os_element)
|
||||||
- name: "Initiate image build"
|
- name: "Initiate image build"
|
||||||
command: disk-image-create {{dib_arglist}}
|
command: disk-image-create {{dib_arglist}}
|
||||||
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env if enable_venv|bool else {}) }}"
|
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env) }}"
|
||||||
when:
|
when:
|
||||||
- not build_ramdisk | bool
|
- not build_ramdisk | bool
|
||||||
- not test_image_present.stat.exists
|
- not test_image_present.stat.exists
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
- not test_image_initramfs_present.stat.exists
|
- not test_image_initramfs_present.stat.exists
|
||||||
- name: "Initiate ramdisk build"
|
- name: "Initiate ramdisk build"
|
||||||
command: ramdisk-image-create {{dib_arglist}}
|
command: ramdisk-image-create {{dib_arglist}}
|
||||||
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env if enable_venv|bool else {}) }}"
|
environment: "{{ dib_env_vars_final | combine(bifrost_venv_env) }}"
|
||||||
when:
|
when:
|
||||||
- build_ramdisk | bool
|
- build_ramdisk | bool
|
||||||
- not test_image_present.stat.exists
|
- not test_image_present.stat.exists
|
||||||
|
|
|
@ -40,12 +40,11 @@ test_vm_machine: "pc-1.0"
|
||||||
# NOTE(pas-ha) not really tested with non-local qemu connections
|
# NOTE(pas-ha) not really tested with non-local qemu connections
|
||||||
test_vm_libvirt_uri: "{{ lookup('env', 'LIBVIRT_CONNECT_URI') | default('qemu:///system', true) }}"
|
test_vm_libvirt_uri: "{{ lookup('env', 'LIBVIRT_CONNECT_URI') | default('qemu:///system', true) }}"
|
||||||
# Settings related to installing bifrost in a virtual environment
|
# Settings related to installing bifrost in a virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
bifrost_venv_env:
|
bifrost_venv_env:
|
||||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
git_branch: master
|
git_branch: master
|
||||||
git_root: "/opt/stack"
|
git_root: "/opt/stack"
|
||||||
|
|
|
@ -98,12 +98,12 @@
|
||||||
- name: get list of nodes from virtualbmc
|
- name: get list of nodes from virtualbmc
|
||||||
command: vbmc list
|
command: vbmc list
|
||||||
register: vbmc_list
|
register: vbmc_list
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
# NOTE(NobodyCam): Space at the end of the find clause is required for proper matching.
|
# NOTE(NobodyCam): Space at the end of the find clause is required for proper matching.
|
||||||
- name: delete vm from virtualbmc if it is there
|
- name: delete vm from virtualbmc if it is there
|
||||||
command: vbmc delete {{ vm_name }}
|
command: vbmc delete {{ vm_name }}
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: vbmc_list.stdout.find(vm_name) != -1
|
when: vbmc_list.stdout.find(vm_name) != -1
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
|
@ -111,11 +111,11 @@
|
||||||
|
|
||||||
- name: plug vm into vbmc
|
- name: plug vm into vbmc
|
||||||
command: vbmc add {{ vm_name }} --libvirt-uri {{ test_vm_libvirt_uri }} --port {{ virtual_ipmi_port }}
|
command: vbmc add {{ vm_name }} --libvirt-uri {{ test_vm_libvirt_uri }} --port {{ virtual_ipmi_port }}
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: start virtualbmc
|
- name: start virtualbmc
|
||||||
command: vbmc start {{ vm_name }}
|
command: vbmc start {{ vm_name }}
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: get XML of the vm
|
- name: get XML of the vm
|
||||||
virt:
|
virt:
|
||||||
|
|
|
@ -1,15 +1,10 @@
|
||||||
{% if enable_venv | bool %}
|
|
||||||
{% set gunicorn = bifrost_venv_dir ~ '/bin/gunicorn' %}
|
|
||||||
{% else %}
|
|
||||||
{% set gunicorn = '/usr/local/bin/gunicorn' %}
|
|
||||||
{% endif %}
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Sushy Redfish Emulator
|
Description=Sushy Redfish Emulator
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
ExecStart={{ gunicorn }} sushy_tools.emulator.main:app \
|
ExecStart={{ bifrost_venv_dir }}/bin/gunicorn sushy_tools.emulator.main:app \
|
||||||
--bind {{ redfish_emulator_host }}:{{ redfish_emulator_port }} \
|
--bind {{ redfish_emulator_host }}:{{ redfish_emulator_port }} \
|
||||||
--env SUSHY_EMULATOR_CONFIG=/etc/redfish-emulator.conf \
|
--env SUSHY_EMULATOR_CONFIG=/etc/redfish-emulator.conf \
|
||||||
--env FLASK_DEBUG=1 --workers 2 --threads 2 --timeout 90
|
--env FLASK_DEBUG=1 --workers 2 --threads 2 --timeout 90
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
{% if enable_venv | bool %}
|
|
||||||
{% set vbmcd = bifrost_venv_dir ~ '/bin/vbmcd' %}
|
|
||||||
{% else %}
|
|
||||||
{% set vbmcd = '/usr/local/bin/vbmcd' %}
|
|
||||||
{% endif %}
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Virtual BMC daemon
|
Description=Virtual BMC daemon
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
ExecStart={{ vbmcd }} --foreground
|
ExecStart={{ bifrost_venv_dir }}/bin/vbmcd --foreground
|
||||||
|
|
|
@ -24,6 +24,5 @@ wait_timeout: 1800
|
||||||
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -257,12 +257,8 @@ inspector_store_data_in_nginx: Boolean value, default false. If true, this
|
||||||
|
|
||||||
### Virtual Environment Install
|
### Virtual Environment Install
|
||||||
|
|
||||||
Bifrost can install ironic into a python virtual environment using the
|
Bifrost installs ironic and other services into a python virtual environment
|
||||||
following configuration options:
|
using the following configuration options:
|
||||||
|
|
||||||
enable_venv: Enables virtual environment support. Boolean value; the default
|
|
||||||
is false. enable_venv is automatically defined as true if VENV
|
|
||||||
is set in the user's environment.
|
|
||||||
|
|
||||||
bifrost_venv_dir: The full path of the virtual environment directory. The
|
bifrost_venv_dir: The full path of the virtual environment directory. The
|
||||||
default value is /opt/stack/bifrost. When VENV is set in
|
default value is /opt/stack/bifrost. When VENV is set in
|
||||||
|
|
|
@ -249,13 +249,12 @@ power_off_after_inspection: "{{ not fast_track|bool }}"
|
||||||
download_ipxe: false
|
download_ipxe: false
|
||||||
|
|
||||||
# Settings related to installing bifrost in a virtual environment
|
# Settings related to installing bifrost in a virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
bifrost_venv_env:
|
bifrost_venv_env:
|
||||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||||
pydoc: "python -m pydoc"
|
pydoc: "python -m pydoc"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
# Authentication support
|
# Authentication support
|
||||||
# By default, bifrost was developed around being a toolkit
|
# By default, bifrost was developed around being a toolkit
|
||||||
|
|
|
@ -22,11 +22,6 @@
|
||||||
noauth_mode | bool == true and enable_keystone is defined and
|
noauth_mode | bool == true and enable_keystone is defined and
|
||||||
enable_keystone | bool == true
|
enable_keystone | bool == true
|
||||||
|
|
||||||
- name: "If VENV is set in the environment, enable installation into venv"
|
|
||||||
set_fact:
|
|
||||||
enable_venv: true
|
|
||||||
when: lookup('env', 'VENV') | length > 0
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: "Ask systemd to reload configuration"
|
- name: "Ask systemd to reload configuration"
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -191,14 +186,14 @@
|
||||||
|
|
||||||
- name: "Create ironic DB Schema"
|
- name: "Create ironic DB Schema"
|
||||||
command: ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema
|
command: ironic-dbsync --config-file /etc/ironic/ironic.conf create_schema
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: >
|
when: >
|
||||||
ironic.database.host == 'localhost' and
|
ironic.database.host == 'localhost' and
|
||||||
test_created_db.changed | bool == true
|
test_created_db.changed | bool == true
|
||||||
|
|
||||||
- name: "Upgrade ironic DB Schema"
|
- name: "Upgrade ironic DB Schema"
|
||||||
command: ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade
|
command: ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: >
|
when: >
|
||||||
ironic.database.host != 'localhost' or
|
ironic.database.host != 'localhost' or
|
||||||
test_created_db.changed | bool == false
|
test_created_db.changed | bool == false
|
||||||
|
@ -216,7 +211,7 @@
|
||||||
- name: "Get ironic-api & ironic-conductor install location"
|
- name: "Get ironic-api & ironic-conductor install location"
|
||||||
shell: echo $(dirname $(which ironic-api))
|
shell: echo $(dirname $(which ironic-api))
|
||||||
register: ironic_install_prefix
|
register: ironic_install_prefix
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Set permissions for /var/lib/ironic for the ironic user"
|
- name: "Set permissions for /var/lib/ironic for the ironic user"
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -117,11 +117,11 @@
|
||||||
- name: "Upgrade inspector DB Schema"
|
- name: "Upgrade inspector DB Schema"
|
||||||
command: ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
|
command: ironic-inspector-dbsync --config-file /etc/ironic-inspector/inspector.conf upgrade
|
||||||
become: true
|
become: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
- name: "Inspector - Get ironic-inspector install location"
|
- name: "Inspector - Get ironic-inspector install location"
|
||||||
shell: echo $(dirname $(which ironic-inspector))
|
shell: echo $(dirname $(which ironic-inspector))
|
||||||
register: ironic_install_prefix
|
register: ironic_install_prefix
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
- name: "Inspector - Place service"
|
- name: "Inspector - Place service"
|
||||||
template:
|
template:
|
||||||
src: systemd_template.j2
|
src: systemd_template.j2
|
||||||
|
|
|
@ -37,14 +37,13 @@
|
||||||
owner=ironic
|
owner=ironic
|
||||||
group=ironic
|
group=ironic
|
||||||
mode=0640
|
mode=0640
|
||||||
- name: "Symlinks from venv if using"
|
- name: "Symlinks from venv"
|
||||||
file:
|
file:
|
||||||
state: link
|
state: link
|
||||||
path: "{{ ironic_rootwrap_dir }}/{{ item | basename }}"
|
path: "{{ ironic_rootwrap_dir }}/{{ item | basename }}"
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
when: enable_venv | bool == true
|
|
||||||
loop:
|
loop:
|
||||||
- "{{ bifrost_venv_dir }}/bin/ironic-rootwrap"
|
- "{{ bifrost_venv_dir }}/bin/ironic-rootwrap"
|
||||||
- "{{ bifrost_venv_dir }}/bin/ironic-inspector-rootwrap"
|
- "{{ bifrost_venv_dir }}/bin/ironic-inspector-rootwrap"
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create service user for ironic"
|
- name: "Create service user for ironic"
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
update_password: always
|
update_password: always
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Associate ironic user to admin role"
|
- name: "Associate ironic user to admin role"
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create keystone service record for ironic"
|
- name: "Create keystone service record for ironic"
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Check ironic admin endpoint exists"
|
- name: "Check ironic admin endpoint exists"
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_admin_endpoint
|
register: test_ironic_admin_endpoint
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Check ironic public endpoint exists"
|
- name: "Check ironic public endpoint exists"
|
||||||
command: |
|
command: |
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_public_endpoint
|
register: test_ironic_public_endpoint
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Check ironic internal endpoint exists"
|
- name: "Check ironic internal endpoint exists"
|
||||||
command: |
|
command: |
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_internal_endpoint
|
register: test_ironic_internal_endpoint
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Create ironic admin endpoint"
|
- name: "Create ironic admin endpoint"
|
||||||
command: |
|
command: |
|
||||||
|
@ -159,7 +159,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal admin "{{ ironic.keystone.admin_url | default('http://127.0.0.1:6385/') }}"
|
baremetal admin "{{ ironic.keystone.admin_url | default('http://127.0.0.1:6385/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_admin_endpoint.rc != 0 or test_ironic_admin_endpoint.stdout == '[]'
|
when: test_ironic_admin_endpoint.rc != 0 or test_ironic_admin_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Setting external Ironic public URL"
|
- name: "Setting external Ironic public URL"
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal public "{{ ironic_public_url | default(ironic.keystone.public_url) | default('http://127.0.0.1:6385/') }}"
|
baremetal public "{{ ironic_public_url | default(ironic.keystone.public_url) | default('http://127.0.0.1:6385/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_public_endpoint.rc != 0 or test_ironic_public_endpoint.stdout == '[]'
|
when: test_ironic_public_endpoint.rc != 0 or test_ironic_public_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Setting internal Ironic URL"
|
- name: "Setting internal Ironic URL"
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal internal "{{ ironic_private_url | default(ironic.keystone.internal_url) | default('http://127.0.0.1:6385/') }}"
|
baremetal internal "{{ ironic_private_url | default(ironic.keystone.internal_url) | default('http://127.0.0.1:6385/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_internal_endpoint.rc != 0 or test_ironic_internal_endpoint.stdout == '[]'
|
when: test_ironic_internal_endpoint.rc != 0 or test_ironic_internal_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Create baremetal_admin role"
|
- name: "Create baremetal_admin role"
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create baremetal_observer role"
|
- name: "Create baremetal_observer role"
|
||||||
|
@ -225,7 +225,7 @@
|
||||||
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create baremetal project"
|
- name: "Create baremetal project"
|
||||||
|
@ -242,7 +242,7 @@
|
||||||
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
project_name: "{{ keystone.bootstrap.project_name | default('admin') }}"
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create bifrost user"
|
- name: "Create bifrost user"
|
||||||
|
@ -259,7 +259,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Associate bifrost user with baremetal_admin"
|
- name: "Associate bifrost user with baremetal_admin"
|
||||||
|
@ -275,5 +275,5 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Associate ironic_inspector user to admin role"
|
- name: "Associate ironic_inspector user to admin role"
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Create keystone service record for ironic-inspector"
|
- name: "Create keystone service record for ironic-inspector"
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Check ironic-inspector admin endpoint exists"
|
- name: "Check ironic-inspector admin endpoint exists"
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_inspector_admin_endpoint
|
register: test_ironic_inspector_admin_endpoint
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Check ironic-inspector public endpoint exists"
|
- name: "Check ironic-inspector public endpoint exists"
|
||||||
command: |
|
command: |
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_inspector_public_endpoint
|
register: test_ironic_inspector_public_endpoint
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Check ironic-inspector internal endpoint exists"
|
- name: "Check ironic-inspector internal endpoint exists"
|
||||||
command: |
|
command: |
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
--region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
register: test_ironic_inspector_internal_endpoint
|
register: test_ironic_inspector_internal_endpoint
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Create ironic-inspector admin endpoint"
|
- name: "Create ironic-inspector admin endpoint"
|
||||||
command: |
|
command: |
|
||||||
|
@ -137,7 +137,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal-introspection admin "{{ ironic_inspector.keystone.admin_url | default('http://127.0.0.1:5050/') }}"
|
baremetal-introspection admin "{{ ironic_inspector.keystone.admin_url | default('http://127.0.0.1:5050/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_inspector_admin_endpoint.rc != 0 or test_ironic_inspector_admin_endpoint.stdout == '[]'
|
when: test_ironic_inspector_admin_endpoint.rc != 0 or test_ironic_inspector_admin_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Setting external ironic-inspector public URL"
|
- name: "Setting external ironic-inspector public URL"
|
||||||
|
@ -160,7 +160,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal-introspection public "{{ ironic_inspector_public_url | default(ironic_inspector.keystone.public_url) | default('http://127.0.0.1:5050/') }}"
|
baremetal-introspection public "{{ ironic_inspector_public_url | default(ironic_inspector.keystone.public_url) | default('http://127.0.0.1:5050/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_inspector_public_endpoint.rc != 0 or test_ironic_inspector_public_endpoint.stdout == '[]'
|
when: test_ironic_inspector_public_endpoint.rc != 0 or test_ironic_inspector_public_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Setting internal ironic-inspector URL"
|
- name: "Setting internal ironic-inspector URL"
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
endpoint create --region "{{ keystone.bootstrap.region_name | default('RegionOne') }}"
|
||||||
baremetal-introspection internal "{{ ironic_inspector_private_url | default(ironic_inspector.keystone.internal_url) | default('http://127.0.0.1:5050/') }}"
|
baremetal-introspection internal "{{ ironic_inspector_private_url | default(ironic_inspector.keystone.internal_url) | default('http://127.0.0.1:5050/') }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: test_ironic_inspector_internal_endpoint.rc != 0 or test_ironic_inspector_internal_endpoint.stdout == '[]'
|
when: test_ironic_inspector_internal_endpoint.rc != 0 or test_ironic_inspector_internal_endpoint.stdout == '[]'
|
||||||
|
|
||||||
- name: "Create inspector_user user"
|
- name: "Create inspector_user user"
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
update_password: always
|
update_password: always
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
||||||
- name: "Associate inspector_user with baremetal_admin"
|
- name: "Associate inspector_user with baremetal_admin"
|
||||||
|
@ -213,5 +213,5 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
|
|
|
@ -11,12 +11,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
---
|
---
|
||||||
- name: "If VENV is set in the environment, enable installation into venv"
|
|
||||||
set_fact:
|
|
||||||
enable_venv: true
|
|
||||||
when: lookup('env', 'VENV') | length > 0
|
|
||||||
|
|
||||||
- name: "Perform ironic online data migrations"
|
- name: "Perform ironic online data migrations"
|
||||||
command: ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
|
command: ironic-dbsync --config-file /etc/ironic/ironic.conf online_data_migrations
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: ironic.database.host != 'localhost'
|
when: ironic.database.host != 'localhost'
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
- name: "Validate API access and at least one conductor"
|
- name: "Validate API access and at least one conductor"
|
||||||
command: baremetal conductor list -f value -c Hostname
|
command: baremetal conductor list -f value -c Hostname
|
||||||
environment: "{{ testing_env | combine(bifrost_venv_env if enable_venv else {}) }}"
|
environment: "{{ testing_env | combine(bifrost_venv_env) }}"
|
||||||
register: conductor_list
|
register: conductor_list
|
||||||
failed_when: conductor_list.rc != 0 or conductor_list.stdout | trim == ""
|
failed_when: conductor_list.rc != 0 or conductor_list.stdout | trim == ""
|
||||||
retries: 6
|
retries: 6
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
- name: "Validate introspection API access"
|
- name: "Validate introspection API access"
|
||||||
command: baremetal introspection list
|
command: baremetal introspection list
|
||||||
environment: "{{ testing_env | combine(bifrost_venv_env if enable_venv else {}) }}"
|
environment: "{{ testing_env | combine(bifrost_venv_env) }}"
|
||||||
register: introspection_list
|
register: introspection_list
|
||||||
retries: 6
|
retries: 6
|
||||||
delay: 5
|
delay: 5
|
||||||
|
|
|
@ -3,9 +3,8 @@ ironic_api_url: "http://localhost:6385"
|
||||||
ironic_inspector_api_url: "http://localhost:5050"
|
ironic_inspector_api_url: "http://localhost:5050"
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
enable_keystone: false
|
enable_keystone: false
|
||||||
noauth_mode: true
|
noauth_mode: true
|
||||||
|
|
|
@ -41,13 +41,12 @@ file_url_port: 8080
|
||||||
http_boot_folder: /httpboot
|
http_boot_folder: /httpboot
|
||||||
|
|
||||||
# Settings related to installing bifrost in a virtual environment
|
# Settings related to installing bifrost in a virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
bifrost_venv_env:
|
bifrost_venv_env:
|
||||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||||
pydoc: "python -m pydoc"
|
pydoc: "python -m pydoc"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
# Directory (on the controller) to keep the passwords
|
# Directory (on the controller) to keep the passwords
|
||||||
password_dir: "{{ lookup('env', 'HOME') }}/.config/bifrost"
|
password_dir: "{{ lookup('env', 'HOME') }}/.config/bifrost"
|
||||||
|
|
|
@ -13,21 +13,15 @@
|
||||||
---
|
---
|
||||||
# NOTE(TheJulia): There is significant commonality between this playbook
|
# NOTE(TheJulia): There is significant commonality between this playbook
|
||||||
# and the bifrost bootstrap process.
|
# and the bifrost bootstrap process.
|
||||||
- name: "If VENV is set in the environment, enable installation into venv"
|
|
||||||
set_fact:
|
|
||||||
enable_venv: true
|
|
||||||
uwsgi_venv: "{{ bifrost_venv_env.get('VIRTUAL_ENV', '') }}"
|
|
||||||
when: lookup('env', 'VENV') | length > 0
|
|
||||||
|
|
||||||
- name: "Get uwsgi install location"
|
- name: "Get uwsgi install location"
|
||||||
shell: echo $(dirname $(which uwsgi))
|
shell: echo $(dirname $(which uwsgi))
|
||||||
register: uwsgi_install_prefix
|
register: uwsgi_install_prefix
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Get keystone-wsgi-admin location"
|
- name: "Get keystone-wsgi-admin location"
|
||||||
shell: echo $(dirname $(which keystone-wsgi-admin))
|
shell: echo $(dirname $(which keystone-wsgi-admin))
|
||||||
register: keystone_install_prefix
|
register: keystone_install_prefix
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
# NOTE(sean-k-mooney) only the MySQL db is started during bootstrapping.
|
# NOTE(sean-k-mooney) only the MySQL db is started during bootstrapping.
|
||||||
# all other services are started in the Start phase.
|
# all other services are started in the Start phase.
|
||||||
|
@ -110,19 +104,19 @@
|
||||||
|
|
||||||
- name: "Apply/Update keystone DB Schema"
|
- name: "Apply/Update keystone DB Schema"
|
||||||
command: keystone-manage db_sync
|
command: keystone-manage db_sync
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Setup Fernet key repositories"
|
- name: "Setup Fernet key repositories"
|
||||||
command: >
|
command: >
|
||||||
keystone-manage fernet_setup
|
keystone-manage fernet_setup
|
||||||
--keystone-user="{{ nginx_user }}" --keystone-group="{{ nginx_user }}"
|
--keystone-user="{{ nginx_user }}" --keystone-group="{{ nginx_user }}"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Setup Keystone Credentials"
|
- name: "Setup Keystone Credentials"
|
||||||
command: >
|
command: >
|
||||||
keystone-manage credential_setup
|
keystone-manage credential_setup
|
||||||
--keystone-user="{{ nginx_user }}" --keystone-group="{{ nginx_user }}"
|
--keystone-user="{{ nginx_user }}" --keystone-group="{{ nginx_user }}"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
- name: "Setting external Keystone public URL"
|
- name: "Setting external Keystone public URL"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -145,7 +139,7 @@
|
||||||
--bootstrap-public-url="{{ keystone_public_url | default(keystone.bootstrap.public_url) }}"
|
--bootstrap-public-url="{{ keystone_public_url | default(keystone.bootstrap.public_url) }}"
|
||||||
--bootstrap-internal-url="{{ keystone_private_url | default(keystone.bootstrap.internal_url) }}"
|
--bootstrap-internal-url="{{ keystone_private_url | default(keystone.bootstrap.internal_url) }}"
|
||||||
--bootstrap-region-id="{{ keystone.bootstrap.region_name }}"
|
--bootstrap-region-id="{{ keystone.bootstrap.region_name }}"
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
when: >
|
when: >
|
||||||
test_created_keystone_db.changed | bool == true and
|
test_created_keystone_db.changed | bool == true and
|
||||||
keystone.bootstrap.enabled | bool == true and
|
keystone.bootstrap.enabled | bool == true and
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
project_domain_id: "default"
|
project_domain_id: "default"
|
||||||
user_domain_id: "default"
|
user_domain_id: "default"
|
||||||
wait: yes
|
wait: yes
|
||||||
environment: "{{ bifrost_venv_env if enable_venv else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
no_log: true
|
no_log: true
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -6,9 +6,7 @@ threads = 2
|
||||||
plugin = python3
|
plugin = python3
|
||||||
no-orphans = true
|
no-orphans = true
|
||||||
chmod-socket = 660
|
chmod-socket = 660
|
||||||
{% if uwsgi_venv is defined and uwsgi_venv | length > 0 %}
|
virtualenv = {{ bifrost_venv_dir }}
|
||||||
virtualenv = {{ uwsgi_venv }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
socket = /run/uwsgi/keystone-admin.socket
|
socket = /run/uwsgi/keystone-admin.socket
|
||||||
pidfile = /run/uwsgi/keystone-admin.pid
|
pidfile = /run/uwsgi/keystone-admin.pid
|
||||||
|
|
|
@ -6,9 +6,7 @@ threads = 2
|
||||||
plugin = python3
|
plugin = python3
|
||||||
no-orphans = true
|
no-orphans = true
|
||||||
chmod-socket = 660
|
chmod-socket = 660
|
||||||
{% if uwsgi_venv is defined and uwsgi_venv | length > 0 %}
|
virtualenv = {{ bifrost_venv_dir }}
|
||||||
virtualenv = {{ uwsgi_venv }}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
socket = /run/uwsgi/keystone-public.socket
|
socket = /run/uwsgi/keystone-public.socket
|
||||||
pidfile = /run/uwsgi/keystone-public.pid
|
pidfile = /run/uwsgi/keystone-public.pid
|
||||||
|
|
|
@ -4,10 +4,9 @@ bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
bifrost_venv_env:
|
bifrost_venv_env:
|
||||||
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
VIRTUAL_ENV: "{{ bifrost_venv_dir }}"
|
||||||
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
PATH: "{{ bifrost_venv_dir }}/bin:{{ ansible_env.PATH }}" # include regular path via lookup env
|
||||||
enable_venv: true
|
|
||||||
skip_install: false
|
skip_install: false
|
||||||
source_install: false
|
source_install: false
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
||||||
# Pip options
|
# Pip options
|
||||||
developer_mode: false
|
developer_mode: false
|
||||||
|
|
|
@ -42,20 +42,7 @@
|
||||||
until: pip_package_install_done is succeeded
|
until: pip_package_install_done is succeeded
|
||||||
retries: "{{ pip_install_retries }}"
|
retries: "{{ pip_install_retries }}"
|
||||||
delay: "{{ pip_install_delay }}"
|
delay: "{{ pip_install_delay }}"
|
||||||
when: source_install | bool == false and enable_venv | bool
|
when: not source_install | bool
|
||||||
|
|
||||||
- name: "Install {{ package }} package from pip without virtualenv"
|
|
||||||
pip:
|
|
||||||
name: "{{ package }}"
|
|
||||||
state: "{{ state | default(omit) }}"
|
|
||||||
version: "{{ version | default(omit) }}"
|
|
||||||
extra_args: "{{ constraints_extra_args | default(extra_args) | default(omit) }}"
|
|
||||||
executable: /usr/bin/pip3
|
|
||||||
register: pip_package_install_done
|
|
||||||
until: pip_package_install_done is succeeded
|
|
||||||
retries: "{{ pip_install_retries }}"
|
|
||||||
delay: "{{ pip_install_delay }}"
|
|
||||||
when: source_install | bool == false and enable_venv | bool == false
|
|
||||||
|
|
||||||
- name: "Install requirements from {{ sourcedir }} using pip"
|
- name: "Install requirements from {{ sourcedir }} using pip"
|
||||||
pip:
|
pip:
|
||||||
|
@ -66,7 +53,7 @@
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
when: source_install | bool
|
when: source_install | bool
|
||||||
environment: "{{ bifrost_venv_env if (enable_venv | bool) else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
# NOTE(dtantsur): do not use constraints here, it does not work when the
|
# NOTE(dtantsur): do not use constraints here, it does not work when the
|
||||||
# package itself is constrained.
|
# package itself is constrained.
|
||||||
|
@ -76,6 +63,6 @@
|
||||||
editable: "{{ developer_mode | bool }}"
|
editable: "{{ developer_mode | bool }}"
|
||||||
extra_args: "{{ extra_args | default('') }}"
|
extra_args: "{{ extra_args | default('') }}"
|
||||||
when: source_install | bool
|
when: source_install | bool
|
||||||
environment: "{{ bifrost_venv_env if (enable_venv | bool) else {} }}"
|
environment: "{{ bifrost_venv_env }}"
|
||||||
|
|
||||||
when: not skip_install | bool
|
when: not skip_install | bool
|
||||||
|
|
|
@ -116,6 +116,5 @@ bifrost_install_sources:
|
||||||
name: ironic-python-agent-builder
|
name: ironic-python-agent-builder
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -4,6 +4,5 @@ wait_timeout: 900
|
||||||
multinode_testing: false
|
multinode_testing: false
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -6,6 +6,5 @@ rabbitmq_port: 5672
|
||||||
rabbitmq_service: rabbitmq-server
|
rabbitmq_service: rabbitmq-server
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -3,6 +3,5 @@ noauth_mode: true
|
||||||
wait_for_node_undeploy: false
|
wait_for_node_undeploy: false
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
---
|
---
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -17,6 +17,5 @@ ipa_ramdisk_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ans
|
||||||
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -10,6 +10,5 @@ inventory_dns: false
|
||||||
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
fact_gather_timeout: "{{ lookup('config', 'DEFAULT_GATHER_TIMEOUT', on_missing='skip') | default(omit, true) }}"
|
||||||
|
|
||||||
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
# Ensure that Ansible is using python interpreter and dependencies inside the bifrost virtual environment
|
||||||
enable_venv: true
|
|
||||||
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
bifrost_venv_dir: "{{ lookup('env', 'VENV') or '/opt/stack/bifrost' }}"
|
||||||
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' if enable_venv | bool else '/usr/bin/python3' }}"
|
ansible_python_interpreter: "{{ bifrost_venv_dir + '/bin/python3' }}"
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
No longer supports installation outside of a virtual environment. The
|
||||||
|
parameter ``enable_venv`` has been removed.
|
|
@ -19,24 +19,17 @@ ANSIBLE_SOURCE_PATH=${ANSIBLE_SOURCE_PATH:-ansible${ANSIBLE_PIP_VERSION}}
|
||||||
BIFROST_COLLECTIONS_PATHS=${ANSIBLE_COLLECTIONS_PATHS:-}
|
BIFROST_COLLECTIONS_PATHS=${ANSIBLE_COLLECTIONS_PATHS:-}
|
||||||
PLAYBOOKS_LIBRARY_PATH=$(dirname $0)/../playbooks/library
|
PLAYBOOKS_LIBRARY_PATH=$(dirname $0)/../playbooks/library
|
||||||
|
|
||||||
|
${PIP} install "${ANSIBLE_SOURCE_PATH}"
|
||||||
if [[ -n "${VENV-}" ]]; then
|
ANSIBLE=${VENV}/bin/ansible
|
||||||
${PIP} install "${ANSIBLE_SOURCE_PATH}"
|
ANSIBLE_GALAXY=${VENV}/bin/ansible-galaxy
|
||||||
ANSIBLE=${VENV}/bin/ansible
|
if [[ -z $BIFROST_COLLECTIONS_PATHS ]]; then
|
||||||
ANSIBLE_GALAXY=${VENV}/bin/ansible-galaxy
|
echo "Setting ANSIBLE_COLLECTIONS_PATHS to virtualenv"
|
||||||
if [[ -z $BIFROST_COLLECTIONS_PATHS ]]; then
|
export ANSIBLE_COLLECTIONS_PATHS=${VENV}/collections
|
||||||
echo "Setting ANSIBLE_COLLECTIONS_PATHS to virtualenv"
|
BIFROST_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS
|
||||||
export ANSIBLE_COLLECTIONS_PATHS=${VENV}/collections
|
fi
|
||||||
BIFROST_COLLECTIONS_PATHS=$ANSIBLE_COLLECTIONS_PATHS
|
if [[ -n "$ANSIBLE_COLLECTION_SOURCE_PATH" ]]; then
|
||||||
fi
|
mkdir -p "$BIFROST_COLLECTIONS_PATHS/ansible_collections/openstack"
|
||||||
if [[ -n "$ANSIBLE_COLLECTION_SOURCE_PATH" ]]; then
|
ln -s "$ANSIBLE_COLLECTION_SOURCE_PATH" "$BIFROST_COLLECTIONS_PATHS/ansible_collections/openstack/cloud"
|
||||||
mkdir -p "$BIFROST_COLLECTIONS_PATHS/ansible_collections/openstack"
|
|
||||||
ln -s "$ANSIBLE_COLLECTION_SOURCE_PATH" "$BIFROST_COLLECTIONS_PATHS/ansible_collections/openstack/cloud"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
${PIP} install --user --upgrade "${ANSIBLE_SOURCE_PATH}"
|
|
||||||
ANSIBLE=${HOME}/.local/bin/ansible
|
|
||||||
ANSIBLE_GALAXY=${HOME}/.local/bin/ansible-galaxy
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# NOTE(pas-ha) the following is a temporary workaround for third-party CI
|
# NOTE(pas-ha) the following is a temporary workaround for third-party CI
|
||||||
|
@ -71,12 +64,6 @@ fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "To use bifrost, do"
|
echo "To use bifrost, do"
|
||||||
|
echo "source ${VENV}/bin/activate"
|
||||||
if [[ -n "${VENV-}" ]]; then
|
|
||||||
echo "source ${VENV}/bin/activate"
|
|
||||||
else
|
|
||||||
echo "Prepend ~/.local/bin to your PATH if it is not that way already.."
|
|
||||||
echo ".. or use full path to local Ansible at ~/.local/bin/ansible-playbook"
|
|
||||||
fi
|
|
||||||
echo "Then run playbooks as normal."
|
echo "Then run playbooks as normal."
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -6,10 +6,7 @@ declare -A PKG_MAP
|
||||||
# workaround: for latest bindep to work, it needs to use en_US local
|
# workaround: for latest bindep to work, it needs to use en_US local
|
||||||
export LANG=c
|
export LANG=c
|
||||||
|
|
||||||
ENABLE_VENV=${ENABLE_VENV:-true}
|
export VENV=${VENV:-/opt/stack/bifrost}
|
||||||
if [[ "$ENABLE_VENV" != false ]]; then
|
|
||||||
export VENV=${VENV:-/opt/stack/bifrost}
|
|
||||||
fi
|
|
||||||
|
|
||||||
CHECK_CMD_PKGS=(
|
CHECK_CMD_PKGS=(
|
||||||
python3-devel
|
python3-devel
|
||||||
|
@ -89,22 +86,18 @@ if [ "${#EXTRA_PKG_DEPS[@]}" -ne 0 ]; then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "${VENV-}" ]; then
|
echo "NOTICE: Using virtualenv for this installation."
|
||||||
echo "NOTICE: Using virtualenv for this installation."
|
if [ ! -f ${VENV}/bin/activate ]; then
|
||||||
if [ ! -f ${VENV}/bin/activate ]; then
|
# only create venv if one doesn't exist
|
||||||
# only create venv if one doesn't exist
|
sudo -H -E python3 -m venv --system-site-packages ${VENV}
|
||||||
sudo -H -E python3 -m venv --system-site-packages ${VENV}
|
sudo -H -E chown -R ${USER} ${VENV}
|
||||||
sudo -H -E chown -R ${USER} ${VENV}
|
|
||||||
fi
|
|
||||||
# Note(cinerama): activate is not compatible with "set -u";
|
|
||||||
# disable it just for this line.
|
|
||||||
set +u
|
|
||||||
. ${VENV}/bin/activate
|
|
||||||
set -u
|
|
||||||
VIRTUAL_ENV=${VENV}
|
|
||||||
else
|
|
||||||
echo "NOTICE: Not using virtualenv for this installation."
|
|
||||||
fi
|
fi
|
||||||
|
# Note(cinerama): activate is not compatible with "set -u";
|
||||||
|
# disable it just for this line.
|
||||||
|
set +u
|
||||||
|
. ${VENV}/bin/activate
|
||||||
|
set -u
|
||||||
|
VIRTUAL_ENV=${VENV}
|
||||||
|
|
||||||
# If we're using a venv, we need to work around sudo not
|
# If we're using a venv, we need to work around sudo not
|
||||||
# keeping the path even with -E.
|
# keeping the path even with -E.
|
||||||
|
@ -119,26 +112,14 @@ EOF
|
||||||
|
|
||||||
export PIP_OPTS="--upgrade-strategy only-if-needed"
|
export PIP_OPTS="--upgrade-strategy only-if-needed"
|
||||||
|
|
||||||
if [ -n "${VENV-}" ]; then
|
|
||||||
ls -la ${VENV}/bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install the rest of required packages using bindep
|
# Install the rest of required packages using bindep
|
||||||
if [ -n "${VENV-}" ]; then
|
${PIP} install bindep
|
||||||
${PIP} install bindep
|
|
||||||
else
|
|
||||||
sudo -H -E ${PIP} install bindep
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using Bindep to install binary dependencies..."
|
echo "Using Bindep to install binary dependencies..."
|
||||||
# bindep returns 1 if packages are missing
|
# bindep returns 1 if packages are missing
|
||||||
bindep -b &> /dev/null || ${INSTALLER_CMD} $(bindep -b)
|
bindep -b &> /dev/null || ${INSTALLER_CMD} $(bindep -b)
|
||||||
|
|
||||||
echo "Installing Python requirements"
|
echo "Installing Python requirements"
|
||||||
if [ -n "${VENV-}" ]; then
|
${PIP} install -r "$(dirname $0)/../requirements.txt"
|
||||||
${PIP} install -r "$(dirname $0)/../requirements.txt"
|
|
||||||
else
|
|
||||||
sudo -H -E ${PIP} install -r "$(dirname $0)/../requirements.txt"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Completed installation of basic dependencies."
|
echo "Completed installation of basic dependencies."
|
||||||
|
|
|
@ -11,7 +11,6 @@ BUILD_IMAGE="${BUILD_IMAGE:-false}"
|
||||||
BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
|
BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
|
||||||
ENABLE_KEYSTONE="${ENABLE_KEYSTONE:-false}"
|
ENABLE_KEYSTONE="${ENABLE_KEYSTONE:-false}"
|
||||||
ZUUL_BRANCH=${ZUUL_BRANCH:-}
|
ZUUL_BRANCH=${ZUUL_BRANCH:-}
|
||||||
ENABLE_VENV=true
|
|
||||||
CLI_TEST=${CLI_TEST:-false}
|
CLI_TEST=${CLI_TEST:-false}
|
||||||
BOOT_MODE=${BOOT_MODE:-}
|
BOOT_MODE=${BOOT_MODE:-}
|
||||||
|
|
||||||
|
@ -169,7 +168,6 @@ ${ANSIBLE} -vvvv \
|
||||||
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
|
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
|
||||||
-e inventory_dhcp=${INVENTORY_DHCP} \
|
-e inventory_dhcp=${INVENTORY_DHCP} \
|
||||||
-e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \
|
-e inventory_dhcp_static_ip=${INVENTORY_DHCP_STATIC_IP} \
|
||||||
-e enable_venv=${ENABLE_VENV} \
|
|
||||||
-e enable_inspector=${USE_INSPECTOR} \
|
-e enable_inspector=${USE_INSPECTOR} \
|
||||||
-e inspect_nodes=${INSPECT_NODES} \
|
-e inspect_nodes=${INSPECT_NODES} \
|
||||||
-e download_ipa=${DOWNLOAD_IPA} \
|
-e download_ipa=${DOWNLOAD_IPA} \
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
|
|
||||||
- name: Install Bifrost
|
- name: Install Bifrost
|
||||||
command: ${VENV}/bin/ansible-playbook -vvvv -i inventory/target install.yaml -e network_interface={{network_interface}} -e ansible_python_interpreter="/usr/bin/python3" -e download_ipa=true -e use_cirros=true -e enable_venv=true
|
command: ${VENV}/bin/ansible-playbook -vvvv -i inventory/target install.yaml -e network_interface={{network_interface}} -e ansible_python_interpreter="/usr/bin/python3" -e download_ipa=true -e use_cirros=true
|
||||||
environment:
|
environment:
|
||||||
PATH: "{{ansible_env.HOME}}/.local/bin:{{ansible_env.PATH}}"
|
PATH: "{{ansible_env.HOME}}/.local/bin:{{ansible_env.PATH}}"
|
||||||
VENV: "/opt/stack/bifrost"
|
VENV: "/opt/stack/bifrost"
|
||||||
|
|
Loading…
Reference in New Issue