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

create a local NVMe RAID-0 #3060

Closed
FernandoMiguel opened this issue Apr 27, 2023 · 13 comments
Closed

create a local NVMe RAID-0 #3060

FernandoMiguel opened this issue Apr 27, 2023 · 13 comments
Labels
area/core Issues core to the OS (variant independent) status/icebox Things we think would be nice but are not prioritized type/enhancement New feature or request

Comments

@FernandoMiguel
Copy link

What I'd like:
AL now supports creating RAID of instance store volumes
That work was done in this PR
awslabs/amazon-eks-ami#1171

Could bottlerocket implement the same or similar approach so that EKS nodes benefit from that feature?

@FernandoMiguel FernandoMiguel added status/needs-triage Pending triage or re-evaluation type/enhancement New feature or request labels Apr 27, 2023
@arnaldo2792
Copy link
Contributor

Hey @FernandoMiguel, could you please have a look at this discussion? There are instructions there to create a RAID-0 array for containerd, using bootstrap containers. Will this be sufficient to support your use case?

@FernandoMiguel
Copy link
Author

@arnaldo2792 i rather prefer the native way of al2 to having to modify bottlerocket boot myself with no future garantes it will work.
Hence looking for a similar approach to be implemented into bottlerocket so we can take benefit of instance store disks.

@arnaldo2792 arnaldo2792 added area/core Issues core to the OS (variant independent) status/icebox Things we think would be nice but are not prioritized status/needs-triage Pending triage or re-evaluation and removed status/needs-triage Pending triage or re-evaluation status/icebox Things we think would be nice but are not prioritized labels May 1, 2023
@stevehipwell
Copy link

@arnaldo2792 I think having an OCI image able to run arbitrary scripts, as requested in #2010, would make it easier to manually implement this as a short term solution. But ideally an API configuration to enable this would be my preference.

CC @bwagner5

@zmrow
Copy link
Contributor

zmrow commented May 4, 2023

Thanks for bringing this to our attention @stevehipwell and @FernandoMiguel ! We aren't currently working on this, but will follow up here if/when we start in on it.

@denraf
Copy link

denraf commented Jul 28, 2023

The problem with the boot container is that karpenter is not aware of the ephemeral ssd storage on an instance type like c6id.

@bryantbiggs
Copy link
Contributor

The problem with the boot container is that karpenter is not aware of the ephemeral ssd storage on an instance type like c6id.

Sure it is, you can query that from the AWS EC2 API

@denraf
Copy link

denraf commented Aug 10, 2023

The problem with the boot container is that karpenter is not aware of the ephemeral ssd storage on an instance type like c6id.

Sure it is, you can query that from the AWS EC2 API

Unfortunately not.
E.g. c6id.2xlarge
https://karpenter.sh/preview/concepts/instance-types/#c6id2xlarge
ephemeral-storage: 17G

Draft PR to resolve it for AL2: aws/karpenter-provider-aws#3827
In that PR it is stated work is needed in bottlerocket to support that.
Which brings us back to this issue.

@bryantbiggs
Copy link
Contributor

I think you are mixing "native support in Karpenter" and "Karpenter is not aware of the ephemeral ssd storage"

You can enable this today with Karpenter, its just not as smooth as if its handled natively - https://github.com/awslabs/data-on-eks/blob/8a95736c1e7c1823c3c5944ffc469857db8ec6c9/analytics/terraform/spark-k8s-operator/karpenter-provisioners/spark-compute-optimized-provisioner.yaml#L74-L78

@denraf
Copy link

denraf commented Aug 10, 2023

That's for AL2, not for bottlerocket.

@bryantbiggs
Copy link
Contributor

I believe this should be resolved on the next release with bottlerocket-os/bottlerocket-core-kit#15

@stevehipwell
Copy link

Can this issue be closed if it's been released?

@yeazelm
Copy link
Contributor

yeazelm commented Oct 4, 2024

As of Bottlerocket 1.22.0, users can specify bootstrap commands to format ephemeral disks on first boot and mount several key directories on that newly created filesystem.

For k8s variants, this involves passing the following user-data:

[settings.bootstrap-commands.000-format-ephemeral-storage]
commands = [[ "apiclient", "ephemeral-storage", "init"],
["apiclient", "ephemeral-storage", "bind", "--dirs", "/var/lib/containerd", "/var/lib/kubelet", "/var/log/pods"]]
essential = true
mode = "always"

And for ECS variants, this involves passing the following user-data:

[settings.bootstrap-commands.000-format-ephemeral-storage]
commands = [[ "apiclient", "ephemeral-storage", "init"],
["apiclient", "ephemeral-storage", "bind", "--dirs", "/var/lib/containerd", "/var/lib/docker", "/var/log/ecs"]]
essential = true
mode = "always"

This is safe to pass to instances that have zero, one, or many local ephemeral disks and will format the local storage if needed, then mount that storage, and finally bind mount the provided directories on this storage. If there are no local disks, it will safely exit without doing anything to the existing mounts.

@yeazelm
Copy link
Contributor

yeazelm commented Oct 15, 2024

https://bottlerocket.dev/en/os/1.22.x/concepts/bootstrap-commands/#configure-ephemeral-disks documents how to use bootstrap commands to create a local NVMe RAID0 disk. Closing this ticket now that the docs are available.

@yeazelm yeazelm closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues core to the OS (variant independent) status/icebox Things we think would be nice but are not prioritized type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants