258 Commits

Author SHA1 Message Date
Auke Kok 45e7443579 v33 v33 2018-09-06 09:29:28 -07:00
Auke Kok bfc2d427be AWS: Do not assume the HTTP server supports keep-alive.
On some of the computational AWS instances, the HTTP service at
169.254* does not support HTTP/1.0 keep-alive. This causes the
second part of the user-data not to be transferred and results
in an error during the execution of ucd-aws. Subsequently, the
SSH key never gets provisioned by `ucd`. The result is an unusable
AWS instance that can't be remotely logged into.

Instead, we just terminate and reconnect for the second HTTP
request, reusing some memory where we can. This is a minute
bit slower, and doesn't really come at a size penalty either,
since it's just the same functions being used.
2018-09-06 09:26:29 -07:00
Auke Kok 48be37060f v32 v32 2018-08-09 14:27:09 -07:00
Auke Kok 58f50b83c8 Do not run initial setup async.
Since we have another task also run `usermod` as well, these
might bump into a lock file for /etc/ files and fail, leaving
the system unable to login a normal user.
2018-08-09 14:24:02 -07:00
Auke Kok 382d455f0f v31 v31 2018-05-14 15:07:35 -07:00
William Douglas abe84ebe5d Fix logic for testing HTTP errors
Change to test if HTTP code is < 200 or > 299 rather than being both <
200 and > 299.
2018-05-14 15:05:49 -07:00
William Douglas bfadb7b09f Add Oracle Cloud support
Enable ucd to work within the Oracle Cloud environment. In this case
it involves creating the opc user and provisioning the ssh public
key.
2018-05-14 15:05:49 -07:00
Auke Kok 7e7755ac37 Fix typo (wiht->with) 2017-11-13 10:45:45 -08:00
Auke Kok 2157df468b v30 v30 2017-07-11 12:24:49 -07:00
Auke Kok 40f0588d19 Check in the man page output as well for ucd-aws.1 2017-06-30 12:37:59 -07:00
Auke Kok 3784aea67a meta-data: process public_keys
This adds support for parsing openstack meta-data.json files in
config-2 filesystems and extracting and installing any SSH pubkeys
into the default user account.

In order to properly parse a config-2 json blob outside of the normal
openstack early initialization, we need to fill the parser table
properly and clean it up.

This exposes some flaws in other parts of this code that appear that
this wasn't entirely fully tested. I have not yet confirmed that
in a config-2 scenario everything actually automatically works yet,
this remains to be done.
2017-06-30 12:31:56 -07:00
Auke Kok 3117776034 Update man page result. 2017-06-26 10:16:33 -07:00
Auke Kok ff9fc02f35 v29 v29 2017-06-09 15:15:13 -07:00
Auke Kok b83cd00521 Add ucd-aws(1) man page. 2017-06-07 14:34:51 -07:00
Auke Kok 590b3aab6a Convert man pages to .md format, add ronn to Makefile.am. 2017-06-07 13:58:18 -07:00
Auke Kok 89bc08e5b4 v28 v28 2017-05-05 15:36:35 -07:00
Auke Kok 9d13049eb3 Fetch both ssh key and userdata in one http conversation. 2017-05-05 15:34:52 -07:00
Auke Kok 5056dc93ef Do not hard code path to ucd binary, instead pass $bindir 2017-05-02 10:28:21 -07:00
Auke Kok 5531716c67 Makedev will be in <sys/sysmacros.h>. 2017-05-02 10:10:46 -07:00
Auke Kok 4e21debad3 Convert to agreed upon code style for braces. 2017-05-02 10:08:50 -07:00
Auke Kok f275bf1eef ucd-aws: install unit file, compile with AM_CFLAGS v27 2017-04-28 15:11:10 -07:00
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