diff --git a/cloud-init_method/README.md b/cloud-init_method/README.md index 0a8745d..523b322 100644 --- a/cloud-init_method/README.md +++ b/cloud-init_method/README.md @@ -1,5 +1,5 @@ # Auto setup of debian vm with cloud image + cloudinit method -First download cloud generic image with `init.sh` +First download cloud generic image with `init.sh` then `build_config.sh`. Then `run.sh` diff --git a/cloud-init_method/generate-config.sh b/cloud-init_method/build_config.sh similarity index 100% rename from cloud-init_method/generate-config.sh rename to cloud-init_method/build_config.sh diff --git a/cloud-init_method/cloud-init-config/user-data.yaml b/cloud-init_method/cloud-init-config/user-data.yaml index c20cfab..ef40c40 100644 --- a/cloud-init_method/cloud-init-config/user-data.yaml +++ b/cloud-init_method/cloud-init-config/user-data.yaml @@ -1,11 +1,13 @@ #cloud-config -hostname: jpplandhost +hostname: sandboxvm +disable_root: false groups: - - jppland + - sandbox users: - - default - - calyjohn - - name: mbess + - name: root + ssh_authorized_keys: + - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBeNeE0gk6mO0Bz9dDvKQrhA2Oo7x05FicCQJivxqIyi sandbox" + - name: demo passwd: "$6$QQuYYEMEG0bJf7iH$mhFeXl10jSQhFO8ltMAi3CtoGLOz5tPdnEBTcp.4JzS5mnBbpANvm9s.VQFMvWq8nfzgzdDZMGr1hnZLGVd2V." #root sudo: ALL=(ALL) NOPASSWD:ALL groups: sudo @@ -13,10 +15,3 @@ users: lock_passwd: false ssh_authorized_keys: - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBeNeE0gk6mO0Bz9dDvKQrhA2Oo7x05FicCQJivxqIyi sandbox" - -write_files: - - encoding: gzip - content: !!binary | - H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA= - path: /usr/bin/hello - permissions: '0755' diff --git a/cloud-init_method/run.sh b/cloud-init_method/run.sh index ba0ccb8..67e8cbf 100755 --- a/cloud-init_method/run.sh +++ b/cloud-init_method/run.sh @@ -8,6 +8,6 @@ qemu-system-x86_64 \ -hda ./debian-12-generic-amd64.qcow2 \ -drive driver=raw,file=./cloud-init-config/out/seed.iso,if=virtio \ -net nic \ - -net user,hostfwd=tcp::2222-:22 + -net user,hostfwd=tcp::2322-:22 #-smbios type=1,serial=ds='nocloud;s=http://10.0.2.2:8000/'