Instead of keep duplicating existing code, we can make this program
a little bit more versatile and cover all 3 use cases and add some
extensibility for further additions.
A static table describes what needs fetching and from where. The
rest is logically the same and so the delta isn't so bad.
We add tencent cloud support on top of this.
The ucd-aws program fetches the user-data for an AMI instance
over http from 169.254.169.254, and passes it back to ucd.
The service is not supposed to be enabled unless you are running
on AWS, as it is highly specific to that cloud.
This will ensure that more compilation issues will be detected in future
development, ensuring a clean codebase.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
* Make -Werror a compile time option
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
* Ensure test suite builds with -Wl,--as-needed
The linking order is highly important to libtool. Previously we would link
the COMMON_LDADD libraries to the binaries, however no symbols were used so
binutils linker wouldn't link the libraries involved. Next we would link
libtest.la, a static convenience library, and fail at dynamic linking due
to the symbols only being used in this later-added libraries.
The solution is to first link the convenience library, and then link to the
shared libraries, in order for -Wl,--as-needed behaviour to function correctly
and only link the absolutely required libraries.
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
cloud-init-pre-network:
runs before network service.
this service gets metadata from local datasources
in order to configure network stuff before network service
and configures the instance on its first booot
cloud-init:
runs after network service and will get userdata/metadata
from datasources(local/network). This service fixes disk
and filesystem
add first-boot-setup and no-network options
update documentation
cloud-init-firstboot service will do initial tasks
* create and set up default user
* get and process metadata/userdata from datasources
* disable root login
this service will run once (firstboot)
cloud-init service won't run at the first boot
but it will do at next boot times
* verify/fix/resize/grow up partitions and filesystems
* get and process userdata from datasources (TODO: optional)
add blkid library
functions:
* disk_for_path: is a useful function to get
the disk path where a specific is mounted
for instance: / -> /dev/sda
* disk_resize_grow: resizes/grows partitions and filesystems
this function uses the last disk partition/filesystem
for resize it