diff --git a/playbooks/roles/install-launch-node/tasks/main.yaml b/playbooks/roles/install-launch-node/tasks/main.yaml index 9927006f66..8a2c8dba9b 100644 --- a/playbooks/roles/install-launch-node/tasks/main.yaml +++ b/playbooks/roles/install-launch-node/tasks/main.yaml @@ -9,3 +9,14 @@ name: 'file:///home/zuul/src/opendev.org/opendev/system-config/launch' virtualenv: '/usr/launcher-venv' +# Admins use openstackclient on the bastion host to deal with cloud +# issues. The best version to use is the one from launch node, as +# whatever workarounds we need to talk to all clouds should be in that +# environment. For convenience link this version globally +- name: Link openstack client globally + file: + src: /usr/launcher-venv/bin/openstack + dest: /usr/local/bin/openstack + owner: root + group: root + state: link diff --git a/playbooks/roles/install-osc-container/README.rst b/playbooks/roles/install-osc-container/README.rst deleted file mode 100644 index 5d2e77e6e9..0000000000 --- a/playbooks/roles/install-osc-container/README.rst +++ /dev/null @@ -1 +0,0 @@ -An ansible role to install openstackclient container and helper script diff --git a/playbooks/roles/install-osc-container/files/openstack b/playbooks/roles/install-osc-container/files/openstack deleted file mode 100644 index 7ff8057739..0000000000 --- a/playbooks/roles/install-osc-container/files/openstack +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Copyright (c) 2020 Red Hat, Inc. -# -# 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. - -exec docker run -it --rm \ - -v/etc/openstack:/etc/openstack \ - docker.io/osclient/python-openstackclient \ - openstack $@ diff --git a/playbooks/roles/install-osc-container/tasks/main.yaml b/playbooks/roles/install-osc-container/tasks/main.yaml deleted file mode 100644 index f821e8cbd9..0000000000 --- a/playbooks/roles/install-osc-container/tasks/main.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- name: Add helper script - become: yes - copy: - dest: /usr/local/bin/openstack - group: root - mode: 0755 - owner: root - src: openstack diff --git a/playbooks/service-bridge.yaml b/playbooks/service-bridge.yaml index 27354700e5..d548db2ea0 100644 --- a/playbooks/service-bridge.yaml +++ b/playbooks/service-bridge.yaml @@ -12,8 +12,6 @@ - name: Install openshift/kubectl when: ansible_architecture != 'aarch64' block: - - include_role: - name: install-osc-container - include_role: name: install-kubectl - include_role: diff --git a/testinfra/test_bridge.py b/testinfra/test_bridge.py index 6685953396..3b0d548bb8 100644 --- a/testinfra/test_bridge.py +++ b/testinfra/test_bridge.py @@ -112,3 +112,8 @@ def test_launch_node_venv(host): launch = host.run('/usr/launcher-venv/bin/launch-node --help') assert 'usage: launch-node' in launch.stdout assert launch.rc == 0 + +def test_osc_binary(host): + osc = host.run('/usr/launcher-venv/bin/openstack --version') + assert 'openstack' in osc.stdout + assert osc.rc == 0