
This adds a new Noble nodepool launcher node, nl06, to replace nl02. When this change lands I will put nl02 in the emergency file and manually shutdown services on it. This should allow nl06 to come up with its config and take over management of openmetal provider resources. While we are at it we update the system-config-run-nodepool testing to deploy a noble nl05. That doesn't exactly match this change but nl05 will replace nl01 soon enough. We just need to update CI to ensure that we can deploy a nodepool launcher on Noble before we actually attempt to do so in production. Depends-On: https://review.opendev.org/c/opendev/zone-opendev.org/+/945364 Depends-On: https://review.opendev.org/c/openstack/project-config/+/945359 Change-Id: I18db9f57bd41ed2a57c545f02ac0113bb8b4d9de
60 lines
1.9 KiB
Python
60 lines
1.9 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 = ['nl05.opendev.org', 'nb05.opendev.org']
|
|
|
|
|
|
def test_clouds_yaml(host):
|
|
cfg_file = '/etc/openstack/clouds.yaml'
|
|
clouds_yaml = host.file(cfg_file)
|
|
assert clouds_yaml.exists
|
|
|
|
assert b'password' in clouds_yaml.content
|
|
|
|
def test_kube_config(host):
|
|
if not host.backend.get_hostname().startswith('nl'):
|
|
pytest.skip()
|
|
kubeconfig = host.file('/home/nodepool/.kube/config')
|
|
assert kubeconfig.exists
|
|
|
|
assert b'nodepool_k8s_key' in kubeconfig.content
|
|
|
|
def test_launcher_container_running(host):
|
|
if host.backend.get_hostname() != 'nl05.opendev.org':
|
|
pytest.skip()
|
|
|
|
cmd = host.run("docker ps -a --format '{{ .Names }}'")
|
|
assert 'nodepool-docker-nodepool-launcher-1' in cmd.stdout
|
|
|
|
def test_builder_container_running(host):
|
|
if host.backend.get_hostname() != 'nb05.opendev.org':
|
|
pytest.skip()
|
|
|
|
cmd = host.run("docker ps -a --format '{{ .Names }}'")
|
|
assert 'nodepool-builder-compose-nodepool-builder-1' in cmd.stdout
|
|
|
|
def test_builder_webserver_running(host):
|
|
if host.backend.get_hostname() != 'nb05.opendev.org':
|
|
pytest.skip()
|
|
|
|
apache = host.service('apache2')
|
|
assert apache.is_running
|
|
|
|
cmd = host.run('curl --insecure '
|
|
'--resolve nb05.opendev.org:443:127.0.0.1 '
|
|
'https://nb05.opendev.org/')
|
|
assert 'Index of /' in cmd.stdout
|