Skip to content
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The table below shows the currently provided operating systems for each provider
| Amazon Linux 2023 | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Azure Linux 3 | ❌ | 💙 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| CentOS 9 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ❌ |
| Flatcar | ✅ | 💙 | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | | 💙 | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Flatcar | ✅ | 💙 | ❌ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ✅ | | 💙 | ❌ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Oracle Linux 9 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Photon 4 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Photon 5 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | 💙 | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ |
Expand Down
18 changes: 18 additions & 0 deletions docs/book/src/capi/providers/3dsoutscale.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ the different operating systems.
|------|-------------|
| `ubuntu-2204.json` | The settings for the Ubuntu 22.04 image |
| `ubuntu-2404.json` | The settings for the Ubuntu 24.04 image |
| `flatcar.json` | The settings for the Flatcar image |

You must have your [Access Keys](https://docs.outscale.com/en/userguide/About-Access-Keys.html).
You must have your [Account Id](https://docs.outscale.com/en/userguide/Getting-Information-About-Your-Account-and-Quotas.html).
Expand All @@ -38,3 +39,20 @@ OSC_REGION: Outscale Region
OSC_ACCESS_KEY: Outscale Access Key Id
OSC_ACCOUNT_ID: Outscale Account Id
```

### Flatcar

Since Outscale does not provide a Flatcar OMI, the Flatcar build uses an Ubuntu OMI as a
bootstrap environment. The build process installs Flatcar to disk using `flatcar-install`,
reboots into Flatcar, and then provisions it with Ansible.

The following additional environment variables are required for Flatcar builds:
```
FLATCAR_CHANNEL: Flatcar release channel (stable, beta, alpha). Defaults to stable.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The docs say here "Defaults to stable" but I don't see a default set anywhere, just the user var in packer-flatcar.json. Same for FLATCAR_VERSION.

Could you set a safe default in install-flatcar.sh itself?

FLATCAR_CHANNEL="${FLATCAR_CHANNEL:-stable}"
FLATCAR_VERSION="${FLATCAR_VERSION:-current}"

or change the documentation so it doesn't imply there's a default.

FLATCAR_VERSION: Flatcar version. Defaults to current (latest).
```

Example:
```bash
FLATCAR_CHANNEL=stable FLATCAR_VERSION=current make build-osc-flatcar
```
8 changes: 5 additions & 3 deletions images/capi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ DO_BUILD_NAMES ?= do-ubuntu-2204 do-ubuntu-2404

OPENSTACK_BUILD_NAMES ?= openstack-ubuntu-2204 openstack-ubuntu-2404 openstack-flatcar openstack-rockylinux-9

OSC_BUILD_NAMES ?= osc-ubuntu-2204 osc-ubuntu-2404
OSC_BUILD_NAMES ?= osc-ubuntu-2204 osc-ubuntu-2404 osc-flatcar

QEMU_BUILD_NAMES ?= qemu-ubuntu-2204 qemu-ubuntu-2204-cloudimg qemu-ubuntu-2404 qemu-ubuntu-2404-efi qemu-ubuntu-2204-efi qemu-centos-9 qemu-rhel-9 qemu-rockylinux-9 qemu-rockylinux-9-cloudimg qemu-flatcar

Expand Down Expand Up @@ -606,11 +606,11 @@ $(OCI_VALIDATE_TARGETS): deps-oci

.PHONY: $(OSC_BUILD_TARGETS)
$(OSC_BUILD_TARGETS): deps-osc
$(PACKER) build $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst build-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer.json
$(PACKER) build $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst build-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer$(if $(findstring flatcar,$@),-flatcar,).json

.PHONY: $(OSC_VALIDATE_TARGETS)
$(OSC_VALIDATE_TARGETS): deps-osc
$(PACKER) validate $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst validate-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer.json
$(PACKER) validate $(PACKER_NODE_FLAGS) -var-file="$(abspath packer/outscale/$(subst validate-osc-,,$@).json)" $(ABSOLUTE_PACKER_VAR_FILES) packer/outscale/packer$(if $(findstring flatcar,$@),-flatcar,).json

.PHONY: $(POWERVS_BUILD_TARGETS)
$(POWERVS_BUILD_TARGETS): deps-powervs
Expand Down Expand Up @@ -837,6 +837,7 @@ build-oci-all: $(OCI_BUILD_TARGETS) ## Builds all OCI image

build-osc-ubuntu-2204: ## Builds Ubuntu 22.04 Outscale Snapshot
build-osc-ubuntu-2404: ## Builds Ubuntu 24.04 Outscale Snapshot
build-osc-flatcar: ## Builds Flatcar Outscale Snapshot
build-osc-all: $(OSC_BUILD_TARGETS) ## Builds all Outscale Snapshot

build-nutanix-ubuntu-2204: ## Builds Ubuntu 22.04 Nutanix image
Expand Down Expand Up @@ -974,6 +975,7 @@ validate-oci-all: $(OCI_VALIDATE_TARGETS) ## Validates all OCI image packer conf

validate-osc-ubuntu-2204: ## Validates Ubuntu 22.04 Outscale Snapshot Packer config
validate-osc-ubuntu-2404: ## Validates Ubuntu 24.04 Outscale Snapshot Packer config
validate-osc-flatcar: ## Validates Flatcar Outscale Snapshot Packer config
validate-osc-all: $(OSC_VALIDATE_TARGETS) ## Validates all Outscale Snapshot Packer config

validate-powervs-centos-9: ## Validates the PowerVS CentOS 9 image packer config
Expand Down
23 changes: 23 additions & 0 deletions images/capi/ansible/roles/gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,26 @@ first to ensure you supply the correct one.**_

_**For example, using the `rocm` use case will install +24GB of libraries as
well as the driver so your disk size will need to compensate for this.**_

# Flatcar NVIDIA (sysext)

On Flatcar, NVIDIA drivers are installed via the [systemd-sysext](https://www.flatcar.org/docs/latest/setup/customization/using-nvidia/#prebuilt-sysext-method) mechanism instead of DKMS.
Pre-built driver sysext images are built with every Flatcar release and contain signed kernel modules.
The nvidia-runtime sysext provides container runtime integration.

The following variables are available:

| Variable | Default | Description |
|----------|---------|-------------|
| `gpu_flatcar_nvidia_sysext_name` | `nvidia-drivers-570` | Driver sysext identifier written to `/etc/flatcar/enabled-sysext.conf` |
| `gpu_flatcar_nvidia_runtime_url` | _(empty)_ | URL to download the nvidia-runtime `.raw` sysext image |
| `gpu_flatcar_nvidia_runtime_filename` | _(empty)_ | Filename of the nvidia-runtime `.raw` image |

Example packer configuration:

```json
{
"ansible_user_vars": "gpu_vendor=nvidia gpu_flatcar_nvidia_sysext_name=nvidia-drivers-570 gpu_flatcar_nvidia_runtime_url=https://extensions.flatcar.org/extensions/nvidia-runtime-v1.17.9-x86-64.raw gpu_flatcar_nvidia_runtime_filename=nvidia-runtime-v1.17.9-x86-64.raw",
"node_custom_roles_pre": "gpu"
}
```
3 changes: 3 additions & 0 deletions images/capi/ansible/roles/gpu/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ gpu_block_nouveau_loading: false
gpu_systemd_networkd_update_initramfs: >-
{%- if ansible_os_family == 'VMware Photon OS' -%} dracut -f{%- elif ansible_os_family == 'Debian' -%} update-initramfs -u{%- endif -%}
gpu_nvidia_ceph: false
gpu_flatcar_nvidia_sysext_name: "nvidia-drivers-570"
gpu_flatcar_nvidia_runtime_url: ""
gpu_flatcar_nvidia_runtime_filename: ""
46 changes: 46 additions & 0 deletions images/capi/ansible/roles/gpu/tasks/flatcar-nvidia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2024 The Kubernetes Authors.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

---
- name: Configure NVIDIA driver sysext
ansible.builtin.copy:
content: "{{ gpu_flatcar_nvidia_sysext_name }}\n"
dest: /etc/flatcar/enabled-sysext.conf
owner: root
group: root
mode: "0644"

- name: Create nvidia-runtime extension directory
ansible.builtin.file:
path: /opt/extensions/nvidia-runtime
state: directory
owner: root
group: root
mode: "0755"

- name: Download nvidia-runtime sysext image
ansible.builtin.get_url:
url: "{{ gpu_flatcar_nvidia_runtime_url }}"
dest: "/opt/extensions/nvidia-runtime/{{ gpu_flatcar_nvidia_runtime_filename }}"
owner: root
group: root
mode: "0644"
retries: 5
delay: 3

- name: Create nvidia-runtime sysext symlink
ansible.builtin.file:
src: "/opt/extensions/nvidia-runtime/{{ gpu_flatcar_nvidia_runtime_filename }}"
dest: /etc/extensions/nvidia-runtime.raw
state: link
9 changes: 7 additions & 2 deletions images/capi/ansible/roles/gpu/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,22 @@
src: "etc/modprobe.d/blocklist-nouveau.conf"
dest: "/etc/modprobe.d/blocklist-nouveau.conf"
mode: "0644"
when: ansible_os_family != "Flatcar"

- name: Update initramfs
ansible.builtin.command: "{{ gpu_systemd_networkd_update_initramfs }}"
register: update_initramfs_output
when: (gpu_systemd_networkd_update_initramfs is defined) and (gpu_systemd_networkd_update_initramfs | length > 0)
when: (ansible_os_family != "Flatcar") and (gpu_systemd_networkd_update_initramfs is defined) and (gpu_systemd_networkd_update_initramfs | length > 0)
changed_when: update_initramfs_output.rc == 0

- name: Include AMD
ansible.builtin.include_tasks: amd.yml
when: gpu_vendor == "amd"

- name: Include NVIDIA for Flatcar (sysext)
ansible.builtin.include_tasks: flatcar-nvidia.yml
when: gpu_vendor == "nvidia" and ansible_os_family == "Flatcar"

- name: Include NVIDIA
ansible.builtin.include_tasks: nvidia.yml
when: gpu_vendor == "nvidia"
when: gpu_vendor == "nvidia" and ansible_os_family != "Flatcar"
1 change: 1 addition & 0 deletions images/capi/ansible/roles/providers/tasks/outscale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- cloud-init
- cloud-guest-utils
- cloud-initramfs-dyn-netconf
when: ansible_os_family == "Debian"

- name: Install Debian specific packages
ansible.builtin.apt:
Expand Down
5 changes: 5 additions & 0 deletions images/capi/ansible/roles/sysprep/tasks/flatcar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,8 @@
ansible.builtin.shell: |
echo 'set oem_id="{{ oem_id }}"' >> /usr/share/oem/grub.cfg
when: (oem_id is defined) and (oem_id != "")

- name: Set ignition config URL in grub for metal platform
ansible.builtin.shell: |
echo 'set linux_append="$linux_append ignition.config.url={{ ignition_config_url }}"' >> /usr/share/oem/grub.cfg
when: (ignition_config_url is defined) and (ignition_config_url != "")
2 changes: 2 additions & 0 deletions images/capi/packer/goss/goss-vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ flatcar:
command:
openstack:
command:
outscale:
command:
photon:
common-service:
apparmor:
Expand Down
16 changes: 16 additions & 0 deletions images/capi/packer/outscale/flatcar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"ansible_extra_vars": "ansible_python_interpreter=/opt/bin/python oem_id=metal ignition_config_url=http://169.254.169.254/latest/user-data",
"build_name": "flatcar",
"distribution": "flatcar",
"distribution_release": "{{env `FLATCAR_CHANNEL`}}",
"distribution_version": "{{env `FLATCAR_CHANNEL`}}-{{env `FLATCAR_VERSION`}}",
"image_name": "Ubuntu-24.04-2026-01-12",
"kubernetes_cni_source_type": "http",
"kubernetes_source_type": "http",
"python_path": "/opt/pypy/site-packages",
"root_device_name": "/dev/vda",
"ssh_username": "outscale",
"systemd_prefix": "/etc/systemd",
"sysusr_prefix": "/opt",
"sysusrlocal_prefix": "/opt"
}
Loading