Firecracker, do not use, it sucks
This commit is contained in:
parent
81a0ce0248
commit
2552ada812
57
provision-pinky/firecracker.yml
Normal file
57
provision-pinky/firecracker.yml
Normal file
@ -0,0 +1,57 @@
|
||||
# Setup Firecracker for VMs
|
||||
- name: Firecracker
|
||||
hosts: servers
|
||||
become_method: ansible.builtin.sudo
|
||||
become: true
|
||||
tasks:
|
||||
- name: Get firecracker
|
||||
become: false
|
||||
ansible.builtin.get_url:
|
||||
url: https://github.com/firecracker-microvm/firecracker/releases/download/v1.7.0/firecracker-v1.7.0-aarch64.tgz
|
||||
dest: ~ralsina/firecracker.tgz
|
||||
mode: '0644'
|
||||
- name: Get kernel
|
||||
become: false
|
||||
ansible.builtin.get_url:
|
||||
url: https://s3.amazonaws.com/spec.ccfc.min/img/quickstart_guide/aarch64/kernels/vmlinux.bin
|
||||
dest: ~ralsina/vmlinux.bin
|
||||
mode: '0644'
|
||||
- name: Get root image
|
||||
become: false
|
||||
ansible.builtin.get_url:
|
||||
url: https://s3.amazonaws.com/spec.ccfc.min/img/quickstart_guide/aarch64/rootfs/bionic.rootfs.ext4
|
||||
dest: ~ralsina/bionic.rootfs.ext4
|
||||
mode: '0644'
|
||||
- name: Unpack firecracker
|
||||
become: false
|
||||
ansible.builtin.unarchive:
|
||||
src: ~ralsina/firecracker.tgz
|
||||
dest: ~ralsina
|
||||
remote_src: true
|
||||
- name: Install firecracker
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
cmd: mv /home/ralsina/release-v1.7.0-aarch64/firecracker-v1.7.0-aarch64 /usr/bin/firecracker
|
||||
creates: /usr/bin/firecracker
|
||||
- name: Setup systemd unit for firecracker
|
||||
become: true
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/system/firecracker.service
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Firecracker VM Manager
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/firecracker --api-sock /tmp/firecracker.socket
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
mode: '0644'
|
||||
- name: Start and enable service
|
||||
become: true
|
||||
ansible.builtin.service:
|
||||
name: firecracker
|
||||
state: started
|
||||
enabled: true
|
@ -3,4 +3,5 @@ pinky ansible_user=ralsina
|
||||
rocky ansible_user=ralsina
|
||||
|
||||
[servers:vars]
|
||||
ansible_connection=ssh
|
||||
ansible_connection=ssh
|
||||
ansible_python_interpreter=/usr/bin/python3
|
Loading…
Reference in New Issue
Block a user