Browse Source

[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>
tags/v1.20.1
Michael Brown 8 years ago
parent
commit
cc252605ce

+ 7
- 0
src/config/cloud/aws.ipxe View File

@@ -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

+ 0
- 0
src/config/cloud/colour.h View File


+ 31
- 0
src/config/cloud/console.h View File

@@ -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

+ 0
- 0
src/config/cloud/crypto.h View File


+ 0
- 0
src/config/cloud/general.h View File


+ 0
- 0
src/config/cloud/serial.h View File


+ 0
- 0
src/config/cloud/settings.h View File


+ 0
- 0
src/config/cloud/sideband.h View File


+ 0
- 0
src/config/cloud/usb.h View File


Loading…
Cancel
Save