Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Where are the logs for my user-data script? cloud-init

Writer Sebastian Wright

If I paste a shell script into the user-data box when starting the standard Ubuntu AMI on EC2, I'm using cloud-init, am I not? My question is where does it log the output of such a script? Do I have to do something to turn logging on? I can't find logs for it anywhere.

Ubuntu-raring-13.04-amd64-server-20130423 (ami-c30360aa)

Thanks!

1

2 Answers

Output of your program is available on the console log. You can get that either from the aws console, or by calling the GetConsoleOutput via the api (or with a tool such as euca-get-console-output or ec2-get-console-output).

Additionally, you can tell cloud-init to log the output of those commands by providing user-data that tells it to.

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

You can provide multi-part input to give both '#!' scripts and cloud-config as shown above. See for an example of how to do that.

You will found all log in the following folder :

/var/log/installer/

You can find there after installation too. Interesting file :

/var/log/installer/installer-journal.txt
/var/log/installer/autoinstall-user-data
/var/log/installer/curtin-install.log

Hop it's help

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy