Skip to content

Commit 48e0f91

Browse files
committed
Update CI to use OpenStack Bobcat & Ubuntu 22.04
1 parent 4f994cb commit 48e0f91

File tree

10 files changed

+61
-40
lines changed

10 files changed

+61
-40
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ This provider's versions are able to install and manage the following versions o
5858

5959
This provider's versions are able to install Kubernetes to the following versions of OpenStack:
6060

61-
| | Queens | Rocky | Stein | Train | Ussuri | Victoria | Wallaby | Xena | Yoga |
62-
|------------------------------------| ------ | ----- | ----- | ----- | ------ | -------- | ------- | ---- | ---- |
63-
| OpenStack Provider v1alpha5 (v0.6) | + | + | + | + | + |||| |
64-
| OpenStack Provider v1alpha6 (v0.7) | + | + | + | + | + |||| |
65-
| OpenStack Provider v1alpha7 (v0.9) | | + | + | + | + |||| |
66-
| OpenStack Provider v1alpha8 | | + | + | + | + |||| |
61+
| | Queens | Rocky | Stein | Train | Ussuri | Victoria | Wallaby | Xena | Yoga | Bobcat |
62+
|------------------------------------| ------ | ----- | ----- | ----- | ------ | -------- | ------- | ---- | ---- | ------ |
63+
| OpenStack Provider v1alpha5 (v0.6) | + | + | + | + | + |||| | |
64+
| OpenStack Provider v1alpha6 (v0.7) | + | + | + | + | + |||| | |
65+
| OpenStack Provider v1alpha7 (v0.9) | | + | + | + | + |||| | |
66+
| OpenStack Provider v1alpha8 | | + | + | + | + |||| | |
6767

6868
Test status:
6969

docs/book/src/development/ci.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The entry point for the creation of the test DevStack is `hack/ci/create_devstac
2828

2929
### DevStack OS
3030

31-
In GCE, DevStack is installed on a community-maintained Ubuntu 20.04 LTS cloud image. The cloud-init config is also intended to work on CentOS 8, and this is known to work as of 2021-01-12. However, note that this is not regularly tested. See the comment in `hack/ci/gce-project.sh` for how to deploy on CentOS.
31+
In GCE, DevStack is installed on a community-maintained Ubuntu 22.04 LTS cloud image. The cloud-init config is also intended to work on CentOS 8, and this is known to work as of 2021-01-12. However, note that this is not regularly tested. See the comment in `hack/ci/gce-project.sh` for how to deploy on CentOS.
3232

3333
It is convenient to the project to have a viable second OS option as it gives us an option to work around issues which only affect one or the other. This is most likely when enabling new DevStack features, but may also include infrastructure issues. Consequently, when making changes to cloud-init, try not to use features specific to Ubuntu or CentOS. DevStack already supports both operating systems, so we just need to be careful in our peripheral configuration, for example by using cloud-init's `packages` module rather than manually invoking `apt-get` or `yum`. Fortunately package names tend to be consistent across the two distributions.
3434

@@ -40,13 +40,13 @@ We configure a 2 node DevStack. `controller` is running:
4040
* Nova: all services, including compute
4141
* Glance: all services
4242
* Octavia: all services
43-
* Neutron: all services with ML2/OVS, including L3 agent
43+
* Neutron: all services with ML2/OVN
4444
* Cinder: all services, including volume with default LVM/iSCSI backend
4545

4646
`worker` is running:
4747

4848
* Nova: compute only
49-
* Neutron: agent only (not L3 agent)
49+
* Neutron: OVN agents only
5050
* Cinder: volume only with default LVM/iSCSI backend
5151

5252
`controller` is using the `n2-standard-16` machine type with 16 vCPUs and 64 GB RAM. `worker` is using the `n2-standard-8` machine type with 8 vCPUs and 32 GB RAM. Each job has a quota limit of 24 vCPUs.
@@ -66,6 +66,8 @@ In addition, DevStack will create a floating IP network using CIDR defined in `F
6666

6767
The effect of this is that instances created on either `controller` or `worker` can get a floating ip from the `public` network. Traffic using this floating IP will be routed via `controller` and externally via NAT.
6868

69+
We are configuring OVN to provide default DNS servers if a subnet is created without specifying DNS servers. This can be overridden in `OPENSTACK_DNS_NAMESERVERS`.
70+
6971
### Availability zones
7072

