Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add aarch64 ims remote build configuration #256

Merged
merged 13 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.17.11] - 2024-03-04

- Added support for `aarch64` IMS remote nodes

## [1.17.10] - 2024-02-28

### Fixed
Expand Down Expand Up @@ -415,7 +419,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Ansible playbook for applying csm packages to Compute and Application nodes

[Unreleased]: https://github.com/Cray-HPE/csm-config/compare/1.17.10...HEAD
[Unreleased]: https://github.com/Cray-HPE/csm-config/compare/1.17.11...HEAD

[1.17.11]: https://github.com/Cray-HPE/csm-config/compare/1.17.10...1.17.11

[1.17.10]: https://github.com/Cray-HPE/csm-config/compare/1.17.9...1.17.10

Expand Down
9 changes: 5 additions & 4 deletions ansible/ims_computes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
- vars/csm_ims_repos.yml
- vars/csm_packages.yml
roles:
- role: csm.ca_cert
- role: csm.gpg_keys
- role: csm.packages
vars:
packages: "{{ ims_compute_sles_packages }}"
- role: csm.ims-remote
vars:
builder_architecture: "{{ ansible_env.IMS_ARCH |default('x86_64') }}"
packages: "{{ ims_compute_sles_packages + common_csm_sles_packages }}"
- role: csm.ims-remote
- role: csm.rebuild-initrd
4 changes: 1 addition & 3 deletions ansible/roles/csm.ims-remote/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2023-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -23,6 +23,4 @@
#
# Defaults for the csm.ims-remote role. See the README.md for information.

builder_architecture: "x86_64"
kata_version: "2.5.1"

66 changes: 22 additions & 44 deletions ansible/roles/csm.ims-remote/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2023-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -24,46 +24,24 @@
# Tasks for the csm.ims-remote role
---

- name: Download Kata Containers
delegate_to: localhost
run_once: true
get_url:
url: "https://packages.local/repository/ims-remote-third-party/kata/kata-static-{{ kata_version }}-{{ builder_architecture }}.tar.xz"
dest: /tmp
validate_certs: no
register: source_file

- name: Extract
unarchive:
list_files: true
src: "/tmp/kata-static-{{ kata_version }}-{{ builder_architecture }}.tar.xz"
dest: /opt

- name: Copy Kata to Canonical Location
copy:
src: /opt/opt/kata
dest: /opt
remote_src: true

- name: Apply Execute Permissions
file:
mode: u+rwx
recurse: true
state: directory
path: /opt/kata/bin/

- name: Setup Symlink
command: ln -sf /opt/kata/bin/containerd-shim-kata-v2 /usr/local/bin/containerd-shim-kata-qemu-v2

- name: Configure Kata hypervisor rfile
command: sed -i 's/\[\"enable_iommu\"\]/["enable_iommu", "virtio_fs_extra_args", "default_memory", "kernel_params", "cpu_features"]/' /opt/kata/share/defaults/kata-containers/configuration-qemu.toml

- name: Delete Redundant Dir
file:
path: /opt/opt
state: absent

- name: Delete kata tarball
file:
path: "/tmp/kata-static-{{ kata_version }}-{{ builder_architecture }}.tar.xz"
state: absent
- name: Get SSH certificate
local_action:
module: csm_read_configmap
name: cray-ims-remote-keys
namespace: services
key: public_key
decrypt: false
register: public_key

- name: Create temp file for public-key
tempfile:
state: file
suffix: pub
register: temp_pub_key

- name: Add to authorized keys
authorized_key:
state: present
user: root
key: "{{ public_key.response }}"
when: public_key != ''
20 changes: 15 additions & 5 deletions ansible/vars/csm_ims_repos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# MIT License
#
# (C) Copyright 2023 Hewlett Packard Enterprise Development LP
# (C) Copyright 2023-2024 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -23,9 +23,19 @@
#

csm_sles_repositories:
- name: SUSE-SLE-Module-Containers-15-sp5-x86_64-Pool
- name: SUSE-SLE-Module-Containers-${releasever_major}-SP${releasever_minor}-aarch64-Pool
description: "SUSE Container Modules (added by Ansible)"
repo: https://packages.local/repository/SUSE-SLE-Module-Containers-15-sp5-x86_64-Pool
- name: SUSE-SLE-Module-Basesystem-15-sp5-x86_64-Pool
repo: https://packages.local/repository/SUSE-SLE-Module-Containers-${releasever_major}-SP${releasever_minor}-aarch64-Pool
- name: SUSE-SLE-Module-Basesystem-${releasever_major}-SP${releasever_minor}-aarch64-Pool
description: "SUSE Basesystem Modules (added by Ansible)"
repo: https://packages.local/repository/SUSE-SLE-Module-Basesystem-15-sp5-x86_64-Pool
repo: https://packages.local/repository/SUSE-SLE-Module-Basesystem-${releasever_major}-SP${releasever_minor}-aarch64-Pool
- name: csm-sle
description: "CSM SLE Packages (added by Ansible)"
repo: 'https://packages.local/repository/csm-sle-${releasever_major}sp${releasever_minor}'
- name: SUSE-SLE-Module-Containers-${releasever_major}-SP${releasever_minor}-x86_64-Pool
description: "Suse container modules (added by Ansible)"
repo: https://packages.local/repository/SUSE-SLE-Module-Containers-${releasever_major}-SP${releasever_minor}-x86_64-Pool
- name: SUSE-SLE-Module-Basesystem-${releasever_major}-SP${releasever_minor}-x86_64-Pool
description: "SUSE Basesystem Modules (added by Ansible)"
repo: https://packages.local/repository/SUSE-SLE-Module-Basesystem-${releasever_major}-SP${releasever_minor}-x86_64-Pool

Loading