#cloud-config
packages:
- rename
users:
- default
- name: tabrez
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
ssh_import_id:
- gh:tabrez
runcmd:
- sudo -u tabrez git clone --depth 1 https://gitlab.com/tabrez/minimal-config.git /home/tabrez/minimal-config
- rm -rf /home/tabrez/minimal-config/.git
- find /home/tabrez/minimal-config -type f -execdir bash -c 'mv "{}" "/home/tabrez/.$(basename {})"' \;
- rm -rf /home/tabrez/minimal-config
Run: multipass launch -n min-box --cloud-init cloud-config.yaml
Command for iterating fast: multipass delete --purge min-box && multipass launch --timeout 900 -n min-box --cloud-init cloud-config.yaml && multipass info min-box
Connect as user tabrez: ssh tabrez@ip-address
Copy private ssh key if you want:
multipass transfer C:\Users\iqbal\.ssh\id_rsa min-box:/home/ubuntu/.ssh/id_rsa
# inside min-box as `tabrez` user
# ssh tabrez@ip-address-of-vm (multipass info min-box)
cd ~
sudo cp ../ubuntu/.ssh/id_rsa ./.ssh/
chown tabrez:tabrez ./ssh/id_rsa
chmod 600 ./.ssh/id_rsa
- git clone dominus
- install docker, docker-compose, k3d, etc.