Merge "bridge: switch OSC from container to local install"

This commit is contained in:
Zuul 2022-11-29 19:41:27 +00:00 committed by Gerrit Code Review
commit c661bb4e78
6 changed files with 16 additions and 31 deletions

View File

@ -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

View File

@ -1 +0,0 @@
An ansible role to install openstackclient container and helper script

View File

@ -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 $@

View File

@ -1,8 +0,0 @@
- name: Add helper script
become: yes
copy:
dest: /usr/local/bin/openstack
group: root
mode: 0755
owner: root
src: openstack

View File

@ -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:

View File

@ -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