Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
bc9b5d3
Adds Rocky 8 pulp repositories to dnf.yml
jovial Aug 31, 2022
e46b417
Rocky 8: Install a compatible version of ansible in the kolla venv
jovial Aug 31, 2022
278e7d4
Update etc/kayobe/kolla.yml
jovial Aug 31, 2022
adab29a
Merge remote-tracking branch 'origin/feature/xena/rocky-dnf' into sta…
jovial Sep 2, 2022
e2c95d1
Add playbook to generate libvirt sasl secret
jovial Sep 2, 2022
5b01cca
Set compute_libvirt_sasl_password to secret from generator
jovial Sep 2, 2022
d253f01
Follow up: Update docker baseurl to work with Rocky 8
jovial Sep 2, 2022
db34967
Rocky 8: Enable libvirt on the host
jovial Sep 2, 2022
49bb330
Make Rocky Image more usable out of the box
jovial Sep 2, 2022
529c656
Bump volume size to support default stackhpc LVM sizes
jovial Sep 2, 2022
5812a90
Copy approach used for Ubuntu
jovial Sep 2, 2022
ff692fa
Use templatefile on userdata
jovial Sep 7, 2022
7fd9c73
Remove commented out config
jovial Sep 7, 2022
8bbfb31
Fix warning about undeclared variables
jovial Sep 7, 2022
48da62e
Address code review comment
jovial Sep 7, 2022
acf960b
Switch to using password lookup for sasl password
jovial Sep 7, 2022
cf83425
Remove generate secrets step
jovial Sep 7, 2022
35aa674
Use facts to pick dnf repositories
jovial Sep 7, 2022
2e21447
Try another image
jovial Oct 4, 2022
5d27446
Try using cloud-user
jovial Oct 4, 2022
0e90dc0
Update CI repository overrides for rocky
jovial Oct 5, 2022
0cc94ee
Remove hardcoding of bootstrap user
jovial Oct 5, 2022
967332f
Merge remote-tracking branch 'origin/stackhpc/xena' into HEAD
jovial Oct 5, 2022
4ad5495
Merge branch 'stackhpc/xena' into feature/xena/aio-rocky8
jovial Oct 5, 2022
a48ef8e
Fix bad reference to github inputs
jovial Oct 6, 2022
50b5c50
Fix bootstrap user set to empty string
jovial Oct 6, 2022
856551c
Fix bootstrap user set to empty string: take 2
jovial Oct 6, 2022
a353ef4
Fix empty bootstrap user: take 3
jovial Oct 6, 2022
8bdbed6
Fix internal pulp URL
jovial Oct 12, 2022
02d2351
Workaround network interfaces restart failing
jovial Oct 12, 2022
9994c49
Revert to using terraform to run workaround
jovial Oct 12, 2022
f4fd473
Add missing variable
jovial Oct 12, 2022
b5b980c
Restore configure local networking
jovial Oct 13, 2022
28f465b
A few fixes for the Rocky 8 image
jovial Oct 13, 2022
5a3a485
Fixups
jovial Oct 13, 2022
d076b50
Re-enable other jobs to check I havent broken anything
jovial Oct 14, 2022
13275c2
Merge remote-tracking branch 'origin/stackhpc/xena' into HEAD
jovial Oct 14, 2022
4f2bdc3
Merge branch 'stackhpc/xena' into feature/xena/aio-rocky8
jovial Oct 14, 2022
cfa2199
Remove workaround for old rocky8 image
jovial Oct 14, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions .github/workflows/stackhpc-all-in-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,26 @@ on:
description: Kayobe container image
type: string
required: true
os_distribution:
description: Host OS distribution
type: string
default: centos
neutron_plugin:
description: Neutron ML2 plugin
type: string
required: true
vm_user:
description: User to use when bootstraping the VM. Leave unset to use os_distribution.
type: string
default: ''
vm_image:
description: Image for the all-in-one VM
type: string
default: CentOS-stream8
vm_interface:
description: Default network interface name
type: string
default: eth0
vm_flavor:
description: Flavor for the all-in-one VM
type: string
Expand Down Expand Up @@ -56,6 +68,12 @@ jobs:
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
KAYOBE_IMAGE: ${{ inputs.kayobe_image }}
steps:
- name: Set bootstrap user output
id: bootstrap_user
run: |
user=${{ inputs.vm_user }}
echo "::set-output name=value::${user:-"${{ inputs.os_distribution }}"}"

