237 Commits

Author SHA1 Message Date
Auke Kok f4af292368 v26. v26 2017-04-28 15:01:37 -07:00
Auke Kok 5f80692011 ucd AWS helper.
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.
2017-04-28 14:48:10 -07:00
Auke Kok a376233cee Update name of the project in 2 more locations.
git grep does not show occurrences of the old name anymore
with this patch.
2016-08-03 12:31:44 -07:00
Julio Montes 061c9dcb2c Merge pull request #23 from ikeydoherty/cleanup2
Various cleanups
2016-07-29 16:09:42 -05:00
Auke Kok eea1e1351f Bump to 25. v25 2016-07-27 14:45:11 -07:00
Ikey Doherty 574c759b30 lib: Ensure pwd_buf is always freed in write_ssh_keys
Prior to this change, a NULL pw_dir would result in pwd_buf being leaked after
write_ssh_keys is called. Granted, it's a minor leak, and only potential, but
should still be fixed regardless.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-27 14:43:52 -07:00
Ikey Doherty bc5f756f33 tests: Ensure global cflags are used here in all cases
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-27 14:43:52 -07:00
Ikey Doherty 94ce3cb2e3 Enforce a stricter, wider, cflags set by default
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>
2016-07-27 14:43:52 -07:00
Ikey Doherty 2c7ba9a934 Replace all instances of clr-cloud-init with micro-config-drive
The project has been renamed from clr-cloud-init to clearly communicate the
scope and target of the project. This change simply ensures all the source
files are now consistent in their agreement of the project name.

The (C) usage was also swapped for ©, simply because it is the proper symbol
and looks better.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-27 14:43:52 -07:00
Ikey Doherty 2e442a832d README: Fix a typo
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-27 14:43:52 -07:00
Auke Kok f5335218b7 Prototype network configuration documentation
- Markup format
- Covers 3 typical use cases
- Hands-on approach explaining the basic configuration steps
  and shows exact content of files needed to be created.
2016-07-27 14:41:01 -07:00
Ikey Doherty 8a9b2433e3 lib: Ensure pwd_buf is always freed in write_ssh_keys
Prior to this change, a NULL pw_dir would result in pwd_buf being leaked after
write_ssh_keys is called. Granted, it's a minor leak, and only potential, but
should still be fixed regardless.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-26 13:38:23 +01:00
Ikey Doherty 54ce87e25b tests: Ensure global cflags are used here in all cases
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-26 13:38:14 +01:00
Ikey Doherty 36623d5591 Enforce a stricter, wider, cflags set by default
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>
2016-07-26 13:38:04 +01:00
Ikey Doherty 9bd2c45480 Replace all instances of clr-cloud-init with micro-config-drive
The project has been renamed from clr-cloud-init to clearly communicate the
scope and target of the project. This change simply ensures all the source
files are now consistent in their agreement of the project name.

