Skip to content

Instantly share code, notes, and snippets.

@toniher
Last active October 18, 2022 18:13
Show Gist options
  • Save toniher/72d596271690d273c2f741e40a9eed16 to your computer and use it in GitHub Desktop.
Save toniher/72d596271690d273c2f741e40a9eed16 to your computer and use it in GitHub Desktop.
Cloud init setup for testing Amazon Linux 2 image in a Virtualbox environment
local-hostname: biocore
network-interfaces: |
auto eth0
iface eth0 inet dhcp
#cloud-config
#vim:syntax=yaml
users:
- default
chpasswd:
list: |
ec2-user:barcelonaSUN
write_files:
- path: /etc/cloud/cloud.cfg.d/80_disable_network_after_firstboot.cfg
content: |
network:
config: disabled:
runcmd:
- [ sudo, yum, update, -y ]
- [ sudo, amazon-linux-extras, install, epel ]
- [ sudo, yum, install, s3fs-fuse, git, wget, tree, -y ]
- [ sudo, yum, install, docker, -y ]
- [ sudo, usermod, -aG, docker, ec2-user ]
- echo "$(id -un):100000:65536" | sudo tee -a /etc/subuid
- echo "$(id -un):100000:65536" | sudo tee -a /etc/subgid
- [ sudo, systemctl, start, docker ]
- [ sudo, systemctl, enable, docker ]
- sudo sudo yum install -y libseccomp-devel squashfs-tools cryptsetup
- sudo yum install -y https://github.com/apptainer/singularity/releases/download/v3.8.7/singularity-3.8.7-1.x86_64.rpm
- [ sudo, amazon-linux-extras, install, java-openjdk11 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment