When developing a new Initialization script or fixing a problem in an existing script, there is often an ongoing, back and forth process of updating and testing until the script is finalized.
The process looks like this:
- Identify the compute instance on which the script has not worked as expected, connect to it by SSH or RDP and find the output logs.
- Based on the output logs in the script, find the line that requires a change and update it.
- In your troubleshooting session, interactively test the change you made to the script by following these steps:
- Simulate the environment variables.
For more information about simulating environment variables, see Simulating the Application Environment Variables. - Manually run your updated command.
- Simulate the environment variables.
- Once your test works and you know how to resolve the problem, commit a new version of your script to your blueprint repository.
- Test the updated deployment by ending the failed sandbox and deploying a new one.
TIP: To easily find Initialization script errors in your output log files, make sure that your script ends immediately on error and writes helpful data to the output. For example, in Linux VMs, in the beginning of your script run set –e to ensure the script stops on error.
Comments
0 comments
Please sign in to leave a comment.