Where to find logs for a cloud-init user-data script?

后端 未结 3 1547
温柔的废话
温柔的废话 2021-02-18 19:52

I\'m initializing spot instances running a derivative of the standard Ubuntu 13.04 AMI by pasting a shell script into the user-data field.

This works. The script runs. B

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-18 20:24

    You could create a cloud-config file (with "#cloud-config" at the top) for your userdata, use runcmd to call the script, and then enable output logging like this:

    output: {all: '| tee -a /var/log/cloud-init-output.log'}
    

提交回复
热议问题