forked from chef/bento
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DigitalOcean import step to debian-10.6-amd64.json
- Loading branch information
1 parent
45bb130
commit 705bbfd
Showing
3 changed files
with
107 additions
and
5 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,25 @@ | ||
#!/bin/sh -eux | ||
|
||
apt-get -y install cloud-init | ||
tee /etc/cloud/cloud.cfg.d/00_generic.cfg << EOF | ||
datasource_list: [ DigitalOcean, None ] | ||
datasource: | ||
DigitalOcean: | ||
retries: 3 | ||
timeout: 2 | ||
growpart: | ||
mode: auto | ||
devices: | ||
- /dev/vda2 | ||
- /dev/vda5 | ||
ignore_growroot_disabled: false | ||
# HACK: Buster's cloud-utils doesn't grow LVM volumes. Fixed in cloud-utils 0.31, but that version | ||
# only resizes physical volumes, not logical volumes inside them. So, whatever, do it manually. | ||
# From: https://github.com/mmickan/desployer/blob/master/seed-files/cloud-config | ||
runcmd: | ||
- [ cloud-init-per, once, grow_VG, pvresize, /dev/vda5 ] | ||
- [ cloud-init-per, once, grow_LV, lvextend, -r, -l, "+100%FREE", /dev/debian-10-vg/root ] | ||
EOF | ||
|
||
cloud-init clean | ||
fstrim -a |