filmov
tv
How to re-run and debug cloud-init manually

Показать описание
The script only runs at first boot of the machine via cloud-init. If you execute the cloud-init command again it will not execute the script because it already did it. Testing and debugging the script can be quite intensive if you need to boot up a machine every time.
We can however fool cloud-init by letting it think the machine did a fresh first boot. We need to remove the following two files:
/var/lib/cloud/instances/$UUID/boot-finished
/var/lib/cloud/instances/$UUID/sem/config_scripts_user
Replace $UUID by your instance's UUID.
Execute the following command to run the cloud-init final module again:
cloud-init modules --mode final
The final module will execute our user_data script again. Before every new test run you need to remove the two files listed above.
Keep in mind as well that if you for example touch a file and run the script again, the file will still be there. Changes are persistent, build your code idempotent so that it handles that.
If you've by accident deleted to much cloud-init data you can re-initialize it with the following command:
cloud-init init
We can however fool cloud-init by letting it think the machine did a fresh first boot. We need to remove the following two files:
/var/lib/cloud/instances/$UUID/boot-finished
/var/lib/cloud/instances/$UUID/sem/config_scripts_user
Replace $UUID by your instance's UUID.
Execute the following command to run the cloud-init final module again:
cloud-init modules --mode final
The final module will execute our user_data script again. Before every new test run you need to remove the two files listed above.
Keep in mind as well that if you for example touch a file and run the script again, the file will still be there. Changes are persistent, build your code idempotent so that it handles that.
If you've by accident deleted to much cloud-init data you can re-initialize it with the following command:
cloud-init init
How to re-run and debug cloud-init manually
Effortlessly Navigate Debugging in IntelliJ IDEA 🐞
Debugging and Fixing Error
How to enable wireless debugging | USB enable kaise kare #viral shorts #shorts feed
CMD Trick to Boost Your PC Performance in Seconds
How To Debug React Apps Like A Senior Developer
USB debugging Connoted Mode ON Useful 🔥#Shorts Sports#youtube
How programmers debug code #softwareengineer #programming #coding #code #programminghumor
🔍 Monitor Tab in ADF Explained | Track Your Pipelines Like a Pro!
Resolved: Samsung Galaxy One UI 6.0 USB debugging unavailable #samsung #oneui6
How to Fix Your SLOW PC!! #brewsterisalive #pcgaming
Fixed Start Debugging Option is Disabled in Visual Studio | Run and Debug not Working Visual Studio
Spring Application Error | Application Failed To Start
How to Rerun Pipeline from Point of Failure in Azure Data Factory- ADF Tutorial 2021
How to Rerun Pipeline from Point of Failure in adf | check points in adf | adf tutorial part 75
Run Debug Configuration in IntelliJ (and Spring Boot)
The Best Practice to Fix Cursor AI Code
Minecraft's Secret Gamemode!
hidden menu on the xbox series x/s
Insane hidden Minecraft commands!
How to debug test code faster? #softwaretesting #testing
How to Run code (program) in the terminal in VS Code! 🚀💻 #VSCode
Windows has a hidden malware removal tool | #shorts #trending #mrt #malware
How to hold ILLEGAL items in Minecraft
Комментарии