
We rolled out review-dev with podman and it worked fine for us. It worked less fine for nodepool-builder, although we still might be able to solve it. Maybe right now isn't the time to do this switch. Gitea, gitea-lb and zuul-registry all use docker instead of podman. The only thing running with podman right now is review-dev. We can do a manual cleanup of podman there before runnign this to keep things simple: - stop gerrit service - uninstall podman and podman-compose - uninstall podman ppa config - uninstall pip3 Then let ansible install docker and docker compose up. Story: #2007407 Task: #39062 Change-Id: I9bf99b18559d49d11ba99a96f02a4a45a4f65a86
53 lines
1.8 KiB
Python
53 lines
1.8 KiB
Python
# Copyright 2018 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.
|
|
|
|
import pytest
|
|
|
|
testinfra_hosts = ['nl01.openstack.org', 'nb01.openstack.org',
|
|
'nb01-test.opendev.org']
|
|
|
|
|
|
def test_clouds_yaml(host):
|
|
clouds_yaml = host.file('/home/nodepool/.config/openstack/clouds.yaml')
|
|
assert clouds_yaml.exists
|
|
|
|
assert b'password' in clouds_yaml.content
|
|
|
|
def test_kube_config(host):
|
|
if not host.backend.get_hostname().endswith('openstack.org'):
|
|
pytest.skip()
|
|
kubeconfig = host.file('/home/nodepool/.kube/config')
|
|
assert kubeconfig.exists
|
|
|
|
assert b'nodepool_k8s_key' in kubeconfig.content
|
|
|
|
def test_builder_container_running(host):
|
|
if host.backend.get_hostname() != 'nb01-test.opendev.org':
|
|
pytest.skip()
|
|
|
|
cmd = host.run("docker ps -a --format '{{ .Names }}'")
|
|
assert 'nodepoolbuildercompose_nodepool-builder_1' in cmd.stdout
|
|
|
|
def test_builder_webserver_running(host):
|
|
if host.backend.get_hostname() != 'nb01-test.opendev.org':
|
|
pytest.skip()
|
|
|
|
apache = host.service('apache2')
|
|
assert apache.is_running
|
|
|
|
cmd = host.run('curl --insecure '
|
|
'--resolve nb01-test.opendev.org:443:127.0.0.1 '
|
|
'https://nb01-test.opendev.org/')
|
|
assert 'Index of /' in cmd.stdout
|