diff --git a/doc/source/user/howto.rst b/doc/source/user/howto.rst index eb7999d92..690b6a1f9 100644 --- a/doc/source/user/howto.rst +++ b/doc/source/user/howto.rst @@ -16,25 +16,17 @@ necessary to access Ironic. A cloud called ``bifrost`` is always available. For example:: export OS_CLOUD=bifrost - openstack baremetal node list + baremetal node list In noauth mode, a cloud called ``bifrost-inspector`` is also included that allows access to the Ironic Inspector API. For example:: export OS_CLOUD=bifrost-inspector - openstack baremetal introspection list + baremetal introspection list 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: - ``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:: . env-vars - openstack baremetal node list + baremetal node list This should display a table of nodes, or nothing if there are no nodes registered in Ironic. diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index fa51d1196..77d94e61a 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -36,11 +36,6 @@ - name: "Ensure /opt/stack is present" 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" include: pip_install.yml package=proliantutils diff --git a/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 b/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 index 7887b5842..e19fe5952 100644 --- a/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 +++ b/playbooks/roles/bifrost-keystone-client-config/templates/clouds.yaml.j2 @@ -3,6 +3,7 @@ clouds: {% if (enable_keystone | default(false) | bool) %} {% for cloud in clouds | default({}) | dictsort %} {{ cloud.0 }}: + auth_type: "password" region_name: {{ cloud.1.config_region_name }} auth: username: {{ cloud.1.config_username }} diff --git a/playbooks/roles/bifrost-test-inspection/tasks/main.yml b/playbooks/roles/bifrost-test-inspection/tasks/main.yml index c58f38641..dab199e6e 100644 --- a/playbooks/roles/bifrost-test-inspection/tasks/main.yml +++ b/playbooks/roles/bifrost-test-inspection/tasks/main.yml @@ -13,7 +13,7 @@ # limitations under the License. --- - name: Check node hardware inspection data - command: "openstack baremetal introspection data save {{ uuid }}" + command: "baremetal introspection data save {{ uuid }}" register: inspection_data environment: OS_CLOUD: "{% if enable_keystone | default(false) | bool %}bifrost{% else %}bifrost-inspector{% endif %}" diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index bf7baee98..090569dfd 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -108,12 +108,12 @@ connection: local tasks: - name: "List bare metal nodes using openstack client" - command: openstack baremetal node list + command: baremetal --debug node list environment: OS_CLOUD: bifrost PATH: /usr/local/bin:{{ ansible_env.PATH }} - name: "List introspection rules using openstack client" - command: openstack baremetal introspection rule list + command: baremetal --debug introspection rule list environment: OS_CLOUD: "{% if enable_keystone | default(false) | bool == true %}bifrost{% else %}bifrost-inspector{% endif %}" PATH: /usr/local/bin:{{ ansible_env.PATH }} diff --git a/releasenotes/notes/no-osc-b39d14591103b2c3.yaml b/releasenotes/notes/no-osc-b39d14591103b2c3.yaml new file mode 100644 index 000000000..8c0128058 --- /dev/null +++ b/releasenotes/notes/no-osc-b39d14591103b2c3.yaml @@ -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 diff --git a/scripts/collect-test-info.sh b/scripts/collect-test-info.sh index 76e1f1ff5..8a63dbe24 100755 --- a/scripts/collect-test-info.sh +++ b/scripts/collect-test-info.sh @@ -77,8 +77,8 @@ cp -aL /httpboot/pxelinux.cfg/ ${LOG_LOCATION}/pxe/ # Copy baremetal information source $HOME/openrc bifrost -for vm in $(openstack baremetal node list -c Name -f value); do - openstack baremetal node show $vm >> ${LOG_LOCATION}/baremetal.txt +for vm in $(baremetal node list -c Name -f value); do + baremetal node show $vm >> ${LOG_LOCATION}/baremetal.txt done if [ -d "/var/log/ironic" ]; then