kubernetes / cloud-provider-openstack

Apache License 2.0
619 stars 610 forks source link

[CI] can't specify enabled services for local.conf #1650

Closed gman0 closed 3 years ago

gman0 commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

/kind feature

What happened:

install-devstack role doesn't allow for specifying which services should be enabled in local.conf configuration file. I'm working on a PR to add this, similar to what we had in our previous OpenLab Zuul CI jobs.

What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

lingxiankong commented 3 years ago

Hi @gman0, I was using an external link (https://gist.github.com/lingxiankong/a109303f48e9a74fc8a7c01de4156d71/raw) as the local.conf for devstack in CI, if that's the only change should be made for manila job, we could add a role variable using the url as the default value but specifying a different one in manila job.

gman0 commented 3 years ago

@lingxiankong could something like this work? https://github.com/kubernetes/cloud-provider-openstack/compare/master...gman0:ci-devstack-local-conf-template?expand=1

This is what it generates for OCCM:

[[local|localrc]]
RECLONE=False
HOST_IP=192.168.122.169
DEST=/opt/stack
DATA_DIR=${DEST}/data
USE_PYTHON3=True
LOGFILE=$DEST/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=False
LOGDAYS=1
SERVICE_TIMEOUT=300

DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password

TARGET_BRANCH=stable/wallaby

ENABLED_SERVICES=rabbit,mysql,key,nova,glance,cinder,neutron,octavia,barbican

# Nova
enable_service n-api
enable_service n-cpu
enable_service n-cond
enable_service n-sch
enable_service n-api-meta

enable_service placement-api
enable_service placement-client

# Glance
enable_service g-api
enable_service g-reg

[[post-config|$GLANCE_API_CONF]]
[glance_store]
default_store = file

# Cinder
enable_service cinder
enable_service c-api
enable_service c-vol
enable_service c-sch

# Neutron
enable_plugin neutron https://opendev.org/openstack/neutron.git stable/wallaby
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
IP_VERSION=4
IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/26
FIXED_RANGE=10.1.0.0/26
NETWORK_GATEWAY=10.1.0.1
FLOATING_RANGE=172.24.5.0/24
PUBLIC_NETWORK_GATEWAY=172.24.5.1
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=vxlan
Q_DVR_MODE=legacy
Q_AGENT=openvswitch
Q_ML2_PLUGIN_MECHANISM_DRIVERS=openvswitch

[[post-config|$NEUTRON_CONF]]
[DEFAULT]
global_physnet_mtu = 1430

# Octavia
enable_plugin octavia https://opendev.org/openstack/octavia.git stable/wallaby
enable_service octavia
enable_service o-cw
enable_service o-hm
enable_service o-hk
enable_service o-api

LIBS_FROM_GIT+=,python-octaviaclient

OCTAVIA_MGMT_SUBNET=10.51.0.0/16
OCTAVIA_MGMT_SUBNET_START=10.51.0.2
OCTAVIA_MGMT_SUBNET_END=10.51.0.254

[[post-config|$OCTAVIA_CONF]]
[api_settings]
allow_tls_terminated_listeners = True
[controller_worker]
loadbalancer_topology = SINGLE
amp_active_retries = 60
amp_active_wait_sec = 10
[haproxy_amphora]
rest_request_conn_timeout = 300
rest_request_read_timeout = 600
[health_manager]
health_check_interval = 30

# Barbican
enable_service barbican-vault

LIBS_FROM_GIT+=,python-barbicanclient
gman0 commented 3 years ago

This is based on the config you've provided, btw.

lingxiankong commented 3 years ago

That looks good, the only thing missing is as follows (I'm not sure if that's necessary, but may be safer if we could include):

enable_plugin barbican https://opendev.org/openstack/barbican.git {{ branch }}
gman0 commented 3 years ago

@lingxiankong Ok, I'll open a PR.