7173
We are running `nova compute` and `cinder volume` on each of `controller` and `worker`. Each `nova compute` and `cinder volume` are configured to be in their own availability zone. The names of the availability zones are defined in `OPENSTACK_FAILURE_DOMAIN` and `OPENSTACK_FAILURE_DOMAIN_ALT` in `test/e2e/data/e2e_conf.yaml`, with the services running on `controller` being in `OPENSTACK_FAILURE_DOMAIN` and the services running on `worker` being in `OPENSTACK_FAILURE_DOMAIN_ALT`.

hack/ci/aws-project.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function cloud_init {
2323
AWS_ZONE=${AWS_ZONE:-"eu-central-1a"}
2424
# AMIs:
2525
# * capa-ami-ubuntu-20.04-1.20.4-00-1613898574 id: ami-0120656d38c206057
26-
# * ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20210223 id: ami-0767046d1677be5a0
27-
AWS_AMI=${AWS_AMI:-"ami-0767046d1677be5a0"}
26+
# * ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-20231207 id: ami-05d47d29a4c2d19e1
27+
AWS_AMI=${AWS_AMI:-"ami-05d47d29a4c2d19e1"}
2828
# Choose via: https://eu-central-1.console.aws.amazon.com/ec2/v2/home?region=eu-central-1#InstanceTypes:
2929
AWS_MACHINE_TYPE=${AWS_MACHINE_TYPE:-"c5.metal"}
3030
AWS_NETWORK_NAME=${AWS_NETWORK_NAME:-"${CLUSTER_NAME}-mynetwork"}

hack/ci/cloud-init/controller.yaml.tpl

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
VERBOSE=True
1313
LOG_COLOR=True
1414

15-
# Neutron
16-
enable_plugin neutron https://github.com/openstack/neutron stable/${OPENSTACK_RELEASE}
17-
1815
# Octavia
1916
enable_plugin octavia https://github.com/openstack/octavia stable/${OPENSTACK_RELEASE}
2017
enable_plugin octavia-dashboard https://github.com/openstack/octavia-dashboard stable/${OPENSTACK_RELEASE}
@@ -35,9 +32,17 @@
3532
ENABLED_SERVICES+=,g-api
3633

3734
# Neutron
38-
ENABLED_SERVICES+=,neutron-api,neutron-agent,neutron-dhcp,neutron-l3,neutron-trunk
35+
enable_plugin neutron https://github.com/openstack/neutron stable/${OPENSTACK_RELEASE}
36+
ENABLED_SERVICES+=,q-svc,neutron-trunk,ovn-controller,ovs-vswitchd,ovn-northd,ovsdb-server,q-ovn-metadata-agent
37+
38+
DISABLED_SERVICES=q-agt,q-dhcp,q-l3,q-meta,q-metering
39+
PUBLIC_BRIDGE_MTU=${MTU}
40+
ENABLE_CHASSIS_AS_GW="True"
41+
OVN_DBS_LOG_LEVEL="dbg"
42+
Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn,logger"
43+
OVN_L3_CREATE_PUBLIC_NETWORK="True"
44+
Q_AGENT="ovn"
3945

40-
ENABLED_SERVICES+=,neutron-metadata-agent,neutron-qos
4146
# Octavia
4247
ENABLED_SERVICES+=,octavia,o-api,o-cw,o-hm,o-hk,o-da
4348

@@ -50,6 +55,7 @@
5055

5156
# Additional services
5257
ENABLED_SERVICES+=${OPENSTACK_ADDITIONAL_SERVICES}
58+
DISABLED_SERVICES+=${OPENSTACK_DISABLED_SERVICES}
5359

5460
# Don't download default images, just our test images
5561
DOWNLOAD_DEFAULT_IMAGES=False
@@ -87,13 +93,18 @@
8793
[DEFAULT]
8894
storage_availability_zone = ${PRIMARY_AZ}
8995

90-
[[post-config|/$NEUTRON_CORE_PLUGIN_CONF]]
91-
[ml2]
92-
path_mtu = ${MTU}
93-
9496
[[post-config|$NEUTRON_CONF]]
9597
[DEFAULT]
98+
global_physnet_mtu = ${MTU}
9699
service_plugins = trunk,router
100+
101+
# The following are required for OVN to set default DNS when a subnet is
102+
# created without specifying DNS servers.
103+
# Not specifying these will result in the default DNS servers being set to
104+
# 127.0.0.53 which might be problematic in some environments.
105+
[[post-config|/$Q_PLUGIN_CONF_FILE]]
106+
[ovn]
107+
dns_servers = ${OPENSTACK_DNS_NAMESERVERS}
97108
- path: /tmp/register-worker.sh
98109
permissions: "0755"
99110
content: |

hack/ci/cloud-init/worker.yaml.tpl

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,23 @@
2525
DATABASE_TYPE=mysql
2626
DATABASE_HOST=$SERVICE_HOST
2727

28-
# Neutron
29-
enable_plugin neutron https://github.com/openstack/neutron stable/${OPENSTACK_RELEASE}
30-
3128
# Nova
32-
ENABLED_SERVICES=n-cpu,placement-client,c-vol,neutron-agent
29+
ENABLED_SERVICES=n-cpu,placement-client,c-vol
3330
VOLUME_BACKING_FILE_SIZE=100G
3431

32+
# Neutron
33+
enable_plugin neutron https://github.com/openstack/neutron stable/${OPENSTACK_RELEASE}
34+
ENABLED_SERVICES+=,ovn-controller,ovs-vswitchd,ovsdb-server,q-fake,q-ovn-metadata-agent
35+
DISABLED_SERVICES=q-svc,horizon,ovn-northd,q-agt,q-dhcp,q-l3,q-meta,q-metering,q-vpn
36+
PUBLIC_BRIDGE_MTU=${MTU}
37+
ENABLE_CHASSIS_AS_GW="False"
38+
OVN_DBS_LOG_LEVEL="dbg"
39+
Q_ML2_PLUGIN_MECHANISM_DRIVERS="ovn,logger"
40+
Q_AGENT="ovn"
41+
3542
# Additional services
3643
ENABLED_SERVICES+=${OPENSTACK_ADDITIONAL_SERVICES}
44+
DISABLED_SERVICES+=${OPENSTACK_DISABLED_SERVICES}
3745

3846
[[post-config|$NOVA_CONF]]
3947
[DEFAULT]
@@ -43,9 +51,9 @@
4351
[DEFAULT]
4452
storage_availability_zone = ${SECONDARY_AZ}
4553

46-
[[post-config|/$NEUTRON_CORE_PLUGIN_CONF]]
47-
[ml2]
48-
path_mtu = ${MTU}
54+
[[post-config|$NEUTRON_CONF]]
55+
[DEFAULT]
56+
global_physnet_mtu = ${MTU}
4957
- path: /root/devstack.sh
5058
permissions: "0755"
5159
content: |

hack/ci/create_devstack.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,16 @@ source "${scriptdir}/${RESOURCE_TYPE}.sh"
3131

3232
CLUSTER_NAME=${CLUSTER_NAME:-"capo-e2e"}
3333

34-
OPENSTACK_RELEASE=${OPENSTACK_RELEASE:-"yoga"}
34+
OPENSTACK_RELEASE=${OPENSTACK_RELEASE:-"2023.2"}
3535
OPENSTACK_ENABLE_HORIZON=${OPENSTACK_ENABLE_HORIZON:-"false"}
3636

3737
# Devstack will create a provider network using this range
3838
# We create a route to it with sshuttle
3939
FLOATING_RANGE=${FLOATING_RANGE:-"172.24.4.0/24"}
4040

41+
# That will be the default DNS server for the Neutron subnets
42+
OPENSTACK_DNS_NAMESERVERS=${OPENSTACK_DNS_NAMESERVERS:-"8.8.8.8"}
43+
4144
# Servers will be directly attached to the private network
4245
# We create a route to it with sshuttle
4346
PRIVATE_NETWORK_CIDR=${PRIVATE_NETWORK_CIDR:-"10.0.3.0/24"}
@@ -86,10 +89,6 @@ function ensure_openstack_client {
8689
# We explicitly pin to the stable branch version of openstackclient.
8790
curl -L https://releases.openstack.org/constraints/upper/${OPENSTACK_RELEASE} -o /tmp/openstack-constraints
8891

89-
# Hack for yoga only: wrapt <1.14 doesn't support python 3.11
90-
[ "${OPENSTACK_RELEASE}" == "yoga" ] || exit 1 # Delete this hack
91-
sed -i "s/^wrapt===1\.13.*/wrapt===1.14.1/" /tmp/openstack-constraints
92-
9392
pip install -c /tmp/openstack-constraints \
9493
python-openstackclient python-cinderclient \
9594
python-glanceclient python-keystoneclient \
@@ -213,10 +212,11 @@ function create_devstack {
213212
HOST_IP="$ip" \
214213
CONTROLLER_IP="$CONTROLLER_IP" \
215214
FLOATING_RANGE="$FLOATING_RANGE" \
215+
OPENSTACK_DNS_NAMESERVERS="$OPENSTACK_DNS_NAMESERVERS" \
216216
MTU="$(get_mtu)" \
217217
PRIMARY_AZ="$PRIMARY_AZ" SECONDARY_AZ="$SECONDARY_AZ" \
218218
envsubst '${SSH_PUBLIC_KEY} ${OPENSTACK_ADDITIONAL_SERVICES}
219-
${OPENSTACK_RELEASE} ${HOST_IP} ${FLOATING_RANGE}
219+
${OPENSTACK_RELEASE} ${HOST_IP} ${FLOATING_RANGE} ${OPENSTACK_DNS_NAMESERVERS}
220220
${CONTROLLER_IP} ${MTU} ${PRIMARY_AZ} ${SECONDARY_AZ}' \
221221
< "./hack/ci/cloud-init/${tpl}.yaml.tpl" >> "$cloud_init"
222222
done

hack/ci/gce-project.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function create_vm {
9595
--zone "$GCP_ZONE" \
9696
--enable-nested-virtualization \
9797
--image-project ubuntu-os-cloud \
98-
--image-family ubuntu-2004-lts \
98+
--image-family ubuntu-2204-lts \
9999
--boot-disk-size 200G \
100100
--boot-disk-type pd-ssd \
101101
--can-ip-forward \

hack/ci/openstack.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function cloud_init {
3030
OPENSTACK_SUBNET_NAME=${OPENSTACK_SUBNET_NAME:-${CLUSTER_NAME}-subnet}
3131
OPENSTACK_SECGROUP_NAME=${OPENSTACK_SECGROUP_NAME:-${CLUSTER_NAME}-secgroup}
3232
OPENSTACK_ROUTER_NAME=${OPENSTACK_ROUTER_NAME:-${CLUSTER_NAME}-router}
33-
OPENSTACK_IMAGE_NAME=${OPENSTACK_IMAGE_NAME:-ubuntu-2004-lts}
33+
OPENSTACK_IMAGE_NAME=${OPENSTACK_IMAGE_NAME:-ubuntu-2204-lts}
3434

3535
OPENSTACK_FLAVOR=${OPENSTACK_FLAVOR:-m1.xlarge}
3636
OPENSTACK_FLAVOR_controller=${OPENSTACK_FLAVOR_controller:-$OPENSTACK_FLAVOR}
@@ -88,9 +88,9 @@ function init_infrastructure() {
8888
# We don't tag the image with the cluster name as we expect it to be shared
8989
if ! imageid=$(openstack image show "$OPENSTACK_IMAGE_NAME" -f value -c id 2>/dev/null)
9090
then
91-
curl -o /tmp/ubuntu-2004.qcow2 https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img
92-
imageid=$(openstack image create --disk-format qcow2 --file /tmp/ubuntu-2004.qcow2 "$OPENSTACK_IMAGE_NAME" -f value -c id)
93-
rm /tmp/ubuntu-2004.qcow2
91+
curl -o /tmp/ubuntu-2204.qcow2 https://cloud-images.ubuntu.com/releases/jammy/release/ubuntu-22.04-server-cloudimg-amd64.img
92+
imageid=$(openstack image create --disk-format qcow2 --file /tmp/ubuntu-2204.qcow2 "$OPENSTACK_IMAGE_NAME" -f value -c id)
93+
rm /tmp/ubuntu-2204.qcow2
9494
fi
9595
}
9696

scripts/ci-conformance.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ trap cleanup EXIT
4747

4848
apt-get update -y
4949
# Install requests module explicitly for HTTP calls.
50-
# libffi required for pip install cffi (yoga dependency)
50+
# libffi required for pip install cffi (bobcat dependency)
5151
apt-get install -y python3-requests libffi-dev
5252
rm -rf /var/lib/apt/lists/*
5353

scripts/ci-e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ trap cleanup EXIT
4848

4949
apt-get update -y
5050
# Install requests module explicitly for HTTP calls.
51-
# libffi required for pip install cffi (yoga dependency)
51+
# libffi required for pip install cffi (bobcat dependency)
5252
apt-get install -y python3-requests libffi-dev
5353
rm -rf /var/lib/apt/lists/*
5454

0 commit comments

Comments
 (0)