- uses: actions/checkout@v2
with:
submodules: true
Expand All @@ -81,11 +99,12 @@ jobs:
- name: Generate terraform.tfvars
run: |
cat << EOF > terraform.tfvars
ssh_private_key = "id_rsa"
ssh_public_key = "id_rsa.pub"
ssh_private_key = "id_rsa"
aio_vm_user = "${{ env.VM_USER }}"
aio_vm_interface = "${{ env.VM_INTERFACE }}"
aio_vm_name = "${{ env.VM_NAME }}"
aio_vm_image = "${{ env.VM_IMAGE }}"
aio_vm_keypair = "${{ env.VM_KEYPAIR }}"
aio_vm_flavor = "${{ env.VM_FLAVOR }}"
aio_vm_network = "${{ env.VM_NETWORK }}"
aio_vm_subnet = "${{ env.VM_SUBNET }}"
Expand All @@ -94,10 +113,11 @@ jobs:
env:
VM_NAME: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
VM_IMAGE: ${{ inputs.vm_image }}
VM_KEYPAIR: "skc-ci-aio-${{ inputs.neutron_plugin }}-${{ github.run_id }}"
VM_FLAVOR: ${{ inputs.vm_flavor }}
VM_NETWORK: ${{ inputs.vm_network }}
VM_SUBNET: ${{ inputs.vm_subnet }}
VM_USER: ${{ steps.bootstrap_user.outputs.value }}
VM_INTERFACE: ${{ inputs.vm_interface }}

- name: Terraform Plan
run: terraform plan
Expand Down Expand Up @@ -151,10 +171,14 @@ jobs:
run: |
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/zz-aio-scenario.yml
---
os_distribution: ${{ env.OS_DISTRIBUTION }}
kolla_enable_ovn: ${{ env.ENABLE_OVN }}
bootstrap_user: ${{ env.BOOTSTRAP_USER }}
EOF
env:
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
OS_DISTRIBUTION: ${{ inputs.os_distribution }}
BOOTSTRAP_USER: ${{ steps.bootstrap_user.outputs.value }}

# https://renehernandez.io/snippets/multiline-strings-as-a-job-output-in-github-actions/
- name: Set SSH key output
Expand Down
40 changes: 36 additions & 4 deletions .github/workflows/stackhpc-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
uses: ./.github/workflows/stackhpc-build-kayobe-image.yml
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-ovs:
name: aio (OVS)
all-in-one-centos-ovs:
name: aio (CentOS OVS)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
Expand All @@ -47,8 +47,8 @@ jobs:
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-ovn:
name: aio (OVN)
all-in-one-centos-ovn:
name: aio (CentOS OVN)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
Expand All @@ -58,3 +58,35 @@ jobs:
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-rocky-ovs:
name: aio (Rocky OVS)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
neutron_plugin: ovs
vm_image: Rocky8
vm_user: cloud-user
vm_interface: ens3
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'

all-in-one-rocky-ovn:
name: aio (Rocky OVN)
needs:
- build-kayobe-image
uses: ./.github/workflows/stackhpc-all-in-one.yml
with:
kayobe_image: ${{ needs.build-kayobe-image.outputs.kayobe_image }}
os_distribution: rocky
neutron_plugin: ovn
vm_image: Rocky8
vm_user: cloud-user
vm_interface: ens3
OS_CLOUD: sms-lab-release
secrets: inherit
if: github.repository == 'stackhpc/stackhpc-kayobe-config'
91 changes: 50 additions & 41 deletions etc/kayobe/ansible/configure-aio-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,56 @@
vars:
venv: '{{ virtualenv_path }}/openstack'
tasks:
- block:
- name: Install python openstack client
pip:
name: python-openstackclient
virtualenv: '{{ venv }}'
extra_args: -c "{{ pip_upper_constraints_file }}"
- name: Install python build dependencies
package:
name:
- "{% if ansible_facts.os_family == 'RedHat' %}gcc{% else %}build-essential{% endif %}"
- "python3-dev{% if ansible_facts.os_family == 'RedHat' %}el{% endif %}"
cache_valid_time: "{{ apt_cache_valid_time if ansible_facts.os_family == 'Debian' else omit }}"
update_cache: "{{ True if ansible_facts.os_family == 'Debian' else omit }}"
state: present
become: true

- name: Include kolla secrets
include_vars:
dir: '{{ kayobe_env_config_path }}/kolla/'
files_matching: passwords.yml
name: kolla_passwords
- name: Install python openstack client
pip:
name: python-openstackclient
virtualenv: '{{ venv }}'
extra_args: -c "{{ pip_upper_constraints_file }}"

- name: Add an IP to connect to the instances
# FIXME: host configure will have bounced the bridge
# and removed the IP
command: ip a add 10.0.2.1/24 dev breth1
register: result
failed_when: 'result.rc !=0 and "RTNETLINK answers: File exists" not in
result.stderr'
changed_when: result.rc == 0
become: true
- name: Include kolla secrets
include_vars:
dir: '{{ kayobe_env_config_path }}/kolla/'
files_matching: passwords.yml
name: kolla_passwords

