Fix gate for Focal issues
This fixes libffi bindep installation on Ubuntu Focal The Python 3.6 tox tests are switched back to bionic, as Focal nodes don't have Python 3.6. Additionally, we squashed the following change into this to unblock the gate: Remove nodepool-functional-openstack This test installs devstack and then nodepool on a bionic host (in contrast to the -containers variant that builds a container from the Dockerfile and installs/runs that). Firstly, devstack support for Bionic is going away soon so we have to update this. We don't really need to test if we run ontop of a plain Bionic/Focal host. We have tox jobs testing various Python versions for compatability, so running on here isn't providing any extra coverage. DIB can't build many things on plain Bionic/Focal due to updates or incompatabilities in "alien" versions of RPM, Zypper, debootstrap, etc. The container incorporates fixes as required and is where anyone is going to put attention if there are build issues; hence we're not testing anything useful for image building paths. Finally we also have nodepool-zuul-functional, which brings up Zuul and nodepool on a plain Bionic host anyway. Per the prior reasons, that covers basically the same thing this is providing anyway. openstacksdk is using this on older branches, but is switched to using the container job in the dependent changes. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788414 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788416 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788418 Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/788420 Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/788404 (was : Change-Id: I87318e9101b982f3cafcf82439fdcb68767b602b) Change-Id: Ifc74e6958f64be70386cdb3e05768d94db75c3bbchanges/04/790004/3
parent
11029a788a
commit
26bad7f853
@ -1,31 +0,0 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Copy logs
|
||||
ignore_errors: yes
|
||||
block:
|
||||
- name: Copy nodepool log files
|
||||
synchronize:
|
||||
src: /var/log/nodepool
|
||||
dest: '{{ zuul.executor.log_root }}'
|
||||
mode: pull
|
||||
- name: Copy nodepool config files
|
||||
synchronize:
|
||||
src: /etc/nodepool
|
||||
dest: '{{ zuul.executor.log_root }}'
|
||||
mode: pull
|
||||
- name: Copy instance console logs
|
||||
become: true
|
||||
synchronize:
|
||||
src: /opt/stack/data/nova/instances
|
||||
dest: '{{ zuul.executor.log_root }}'
|
||||
mode: pull
|
||||
rsync_opts:
|
||||
- "--include=*/"
|
||||
- "--include=console.log"
|
||||
- "--exclude=*"
|
||||
- name: Copy syslog
|
||||
become: True
|
||||
synchronize:
|
||||
src: "/var/log/syslog"
|
||||
dest: '{{ zuul.executor.log_root }}'
|
||||
mode: pull
|
@ -1,24 +0,0 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- role: bindep
|
||||
bindep_dir: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}"
|
||||
- role: test-setup
|
||||
zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}"
|
||||
- role: ensure-zookeeper
|
||||
zookeeper_use_tls: true
|
||||
- ensure-devstack
|
||||
- ensure-virtualenv
|
||||
tasks:
|
||||
# Create the virtualenv so we can control the python version
|
||||
- name: Create virtualenv
|
||||
pip:
|
||||
name: extras
|
||||
virtualenv: "{{ ansible_user_dir }}/.venv"
|
||||
virtualenv_python: python3
|
||||
- name: Install python project from source
|
||||
include_role:
|
||||
name: ensure-if-python
|
||||
vars:
|
||||
zuul_work_dir: "{{ item.src_dir }}"
|
||||
error_on_failure: true
|
||||
loop: "{{ zuul.projects.values() | selectattr('required') | list }}"
|
@ -1,145 +0,0 @@
|
||||
- hosts: all
|
||||
vars:
|
||||
nodepool_config_dir: "/etc/nodepool"
|
||||
nodepool_log_dir: "/var/log/nodepool"
|
||||
NODEPOOL_KEY: "$HOME/.ssh/id_nodepool"
|
||||
NODEPOOL_KEY_NAME: "root"
|
||||
NODEPOOL_PUBKEY: "$HOME/.ssh/id_nodepool.pub"
|
||||
NODEPOOL_INSTALL: "$HOME/nodepool-venv"
|
||||
NODEPOOL_CACHE_GET_PIP: "/opt/stack/cache/files/get-pip.py"
|
||||
NODEPOOL_CONFIG: "{{ nodepool_config_dir }}/nodepool.yaml"
|
||||
NODEPOOL_DIB_BASE_PATH: "/opt/dib"
|
||||
launcher_logging_config: "{{ nodepool_config_dir }}/launcher-logging.conf"
|
||||
launcher_logging_arg: "{{ '-l '+ launcher_logging_config if nodepool_debug is defined and nodepool_debug else '' }}"
|
||||
builder_logging_config: "{{ nodepool_config_dir }}/builder-logging.conf"
|
||||
builder_logging_arg: "{{ '-l '+ builder_logging_config if nodepool_debug is defined and nodepool_debug else '' }}"
|
||||
tasks:
|
||||
- name: Write clouds.yaml
|
||||
include_tasks: write_clouds_yaml.yaml
|
||||
- name: Install software for DIB
|
||||
become: true
|
||||
package:
|
||||
name:
|
||||
- qemu-utils
|
||||
- kpartx
|
||||
- name: Install extra software for DIB
|
||||
when: nodepool_extra_packages is defined
|
||||
become: true
|
||||
package:
|
||||
name: "{{ nodepool_extra_packages }}"
|
||||
- name: Create cache directory
|
||||
file:
|
||||
path: .cache/openstack
|
||||
state: directory
|
||||
- name: Create nodepool flavors
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
source /opt/devstack/openrc admin admin
|
||||
nova flavor-create nodepool-512 64 512 5 1
|
||||
nova flavor-create nodepool-1024 128 1024 5 1
|
||||
- name: Create security groups
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
source /opt/devstack/openrc admin admin
|
||||
openstack --os-project-name demo --os-username demo security group rule create --ingress --protocol tcp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
|
||||
openstack --os-project-name demo --os-username demo security group rule create --ingress --protocol udp --dst-port 1:65535 --remote-ip 0.0.0.0/0 default
|
||||
- name: Create unmanaged VM
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
source /opt/devstack/openrc admin admin
|
||||
openstack network list
|
||||
cirros_image=$(openstack --os-project-name demo --os-username demo image list | grep cirros | awk '{print $4}' | head -n1)
|
||||
openstack --os-project-name demo --os-username demo server create --flavor cirros256 --image $cirros_image unmanaged-vm --network public
|
||||
|
||||
- name: Create nodepool SSH keypair
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell: |
|
||||
source /opt/devstack/openrc admin admin
|
||||
ssh-keygen -f {{ NODEPOOL_KEY }} -P ""
|
||||
nova --os-project-name demo --os-username demo keypair-add --pub-key {{ NODEPOOL_PUBKEY }} {{ NODEPOOL_KEY_NAME }}
|
||||
|
||||
- name: Write nodepool elements
|
||||
args:
|
||||
executable: /bin/bash
|
||||
shell:
|
||||
cmd: |
|
||||
sudo mkdir -p $(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/install.d
|
||||
sudo mkdir -p $(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/root.d
|
||||
cat > /tmp/40-nodepool-setup <<EOF
|
||||
sudo mkdir -p /etc/nodepool
|
||||
# Make it world writeable so nodepool can write here later.
|
||||
sudo chmod 777 /etc/nodepool
|
||||
EOF
|
||||
cat > /tmp/50-apt-allow-unauthenticated <<EOF
|
||||
if [ -d "\$TARGET_ROOT/etc/apt/apt.conf.d" ]; then
|
||||
echo "APT::Get::AllowUnauthenticated \"true\";" | sudo tee \$TARGET_ROOT/etc/apt/apt.conf.d/95allow-unauthenticated
|
||||
echo "Acquire::AllowInsecureRepositories \"true\";" | sudo tee -a \$TARGET_ROOT/etc/apt/apt.conf.d/95allow-unauthenticated
|
||||
fi
|
||||
EOF
|
||||
sudo mv /tmp/40-nodepool-setup \
|
||||
$(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/install.d/40-nodepool-setup
|
||||
sudo chmod a+x \
|
||||
$(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/install.d/40-nodepool-setup
|
||||
sudo mv /tmp/50-apt-allow-unauthenticated \
|
||||
$(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/root.d/50-apt-allow-unauthenticated
|
||||
sudo chmod a+x \
|
||||
$(dirname {{ NODEPOOL_CONFIG }})/elements/nodepool-setup/root.d/50-apt-allow-unauthenticated
|
||||
sudo mkdir -p {{ NODEPOOL_DIB_BASE_PATH }}/images
|
||||
sudo mkdir -p {{ NODEPOOL_DIB_BASE_PATH }}/tmp
|
||||
sudo mkdir -p {{ NODEPOOL_DIB_BASE_PATH }}/cache
|
||||
sudo chown -R {{ ansible_user }}:{{ ansible_user }} {{ NODEPOOL_DIB_BASE_PATH }}
|
||||
|
||||
- name: Write nodepool config
|
||||
become: true
|
||||
template:
|
||||
src: nodepool.yaml.j2
|
||||
dest: "{{ NODEPOOL_CONFIG }}"
|
||||
|
||||
- name: Validate nodepool config
|
||||
command: "./.venv/bin/nodepool -c {{ NODEPOOL_CONFIG }} config-validate"
|
||||
|
||||
- name: Create nodepool runtime dirs
|
||||
become: true
|
||||
file:
|
||||
path: '{{ item }}'
|
||||
state: directory
|
||||
owner: '{{ ansible_user }}'
|
||||
group: '{{ ansible_user }}'
|
||||
loop:
|
||||
- /var/run/nodepool
|
||||
- '{{ nodepool_log_dir }}'
|
||||
|
||||
- name: Write builder logging config
|
||||
become: true
|
||||
template:
|
||||
src: logging.conf.j2
|
||||
dest: "{{ builder_logging_config }}"
|
||||
vars:
|
||||
log_file: "{{ nodepool_log_dir }}/nodepool-builder.log"
|
||||
|
||||
- name: Write launcher logging config
|
||||
become: true
|
||||
template:
|
||||
src: logging.conf.j2
|
||||
dest: "{{ launcher_logging_config }}"
|
||||
vars:
|
||||
log_file: "{{ nodepool_log_dir }}/nodepool-launcher.log"
|
||||
|
||||
# FIXME: don't use activate once this merges:
|
||||
# https://review.opendev.org/666177 Use the DIB installed in the virtualenv if running there
|
||||
- name: Start nodepool builder
|
||||
shell: |
|
||||
. ./.venv/bin/activate
|
||||
nodepool-builder {{ builder_logging_arg}} -c {{ NODEPOOL_CONFIG }}
|
||||
|
||||
- name: Start nodepool launcher
|
||||
command: "./.venv/bin/nodepool-launcher {{ launcher_logging_arg }} -c {{ NODEPOOL_CONFIG }}"
|
||||
|
||||
- name: Check nodepool functionality
|
||||
command: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}/tools/functional-test-check.sh"
|
||||
environment:
|
||||
NODEPOOL_FUNCTIONAL_CHECK: 'installed'
|
@ -1,52 +0,0 @@
|
||||
[formatters]
|
||||
keys=simple
|
||||
|
||||
[loggers]
|
||||
keys=root,nodepool,openstack,kazoo,keystoneauth,novaclient
|
||||
|
||||
[handlers]
|
||||
keys=file
|
||||
|
||||
[logger_root]
|
||||
level=WARNING
|
||||
handlers=file
|
||||
|
||||
[logger_nodepool]
|
||||
level=DEBUG
|
||||
handlers=file
|
||||
qualname=nodepool
|
||||
propagate=0
|
||||
|
||||
[logger_openstack]
|
||||
level=DEBUG
|
||||
handlers=file
|
||||
qualname=openstack
|
||||
propagate=0
|
||||
|
||||
[logger_keystoneauth]
|
||||
level=DEBUG
|
||||
handlers=file
|
||||
qualname=keystoneauth
|
||||
propagate=0
|
||||
|
||||
[logger_novaclient]
|
||||
level=DEBUG
|
||||
handlers=file
|
||||
qualname=novaclient
|
||||
propagate=0
|
||||
|
||||
[logger_kazoo]
|
||||
level=INFO
|
||||
handlers=file
|
||||
qualname=kazoo
|
||||
propagate=0
|
||||
|
||||
[handler_file]
|
||||
level=DEBUG
|
||||
class=FileHandler
|
||||
formatter=simple
|
||||
args=('{{ log_file }}', 'w')
|
||||
|
||||
[formatter_simple]
|
||||
format=%(asctime)s %(levelname)s %(name)s: %(message)s
|
||||
datefmt=
|
@ -1,83 +0,0 @@
|
||||
elements-dir: {{ NODEPOOL_CONFIG | dirname }}/elements
|
||||
images-dir: {{ NODEPOOL_DIB_BASE_PATH }}/images
|
||||
|
||||
zookeeper-servers:
|
||||
- host: localhost
|
||||
port: 2281
|
||||
|
||||
zookeeper-tls:
|
||||
ca: /opt/zookeeper/ca/certs/cacert.pem
|
||||
cert: /opt/zookeeper/ca/certs/client.pem
|
||||
key: /opt/zookeeper/ca/keys/clientkey.pem
|
||||
|
||||
labels:
|
||||
- name: test-image
|
||||
min-ready: 1
|
||||
|
||||
providers:
|
||||
- name: devstack
|
||||
region-name: RegionOne
|
||||
cloud: devstack
|
||||
# Long boot timeout to deal with potentially nested virt.
|
||||
boot-timeout: 600
|
||||
launch-timeout: 900
|
||||
rate: 0.25
|
||||
diskimages:
|
||||
- name: test-image
|
||||
config-drive: true
|
||||
pools:
|
||||
- name: main
|
||||
max-servers: 5
|
||||
networks:
|
||||
- private
|
||||
labels:
|
||||
- name: test-image
|
||||
diskimage: test-image
|
||||
min-ram: 512
|
||||
flavor-name: 'nodepool'
|
||||
console-log: True
|
||||
key-name: {{ NODEPOOL_KEY_NAME }}
|
||||
instance-properties:
|
||||
nodepool_devstack: testing
|
||||
userdata: |
|
||||
#cloud-config
|
||||
write_files:
|
||||
- content: |
|
||||
testpassed
|
||||
path: /etc/testfile_nodepool_userdata
|
||||
|
||||
diskimages:
|
||||
- name: test-image
|
||||
rebuild-age: 86400
|
||||
elements:
|
||||
- {{ nodepool_diskimage.base_element }}
|
||||
{% if 'extra_elements' in nodepool_diskimage %}
|
||||
{% for item in nodepool_diskimage.extra_elements %}
|
||||
- {{ item }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
- vm
|
||||
- simple-init
|
||||
- growroot
|
||||
- devuser
|
||||
- openssh-server
|
||||
- nodepool-setup
|
||||
- journal-to-console
|
||||
release: '{{ nodepool_diskimage.release }}'
|
||||
env-vars:
|
||||
TMPDIR: '{{ NODEPOOL_DIB_BASE_PATH }}/tmp'
|
||||
DIB_CHECKSUM: '1'
|
||||
DIB_SHOW_IMAGE_USAGE: '1'
|
||||
DIB_IMAGE_CACHE: '{{ NODEPOOL_DIB_BASE_PATH }}/cache'
|
||||
DIB_DEV_USER_AUTHORIZED_KEYS: '{{ NODEPOOL_PUBKEY }}'
|
||||
{% if 'mirror' in nodepool_diskimage %}
|
||||
DIB_DISTRIBUTION_MIRROR: '{{ nodepool_diskimage.mirror }}'
|
||||
{% endif %}
|
||||
{% if zuul.projects.get('opendev.org/opendev/glean', {}).get('required', False) %}
|
||||
DIB_INSTALLTYPE_simple_init: 'repo'
|
||||
DIB_REPOLOCATION_glean: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/opendev/glean'].src_dir }}"
|
||||
DIB_REPOREF_glean: "{{ zuul.projects['opendev.org/opendev/glean'].checkout }}"
|
||||
{% endif %}
|
||||
{% for k, v in nodepool_diskimage.get('env-vars', {}).items() %}
|
||||
{{ k }}: "{{ v }}"
|
||||
{% endfor %}
|
@ -1,30 +0,0 @@
|
||||
- name: Load clouds.yaml
|
||||
become: true
|
||||
slurp:
|
||||
path: /etc/openstack/clouds.yaml
|
||||
register: clouds_yaml
|
||||
- name: Parse clouds.yaml
|
||||
set_fact:
|
||||
clouds_yaml: "{{ clouds_yaml.content | b64decode | from_yaml }}"
|
||||
- name: Update clouds.yaml
|
||||
vars:
|
||||
new_config:
|
||||
# cache:
|
||||
# max_age: 3600
|
||||
# class: dogpile.cache.dbm
|
||||
# arguments:
|
||||
# filename: .cache/openstack/shade.dbm
|
||||
# expiration:
|
||||
# floating-ip: 5
|
||||
# server: 5
|
||||
# port: 5
|
||||
# TODO(pabelanger): Remove once glean fully supports IPv6.
|
||||
client:
|
||||
force_ipv4: True
|
||||
set_fact:
|
||||
clouds_yaml: "{{ clouds_yaml | combine(new_config) }}"
|
||||
- name: Save clouds.yaml
|
||||
become: true
|
||||
copy:
|
||||
content: "{{ clouds_yaml | to_nice_yaml }}"
|
||||
dest: /etc/openstack/clouds.yaml
|
Loading…
Reference in New Issue