Review: Needs Fixing
A good first try! Needs a few fixes, but something like this should work.
Diff comments:
> diff --git a/vbuilder/bundle.yaml b/vbuilder/bundle.yaml
> index c601076..ec2d038 100644
> --- a/vbuilder/bundle.yaml
> +++ b/vbuilder/bundle.yaml
> @@ -131,7 +131,7 @@
> {%- set openstack_username_lcy02 = "launchpad-vbuilder-staging" %}
> {%- set vbuilders_bos01 = {"amd64": {"series": "focal", "flavor":
> "vbuilder-gpu", "count": 1}, "arm64": {"series": "focal", "count": 1,
> "config_drive": false}, "arm64-gpu": {"arch_base": "arm64", "arch_suffix":
> "-gpu", "series": "focal", "flavor": "vbuilder-nvidia-l4", "count": 1,
> "config_drive": false}, "ppc64el": {"series": "focal", "count": 1}, "s390x":
> {"series": "focal", "count": 1}} %}
> {%- set vbuilders_bos02 = {"arm64": {"series": "focal", "count": 1,
> "config_drive": false}, "ppc64el": {"series": "focal", "count": 1}, "s390x":
> {"series": "focal", "count": 1}} %}
> -{%- set vbuilders_bos03 = {"amd64": {"series": "focal", "count": 4},
> "riscv64": {"series": "jammy", "count": 1, "config_drive": false}} %}
> +{%- set vbuilders_bos03 = {"amd64": {"series": "focal", "count": 4},
> "riscv64": {"series": "jammy", "count": 1, "config_drive": false}, "arm64":
> {"series": "focal", "count": 1},} %}
I'm not 100% sure the trailing comma is safe here, and in any case it isn't
needed.
We'll need `"config_drive": false` for the arm64 case (which is a workaround
for OpenStack issues IIRC - I've slightly forgotten the details but they should
be in git history if you're interested).
We'll also need `"flavor": "vbuilder-arm64"`, since that seems to be the
relevant entry in `openstack flavor list`.
Could you keep this dict sorted by architecture name?
> {%- set vbuilders_lcy02 = {"amd64": {"series": "focal", "count": 4}} %}
> {%- set vbuilder_prefix = "qastaging-" %}
> {%- endif %}
> @@ -323,6 +323,24 @@ applications:
> use_swift: false
> visibility: private
> {%- endif %}
> +{%- if stage_name == "qastaging" %}
> + glance-simplestreams-sync-bos03-arm64:
Please sort this between `glance-simplestreams-sync-bos03-amd64` and
`glance-simplestreams-sync-bos03-riscv64`.
> + charm: {{ charm_dir }}/glance-simplestreams-sync
> + constraints: "{{ extra_constraints }}"
> + num_units: 1
> + options:
> + content_id_template: "{{ content_id_template }}"
Add this so that instances will boot properly:
custom_properties: 'hypervisor_type=kvm hw_firmware_type=uefi'
> + mirror_list: |-
> + [{url: "http://cloud-images.ubuntu.com/daily/", name_prefix:
> "ubuntu:released", path: "streams/v1/index.sjson", max: 3, item_filters:
> ["release~({{ gss_series }})", "arch~(arm64|aarch64)",
> "ftype~(disk1.img|disk.img)"]}]
> + name_prefix: "{{ name_prefix }}/"
> + openstack-auth-url: "https://keystone.ps6.canonical.com:5000/v3"
> + openstack-identity-api-version: "3"
> + openstack-tenant-name: "{{ openstack_tenant_name_bos03 }}"
> + openstack-username: "{{ openstack_username_bos03 }}"
> + region: scalingstack-bos03
> + use_swift: false
> + visibility: private
> +{%- endif %}
> glance-simplestreams-sync-lcy02-amd64:
> charm: {{ charm_dir }}/glance-simplestreams-sync
> constraints: "{{ extra_constraints }}"
> @@ -440,6 +458,14 @@ applications:
> remote-modifier-private-key: include-base64://{{ local_dir
> }}/id_rsa.imagebuilder
> remote-modifier-public-key: include-base64://{{ local_dir
> }}/id_rsa.imagebuilder.pub
> {%- endif %}
> +{%- if stage_name == "qastaging" %}
> + launchpad-buildd-image-modifier-bos03-arm64:
Please sort this between `launchpad-buildd-image-modifier-bos03-amd64` and
`launchpad-buildd-image-modifier-bos03-riscv64`.
> + charm: {{ charm_dir }}/launchpad-buildd-image-modifier
> + options:
> + clamav-database-url: "{{ clamav_database_url }}"
> + launchpad-buildd-repository: "{{ launchpad_buildd_repository }}"
> + linux-command-line-extra: "systemd.unified_cgroup_hierarchy=false"
Add the `compat_uts_machine=armv7l` Linux command-line option as well, so that
arm64 machines will behave as expected when running armhf builds. See other
arm64 sections.
Also, since images will need to be built on a machine other than the g-s-s
unit, add:
remote-modifiers: '{{ modifiers_bos03 }}'
remote-modifier-private-key: include-base64://{{ local_dir
}}/id_rsa.imagebuilder
remote-modifier-public-key: include-base64://{{ local_dir
}}/id_rsa.imagebuilder.pub
Before landing this, we'll need to create an appropriate persistent instance
from the management environment after sourcing
`~/.scalingstack/scalingstack-bos03-vbuilder-staging.novarc`, and add its IP
address to `modifiers_bos03`. This is always something we've done ad-hoc,
since Juju can't necessarily help us with all architectures; `history | grep
'openstack server create'` in the management environment may be helpful in
figuring out what to do, though the exact details do tend to differ between
regions and architectures.
> +{%- endif %}
> vbuilder-manage-bos01:
> charm: {{ charm_dir }}/vbuilder-manage
> constraints: "cores=2 mem=8G root-disk=20G {{ extra_constraints }}"
> @@ -572,6 +598,9 @@ relations:
> {%- if stage_name in ("production", "qastaging") %}
> - ["glance-simplestreams-sync-bos03-riscv64:image-modifier",
> "launchpad-buildd-image-modifier-bos03-riscv64:image-modifier"]
> {%- endif %}
> +{%- if stage_name == "qastaging" %}
> + - ["glance-simplestreams-sync-bos03-arm64:image-modifier",
> "launchpad-buildd-image-modifier-bos03-arm64:image-modifier"]
> +{%- endif %}
As above, please keep these sorted within each group.
> - ["glance-simplestreams-sync-lcy02-amd64:image-modifier",
> "launchpad-buildd-image-modifier-amd64:image-modifier"]
> - ["vbuilder-manage-bos01:amqp", "rabbitmq-server:amqp"]
> - ["vbuilder-manage-bos02:amqp", "rabbitmq-server:amqp"]
> @@ -590,6 +619,9 @@ relations:
> {%- if stage_name in ("production", "qastaging") %}
> - ["glance-simplestreams-sync-bos03-riscv64", "ntp"]
> {%- endif %}
> +{%- if stage_name == "qastaging" %}
> + - ["glance-simplestreams-sync-bos03-arm64", "ntp"]
> +{%- endif %}
As above, please keep these sorted within each group.
> - ["glance-simplestreams-sync-lcy02-amd64", "ntp"]
> - ["vbuilder-manage-bos01", "ntp"]
> - ["vbuilder-manage-bos02", "ntp"]
> diff --git a/vbuilder/rebuild-images b/vbuilder/rebuild-images
> index 5979c46..363e4a7 100755
> --- a/vbuilder/rebuild-images
> +++ b/vbuilder/rebuild-images
> @@ -23,6 +23,7 @@ targets_by_stage = {
> ("bos02", "s390x", "focal"),
> ("bos03", "amd64", "focal"),
> ("bos03", "riscv64", "jammy"),
> + ("bos03", "arm64", "focal"),
Sorting.
> ("lcy02", "amd64", "focal"),
> ],
> "staging": [
> diff --git a/vbuilder/upgrade-charms b/vbuilder/upgrade-charms
> index bd46c6a..3e3c04c 100755
> --- a/vbuilder/upgrade-charms
> +++ b/vbuilder/upgrade-charms
> @@ -18,6 +18,7 @@ targets_by_stage = {
> ("bos02", "s390x"),
> ("bos03", "amd64"),
> ("bos03", "riscv64"),
> + ("bos03", "arm64"),
Sorting.
> ("lcy02", "amd64"),
> ],
> "staging": [
--
https://code.launchpad.net/~ines-almeida/launchpad-mojo-specs/+git/private/+merge/455059
Your team Launchpad code reviewers is subscribed to branch
~launchpad/launchpad-mojo-specs/+git/private:vbuilder.
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp