-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support creating ubuntu 22.04 AMI for AWS (#1244)
* feat: Support creating ubuntu 22.04 AMI for AWS * Update .github/workflows/aws-e2e.yaml Co-authored-by: Dimitri Koshkin <[email protected]> * fix: ubuntu 22.04 gpu support (#1246) * fix: ubuntu 22.04 gpu support * fix: set gcc 12 for ubuntu 22 --------- Co-authored-by: Dimitri Koshkin <[email protected]> Co-authored-by: Faiq <[email protected]>
- Loading branch information
1 parent
35a7a87
commit 105d58e
Showing
6 changed files
with
71 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
# Implements the NVIDIA Driver Installation Quickstart Guide for Ubuntu LTS - see | ||
# https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html#ubuntu-lts | ||
|
||
- name: install runfile prereqs | ||
apt: | ||
name: | ||
- linux-headers-{{ ansible_kernel }} | ||
- build-essential | ||
state: present | ||
update_cache: true | ||
retries: 3 | ||
delay: 4 | ||
|
||
- name: configure ubuntu 22.04 | ||
block: | ||
- name: install runfile prereqs for ubuntu 22.04 | ||
apt: | ||
name: | ||
- gcc-12 | ||
- g++-12 | ||
state: present | ||
update_cache: true | ||
retries: 3 | ||
delay: 4 | ||
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == '22' | ||
|
||
- name: configure update-alternatives for gcc | ||
ansible.builtin.command: | ||
cmd: "{{ item }}" | ||
with_items: | ||
- "update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12" | ||
- "update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-12 12" | ||
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == '22' | ||
|
||
- name: set gcc 12 as default | ||
ansible.builtin.command: | ||
cmd: "{{ item }}" | ||
with_items: | ||
- "update-alternatives --set gcc /usr/bin/gcc-12" | ||
- "update-alternatives --set cc /usr/bin/gcc-12" | ||
when: ansible_distribution == "Ubuntu" and ansible_distribution_major_version == '22' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
build_name: "ubuntu-22" | ||
packer_builder_type: "amazon" | ||
python_path: "" | ||
# The latest cloud-init version is unable to run #boothook created by CAPA https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/5115 | ||
# This is a workaround to downgrade to older cloud-init version. | ||
# https://github.com/kubernetes-sigs/image-builder/pull/1590/files | ||
pinned_debs: ["cloud-init=23.1.2-0ubuntu0~22.04.1"] | ||
packer: | ||
ami_filter_name: "ubuntu/images/*ubuntu-jammy-22.04-amd64-server-*" | ||
ami_filter_owners: "099720109477" | ||
source_ami: "" | ||
distribution: "Ubuntu" | ||
distribution_version: "22.04" | ||
ssh_username: "ubuntu" | ||
root_device_name: "/dev/sda1" | ||
volume_size: "15" |