|
978.
|
|
|
The <application>cloud-init</application> package provides "first boot" functionality for the Ubuntu UEC images. It is in charge of taking the generic filesystem image that is booting and customizing it for this particular instance. That includes things like:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/virtualization.xml:1944(para)
|
|
979.
|
|
|
Setting the hostname.
|
|
|
|
Makine adı ayarlanıyor.
|
|
Translated by
Connor Imes
|
|
|
|
Located in
serverguide/C/virtualization.xml:1952(para)
|
|
980.
|
|
|
Putting the provided ssh public keys into <filename>~ubuntu/.ssh/authorized_keys</filename>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/virtualization.xml:1957(para)
|
|
981.
|
|
|
Running a user provided script, or otherwise modifying the image.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/virtualization.xml:1962(para)
|
|
982.
|
|
|
Setting hostname and configuring a system so the person who launched it can actually log into it are not terribly interesting. The interesting things that can be done with <application>cloud-init</application> are made possible by data provided at launch time called <ulink url="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1085">user-data</ulink>.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/virtualization.xml:1968(para)
|
|
983.
|
|
|
First, install the <application>cloud-init</application> package:
|
|
|
|
Önce, <application>cloud-init</application> paketini kur:
|
|
Translated by
Connor Imes
|
|
|
|
Located in
serverguide/C/virtualization.xml:1974(para)
|
|
984.
|
|
|
sudo apt-get install cloud-init
|
|
|
|
sudo apt-get install cloud-init
|
|
Translated by
Connor Imes
|
|
|
|
Located in
serverguide/C/virtualization.xml:1979(command)
|
|
985.
|
|
|
If the user-data starts with <emphasis>'#!'</emphasis>, then it will be stored and executed as root late in the boot process of the instance's first boot (similar to a traditional 'rc.local' script). Output from the script is directed to the console.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
serverguide/C/virtualization.xml:1982(para)
|
|
986.
|
|
|
For example, create a file named <filename>ud.txt</filename> containing:
|
|
|
|
Örneğin şunları içeren <filename>ud.txt</filename> adında bir dosya oluşturun:
|
|
Translated by
Connor Imes
|
|
|
|
Located in
serverguide/C/virtualization.xml:1987(para)
|
|
987.
|
|
|
![](/@@/translation-newline)
#!/bin/sh ![](/@@/translation-newline)
echo ========== Hello World: $(date) ========== ![](/@@/translation-newline)
echo "I have been up for $(cut -d\ -f 1 < /proc/uptime) sec"
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
![](/@@/translation-newline)
#!/bin/sh ![](/@@/translation-newline)
echo ========== Merhaba Dünya: $(date) ========== ![](/@@/translation-newline)
echo "$(cut -d\ -f 1 < /proc/uptime) saniyedir çalışıyorum"
|
|
Translated by
Connor Imes
|
|
|
|
Located in
serverguide/C/virtualization.xml:1991(programlisting)
|