Skip to content

Commit cc25260

Browse files
committed
[build] Add named configuration for public cloud environments
Add a named CONFIG=cloud configuration, which enables console types useful for obtaining output from virtual machines in public clouds such as AWS EC2. An image suitable for use in AWS EC2 can be built using make bin/ipxe.usb CONFIG=cloud EMBED=config/cloud/aws.ipxe The embedded script will direct iPXE to download and execute the EC2 "user-data" file, which is always available to an EC2 VM via the URI http://169.254.169.254/latest/user-data (regardless of the VPC networking settings). The boot can therefore be controlled by modifying the per-instance user data, without having to modify the boot disk image. Console output can be obtained via syslog (with a syslog server configured in the user-data script), via the AWS "System Log" (after the instance has been stopped), or as a last resort from the log partition on the boot disk. Signed-off-by: Michael Brown <mcb30@ipxe.org>
1 parent 8af8886 commit cc25260

File tree

9 files changed

+38
-0
lines changed

9 files changed

+38
-0
lines changed

src/config/cloud/aws.ipxe

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!ipxe
2+
3+
echo Amazon EC2 - iPXE boot via user-data
4+
ifstat ||
5+
dhcp ||
6+
route ||
7+
chain -ar http://169.254.169.254/latest/user-data

src/config/cloud/colour.h

Whitespace-only changes.

src/config/cloud/console.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Console configuration suitable for use in public cloud
3+
* environments, or any environment where direct console access is not
4+
* available.
5+
*
6+
*/
7+
8+
/* Log to syslog(s) server
9+
*
10+
* The syslog server to be used must be specified via e.g.
11+
* "set syslog 192.168.0.1".
12+
*/
13+
#define CONSOLE_SYSLOG
14+
#define CONSOLE_SYSLOGS
15+
16+
/* Log to serial port
17+
*
18+
* Note that the serial port output from an AWS EC2 virtual machine is
19+
* generally available (as the "System Log") only after the instance
20+
* has been stopped.
21+
*/
22+
#define CONSOLE_SERIAL
23+
24+
/* Log to partition on local disk
25+
*
26+
* If all other log mechanisms fail then the VM boot disk containing
27+
* the iPXE image can be detached and attached to another machine in
28+
* the same cloud, allowing the log to be retrieved from the log
29+
* partition.
30+
*/
31+
#define CONSOLE_INT13

src/config/cloud/crypto.h

Whitespace-only changes.

src/config/cloud/general.h

Whitespace-only changes.

src/config/cloud/serial.h

Whitespace-only changes.

src/config/cloud/settings.h

Whitespace-only changes.

src/config/cloud/sideband.h

Whitespace-only changes.

src/config/cloud/usb.h

Whitespace-only changes.

0 commit comments

Comments
 (0)