- name: Run init-run-once
script:
cmd: scripts/aio-init.sh
creates: /tmp/.init-runonce
environment:
KOLLA_OPENSTACK_COMMAND: '{{ venv }}/bin/openstack'
OS_PROJECT_DOMAIN_NAME: Default
OS_USER_DOMAIN_NAME: Default
OS_PROJECT_NAME: admin
OS_TENANT_NAME: admin
OS_USERNAME: admin
OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could\
\ not find keystone_admin_password in passwords.yml') }}"
# Use kolla_external_fqdn in wallaby
OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name
| net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000
OS_INTERFACE: public
OS_ENDPOINT_TYPE: publicURL
OS_IDENTITY_API_VERSION: 3
OS_REGION_NAME: RegionOne
OS_AUTH_PLUGIN: password
- name: Add an IP to connect to the instances
# FIXME: host configure will have bounced the bridge
# and removed the IP
command: ip a add 10.0.2.1/24 dev breth1
register: result
failed_when: 'result.rc !=0 and "RTNETLINK answers: File exists" not in
result.stderr'
changed_when: result.rc == 0
become: true

- name: Run init-run-once
script:
cmd: scripts/aio-init.sh
creates: /tmp/.init-runonce
environment:
KOLLA_OPENSTACK_COMMAND: '{{ venv }}/bin/openstack'
OS_PROJECT_DOMAIN_NAME: Default
OS_USER_DOMAIN_NAME: Default
OS_PROJECT_NAME: admin
OS_TENANT_NAME: admin
OS_USERNAME: admin
OS_PASSWORD: "{{ kolla_passwords.keystone_admin_password | mandatory('Could\
\ not find keystone_admin_password in passwords.yml') }}"
# Use kolla_external_fqdn in wallaby
OS_AUTH_URL: http://{{ kolla_external_fqdn | default(public_net_name
| net_fqdn) | default(public_net_name | net_vip_address, true) }}:5000
OS_INTERFACE: public
OS_ENDPOINT_TYPE: publicURL
OS_IDENTITY_API_VERSION: 3
OS_REGION_NAME: RegionOne
OS_AUTH_PLUGIN: password
6 changes: 6 additions & 0 deletions etc/kayobe/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@
# compute_qemu_conf_extra.
#compute_qemu_conf:

# Whether to enable libvirt SASL authentication. Default is true.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a config sync somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think so, will check when these keys landed upstream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trying to fix upstream here: https://review.opendev.org/c/openstack/kayobe/+/856454. Will also need syncing to kayobe-config.

#compute_libvirt_enable_sasl:

# libvirt SASL password. Default is unset.
#compute_libvirt_sasl_password:

# Whether to enable a libvirt TLS listener. Default is false.
#compute_libvirt_enable_tls:

Expand Down
3 changes: 3 additions & 0 deletions etc/kayobe/environments/ci-aio/compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

compute_libvirt_sasl_password: "{{ lookup('password', kayobe_env_config_path ~ '/secrets/libvirt_sasl_password') }}"
2 changes: 1 addition & 1 deletion etc/kayobe/environments/ci-aio/kolla/globals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ openstack_service_workers: "1"
openstack_service_rpc_workers: "1"

docker_yum_baseurl: "{{ stackhpc_repo_docker_url }}"
docker_yum_gpgkey: "https://download.docker.com/linux/{% raw %}{{ ansible_facts.distribution | lower }}{% endraw %}/gpg"
docker_yum_gpgkey: "https://download.docker.com/linux/centos/gpg"
4 changes: 3 additions & 1 deletion etc/kayobe/environments/ci-aio/stackhpc-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ stackhpc_repo_ubuntu_cloud_archive_version: "{{ stackhpc_pulp_repo_ubuntu_cloud_
stackhpc_repo_ubuntu_focal_version: "{{ stackhpc_pulp_repo_ubuntu_focal_version }}"
stackhpc_repo_ubuntu_focal_security_version: "{{ stackhpc_pulp_repo_ubuntu_focal_security_version }}"
stackhpc_repo_docker_ce_ubuntu_version: "{{ stackhpc_pulp_repo_docker_ce_ubuntu_version }}"

stackhpc_repo_rocky_baseos_version: "{{ stackhpc_pulp_repo_rocky_8_6_baseos_version }}"
stackhpc_repo_rocky_appstream_version: "{{ stackhpc_pulp_repo_rocky_8_6_appstream_version }}"
stackhpc_repo_rocky_extras_version: "{{ stackhpc_pulp_repo_rocky_8_6_extras_version }}"

