Stop installing openstackclient if keystone is not enabled
We have a standalone command now, let's use it. Change-Id: I446d7b490d4a14ede01384fd72926f85660ea6e7
This commit is contained in:
parent
8b7a41e247
commit
0b7fd20e9e
@ -16,25 +16,17 @@ necessary to access Ironic. A cloud called ``bifrost`` is always available. For
|
|||||||
example::
|
example::
|
||||||
|
|
||||||
export OS_CLOUD=bifrost
|
export OS_CLOUD=bifrost
|
||||||
openstack baremetal node list
|
baremetal node list
|
||||||
|
|
||||||
In noauth mode, a cloud called ``bifrost-inspector`` is also included that
|
In noauth mode, a cloud called ``bifrost-inspector`` is also included that
|
||||||
allows access to the Ironic Inspector API. For example::
|
allows access to the Ironic Inspector API. For example::
|
||||||
|
|
||||||
export OS_CLOUD=bifrost-inspector
|
export OS_CLOUD=bifrost-inspector
|
||||||
openstack baremetal introspection list
|
baremetal introspection list
|
||||||
|
|
||||||
Environment variables
|
Environment variables
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Previous versions of Bifrost recommended to use the ``ironic`` CLI rather
|
|
||||||
than the ``openstack`` CLI. Doing this requires setting the
|
|
||||||
``OS_AUTH_TOKEN`` environment variable, however this causes Ansible
|
|
||||||
``enroll-dynamic.yaml`` and ``deploy-dynamic.yaml`` playbooks to fail, so
|
|
||||||
``OS_AUTH_TOKEN`` should be unset before running either of these.
|
|
||||||
|
|
||||||
The following two environment variables can be set:
|
The following two environment variables can be set:
|
||||||
|
|
||||||
- ``OS_AUTH_TYPE`` - set to ``none`` to bypass authentication.
|
- ``OS_AUTH_TYPE`` - set to ``none`` to bypass authentication.
|
||||||
@ -46,7 +38,7 @@ to connect to a local Ironic installation operating in noauth mode. For
|
|||||||
example::
|
example::
|
||||||
|
|
||||||
. env-vars
|
. env-vars
|
||||||
openstack baremetal node list
|
baremetal node list
|
||||||
|
|
||||||
This should display a table of nodes, or nothing if there are no nodes
|
This should display a table of nodes, or nothing if there are no nodes
|
||||||
registered in Ironic.
|
registered in Ironic.
|
||||||
|
@ -36,11 +36,6 @@
|
|||||||
- name: "Ensure /opt/stack is present"
|
- name: "Ensure /opt/stack is present"
|
||||||
file: name=/opt/stack state=directory owner=root group=root
|
file: name=/opt/stack state=directory owner=root group=root
|
||||||
|
|
||||||
- name: "OpenStack Client - Install"
|
|
||||||
include: pip_install.yml
|
|
||||||
package=python-openstackclient
|
|
||||||
when: skip_install is not defined
|
|
||||||
|
|
||||||
- name: "proliantutils - Install from pip"
|
- name: "proliantutils - Install from pip"
|
||||||
include: pip_install.yml
|
include: pip_install.yml
|
||||||
package=proliantutils
|
package=proliantutils
|
||||||
|
@ -3,6 +3,7 @@ clouds:
|
|||||||
{% if (enable_keystone | default(false) | bool) %}
|
{% if (enable_keystone | default(false) | bool) %}
|
||||||
{% for cloud in clouds | default({}) | dictsort %}
|
{% for cloud in clouds | default({}) | dictsort %}
|
||||||
{{ cloud.0 }}:
|
{{ cloud.0 }}:
|
||||||
|
auth_type: "password"
|
||||||
region_name: {{ cloud.1.config_region_name }}
|
region_name: {{ cloud.1.config_region_name }}
|
||||||
auth:
|
auth:
|
||||||
username: {{ cloud.1.config_username }}
|
username: {{ cloud.1.config_username }}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
---
|
---
|
||||||
- name: Check node hardware inspection data
|
- name: Check node hardware inspection data
|
||||||
command: "openstack baremetal introspection data save {{ uuid }}"
|
command: "baremetal introspection data save {{ uuid }}"
|
||||||
register: inspection_data
|
register: inspection_data
|
||||||
environment:
|
environment:
|
||||||
OS_CLOUD: "{% if enable_keystone | default(false) | bool %}bifrost{% else %}bifrost-inspector{% endif %}"
|
OS_CLOUD: "{% if enable_keystone | default(false) | bool %}bifrost{% else %}bifrost-inspector{% endif %}"
|
||||||
|
@ -108,12 +108,12 @@
|
|||||||
connection: local
|
connection: local
|
||||||
tasks:
|
tasks:
|
||||||
- name: "List bare metal nodes using openstack client"
|
- name: "List bare metal nodes using openstack client"
|
||||||
command: openstack baremetal node list
|
command: baremetal --debug node list
|
||||||
environment:
|
environment:
|
||||||
OS_CLOUD: bifrost
|
OS_CLOUD: bifrost
|
||||||
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
||||||
- name: "List introspection rules using openstack client"
|
- name: "List introspection rules using openstack client"
|
||||||
command: openstack baremetal introspection rule list
|
command: baremetal --debug introspection rule list
|
||||||
environment:
|
environment:
|
||||||
OS_CLOUD: "{% if enable_keystone | default(false) | bool == true %}bifrost{% else %}bifrost-inspector{% endif %}"
|
OS_CLOUD: "{% if enable_keystone | default(false) | bool == true %}bifrost{% else %}bifrost-inspector{% endif %}"
|
||||||
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
PATH: /usr/local/bin:{{ ansible_env.PATH }}
|
||||||
|
15
releasenotes/notes/no-osc-b39d14591103b2c3.yaml
Normal file
15
releasenotes/notes/no-osc-b39d14591103b2c3.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
OpenStackClient is no longer installed when keystone is not enabled. Use
|
||||||
|
the ironic native ``baremetal`` command instead. For example, instead of
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
openstack baremetal node list
|
||||||
|
|
||||||
|
use just
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
baremetal node list
|
@ -77,8 +77,8 @@ cp -aL /httpboot/pxelinux.cfg/ ${LOG_LOCATION}/pxe/
|
|||||||
|
|
||||||
# Copy baremetal information
|
# Copy baremetal information
|
||||||
source $HOME/openrc bifrost
|
source $HOME/openrc bifrost
|
||||||
for vm in $(openstack baremetal node list -c Name -f value); do
|
for vm in $(baremetal node list -c Name -f value); do
|
||||||
openstack baremetal node show $vm >> ${LOG_LOCATION}/baremetal.txt
|
baremetal node show $vm >> ${LOG_LOCATION}/baremetal.txt
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -d "/var/log/ironic" ]; then
|
if [ -d "/var/log/ironic" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user