The (C) usage was also swapped for ©, simply because it is the proper symbol
and looks better.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-26 13:37:57 +01:00
Ikey Doherty ff53a2c63a README: Fix a typo
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2016-07-26 13:37:48 +01:00
Auke Kok ef081cb2e9 Project rename: clr-cloud-init is now micro-config-drive (ucd). 2016-07-11 10:15:28 -07:00
Julio Montes b4fec921d3 remove network code (#21)
* remove no-network option

Signed-off-by: Julio Montes <julio.montes@intel.com>

* update documentation

Signed-off-by: Julio Montes <julio.montes@intel.com>

* update service files

Signed-off-by: Julio Montes <julio.montes@intel.com>
2016-06-22 15:11:59 -07:00
Auke Kok a214cb1051 Version v24. v24 2016-06-09 13:08:11 -07:00
Auke Kok 774a37baaa Also remove curl tests.
Trivial: no longer build and link curl tests.
2016-06-09 13:07:25 -07:00
Auke Kok 9066ed0443 Update to v23. v23 2016-06-09 13:03:07 -07:00
Auke Kok f9f2dd5b9f Remove CURL support entirely. (#20)
With this change, only config-drive is effectively supported.
2016-06-09 11:33:23 -07:00
Ikey Doherty 1eeece519f Small build fixes (#19)
* 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>
2016-06-08 11:30:57 -07:00
Auke Kok ba270b0cb7 Clean up lengthy if... then... else chain. (#18)
This doesn't need to become an indent nightmare. elif is a good
solution here.

Put tdnf right next to dnf to make it easier to spot it.
2016-05-27 20:47:40 -07:00
Divya Thaluru 087eb25308 Added tdnf package manager (#16) 2016-05-19 10:37:25 -07:00
Julio Montes a3834e9c58 Merge pull request #17 from dthaluru/yum_fix
Updated yum package manager
2016-05-19 09:09:50 -05:00
dthaluru 427736cf72 Updated yum package manager
Added assumeyes as additional argument to yum install command
to automatically answer interactive questions as 'yes'
2016-05-18 11:56:34 -07:00
Julio Montes 2221e13f57 update version from 21 to 22 v22 2016-05-12 16:44:53 -05:00
Auke Kok cd80f41eb0 Update sudo documentation.
clr-cloud-init will now always insert a username as argument
1 on the sudoers file written out, so call that out in the
man page.
2016-05-12 14:30:51 -07:00
Auke Kok 45b46affd6 Allow package manager selection.
Supported package managers are: swupd (default), yum, dnf, apt.

If configure is passwd --with-packagemgr=<pkgmgr>, then the appropriate
calls to dnf/yum etc. are used instead of `swupd`. This affects the
`packge_upgrade' and `packages' directives, exclusively.

This is determined at compile time, without checking for dependencies
being actually present. This seems preferable than to try and determine
at runtime what support is present.
2016-05-12 14:30:46 -07:00
Julio Montes 75f12be586 remove -Werror* gcc options 2016-05-12 14:30:02 -07:00
Julio Montes a102bba258 auto-prepend username to sudo directives
update users.yaml example
2016-05-11 11:23:27 -05:00
Julio Montes cb0e4985ba update version from 20 to 21 v21 2016-04-21 16:12:37 -05:00
Julio Montes 73d1aeb4ea add outdir parameter to curl_fetch_file
files downloaded by curl can be saved in
a safe directory
2016-04-21 14:27:22 -05:00
Julio Montes b24379642e remove PrivateTmp from systemd unit files
this patch is to avoid bugs/issues while userdata
is being processed
2016-04-21 13:54:46 -05:00
Julio Montes 5dddbbdc44 Use clr-cloud-init's datadir instead of /tmp to process data 2016-04-21 13:50:45 -05:00
Julio Montes 5218ce78cf use GHashTable to get and run metadata handlers 2016-04-19 12:05:20 -05:00
Julio Montes 7835df54d2 update version from 19 to 20 v20 2016-04-15 16:50:13 -05:00
Julio Montes 3d5ac4b6b7 fix copy user data file 2016-04-15 16:49:03 -05:00
Julio Montes e3a5bf3eab Process openstack user data once per boot 2016-04-15 16:10:20 -05:00
Julio Montes 9023f624fb add cache to get_boot_id 2016-04-15 16:00:45 -05:00
Julio Montes f278175f6d Process openstack metadata once per boot 2016-04-15 15:53:08 -05:00
Julio Montes 08bf9f07cc add function to get boot id
implement get_boot_id function
2016-04-15 14:42:26 -05:00
Julio Montes aae98b9af5 change default user password when it already exists 2016-04-15 11:54:34 -05:00
Julio Montes b99c8494b8 Fix repeated sudo directives in sudoers files 2016-04-15 11:44:54 -05:00
Julio Montes a7c34ff704 Fix default user not found when no cloud-config is used
add first-boot-setup to cloud-init service
2016-04-15 11:41:39 -05:00
Julio Montes c9748e3350 add condition to create default user account once 2016-04-15 11:31:29 -05:00
Julio Montes 49e1556b81 fix write_file unit test 2016-04-15 10:41:35 -05:00
Julio Montes 55db5e865f fix userdata file not found 2016-04-15 10:30:19 -05:00
Julio Montes fa3099504f fix g_strlcpy assertion when userdata is not found 2016-04-15 10:26:40 -05:00