# Host and port of container registry.
# Push built images to the development Pulp service registry.
Expand Down
1 change: 1 addition & 0 deletions etc/kayobe/kolla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ kolla_build_args:
#kolla_enable_kibana:
#kolla_enable_kuryr:
#kolla_enable_loadbalancer:
kolla_enable_nova_libvirt_container: "{{ os_distribution not in ['rocky'] }}"
#kolla_enable_magnum:
#kolla_enable_manila:
#kolla_enable_manila_backend_cephfs_native:
Expand Down
3 changes: 2 additions & 1 deletion etc/kayobe/overcloud-dib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ overcloud_dib_host_packages_extra:
overcloud_dib_git_elements_extra:
- repo: "https://github.com/stackhpc/stackhpc-image-elements"
local: "{{ source_checkout_path }}/stackhpc-image-elememts"
version: "v1.4.0"
# FIXME: merge and tag a new release
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not technically need for AIO, so could this split this out. I was just testing with the image produced by DIB. Should we switch to using the LVM based DIB images at some point?

version: "feature/rocky-container-generic"
elements_path: "elements"

# List of git repositories containing Diskimage Builder (DIB) elements. See
Expand Down
2 changes: 1 addition & 1 deletion etc/kayobe/stackhpc-overcloud-dib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ stackhpc_overcloud_dib_name: "deployment_image"

# StackHPC overcloud DIB image elements.
stackhpc_overcloud_dib_elements:
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container{% else %}minimal{% endif %}"
- "{{ os_distribution }}-{% if os_distribution == 'rocky' %}container-generic{% else %}minimal{% endif %}"
- "cloud-init-datasources"
- "{% if os_distribution in ['centos', 'rocky'] %}disable-selinux{% endif %}"
- "enable-serial-console"
Expand Down
6 changes: 3 additions & 3 deletions etc/kayobe/stackhpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ stackhpc_repo_treasuredata_4_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/t
stackhpc_repo_treasuredata_4_version: "{{ stackhpc_repo_distribution }}"

# Rocky 8 BaseOS
stackhpc_repo_rocky_baseos_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8/BaseOS/x86_64/os/{{ stackhpc_repo_rocky_baseos_version }}"
stackhpc_repo_rocky_baseos_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8.6/BaseOS/x86_64/os/{{ stackhpc_repo_rocky_baseos_version }}"
stackhpc_repo_rocky_baseos_version: "{{ stackhpc_repo_distribution }}"

# Rocky 8 AppStream
stackhpc_repo_rocky_appstream_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8/AppStream/x86_64/os/{{ stackhpc_repo_rocky_appstream_version }}"
stackhpc_repo_rocky_appstream_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8.6/AppStream/x86_64/os/{{ stackhpc_repo_rocky_appstream_version }}"
stackhpc_repo_rocky_appstream_version: "{{ stackhpc_repo_distribution }}"

# Rocky 8 extras
stackhpc_repo_rocky_extras_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8/extras/x86_64/os/{{ stackhpc_repo_rocky_extras_version }}"
stackhpc_repo_rocky_extras_url: "{{ stackhpc_repo_mirror_url }}/pulp/content/rocky/8.6/extras/x86_64/os/{{ stackhpc_repo_rocky_extras_version }}"
stackhpc_repo_rocky_extras_version: "{{ stackhpc_repo_distribution }}"

###############################################################################
Expand Down
2 changes: 1 addition & 1 deletion terraform/aio/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ output "access_gw" {
}

output "access_interface" {
value = "eth0"
value = var.aio_vm_interface
}
3 changes: 0 additions & 3 deletions terraform/aio/scripts/configure-local-networking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ done
if ! sudo ip a show dev breth1 | grep $public_ip/24 >/dev/null 2>&1; then
sudo ip a add $public_ip/24 dev breth1
fi

# This prevents network.service from restarting correctly.
sudo killall dhclient || true
8 changes: 8 additions & 0 deletions terraform/aio/templates/userdata.cfg.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,11 @@
# Don't automatically mount ephemeral disk
mounts:
- [/dev/vdb, null]
# WORKAROUND: internal DNS missing from SMS lab.
runcmd:
- 'echo "10.0.0.34 pelican pelican.service.compute.sms-lab.cloud" >> /etc/hosts'
- 'echo "10.205.3.187 pulp-server pulp-server.internal.sms-cloud" >> /etc/hosts'
# Configure SSH keys here, to avoid creating an ephemeral keypair.
# This means only the instance needs to be cleaned up if the destroy fails.
ssh_authorized_keys:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this didn't work for me in the Ubuntu job, unsure which user got the key.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers, I didn't check this as I only saw the ubuntu PR late and thought I'd adopt the method from there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed with ff692fa

- ${ssh_public_key}
Loading