79 Commits
Author SHA1 Message Date
Julio Montes 53324512b7 update version from 7 to 8 v8 2015-12-10 10:34:27 -06:00
Julio Montes 5ac625c5db fix spawn commands 2015-12-10 10:30:27 -06:00
Julio Montes 3837262be2 update firstboot service 2015-12-09 12:16:57 -06:00
Julio Montes d3b7e6cee4 update help menu and man pages 2015-12-09 10:19:43 -06:00
Julio Montes 03ab1a2f2c update version from 6 to 7 v7 2015-12-08 15:15:59 -06:00
Julio Montes df2541a4fd fix spawn commands 2015-12-08 15:14:47 -06:00
Julio Montes 4661ac8cc9 Ensure we use the explicit path to binaries 2015-12-08 11:28:55 -06:00
Julio Montes d7e0add7b1 update firstboot service to process userdata and metadata at first boot 2015-12-07 16:13:55 -06:00
Julio Montes 40203e6bee add openstack-user-data and openstack-metadata options
update man pages
2015-12-07 16:03:07 -06:00
Julio Montes 74470eda09 update version from 5 to 6 v6 2015-12-02 09:12:33 -06:00
Julio Montes e19f39ed03 add time to logs 2015-12-02 09:07:31 -06:00
Julio Montes b66290a45e update .gitignore
add files/directories generated by unit tests to .gitignore
2015-12-01 14:40:54 -06:00
Julio Montes d41da9c997 using SYSCONFDIR define
change g_strlcat by g_strlcpy in envar module
2015-12-01 10:19:54 -06:00
Julio Montes b4ba31b3d0 remove write_envar function
remove write_envar function because is a specialized
version of write_file

add config define SYSCONFDIR
2015-12-01 10:08:53 -06:00
Julio Montes 19734ef259 improve write_* functions
write_sudo_string is renamed to write_sudo_directives
write_ssh_key is renamed to write_ssh_keys

now these functions use buffers to improve
access to disk (open/write/close functions)
2015-11-30 16:29:32 -06:00
Julio Montes 3c94634676 implement envar module
update cloud-config man page
update examples
2015-11-30 15:10:23 -06:00
Julio Montes 7d330ee7d1 add function to write environment variables in /etc/profile.d/ 2015-11-30 15:06:14 -06:00
Julio Montes 77ae5cafe0 update examples
add missing examples
remove unsupported examples
2015-11-27 16:56:06 -06:00
Julio Montes 703b7cdcd2 update version from 4 to 5 v5 2015-11-27 14:36:22 -06:00
Julio Montes 457a41b261 update cloud-config documentation
update hostname and runcmd doc
2015-11-27 12:49:31 -06:00
Julio Montes 85dcda040f implement runcmd ccmodule
this module is able to execute command lines
2015-11-27 12:46:42 -06:00
Julio Montes d4963adb31 remove new line in output and error logs 2015-11-27 12:41:42 -06:00
Julio Montes e92fd7cb02 update .gitignore
ignore files generated by unit tests
2015-11-27 10:43:07 -06:00
Julio Montes 6b8758147c add unit test for chown_path 2015-11-27 10:40:08 -06:00
Julio Montes 7e64fbd558 add unit tests for lib
add exec_test unit test
add option --disable-tests do not build unit tests
2015-11-26 12:26:56 -06:00
Julio Montes 97b7691f3b add exec_task standard output to logging system 2015-11-26 12:01:21 -06:00
devimc c4fbe3232f Merge pull request #6 from ikeydoherty/fixes_rebase
Fixes rebase
2015-11-25 10:47:17 -06:00
Ikey Doherty 24b84ba453 Make write_ssh_key bool for clarity, ensure return value
In future we should convert openstack_metadata_keys to a boolean function,
and make sure it breaks iteration of the GNode when hitting a failure,
similar to other areas within clr-cloud-init

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:29:59 +00:00
Ikey Doherty 3f93a3b249 Make write_sudo_string bool for clarity, ensure return value is used
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:29:27 +00:00
Ikey Doherty 356fc5c1df lib: Ensure return values aren't ignored for errno types
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:44 +00:00
Ikey Doherty 5579bb59f5 debug: Also catch unused parameter
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:15 +00:00
Ikey Doherty 3f012a00db Update .gitignore to ignore *.plist from scan-build
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:28:00 +00:00
Ikey Doherty 939a0ffe76 write_files: Address potential memory leak found in static analysis
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:27:46 +00:00
Ikey Doherty d60802812b Strengthen flags to fix unused variables and unsigned vs signed comparison
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:27:18 +00:00
Ikey Doherty a0952e55f2 Fix prototype for exec_task
This was introduced in d259dacf5b

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:24:00 +00:00
Ikey Doherty 842cda7924 Update README with complete dependency list
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:53 +00:00
Ikey Doherty c8c6482c42 disk: Ensure we use the explicit path to resize2fs
On some configurations, /sbin and /usr/sbin may not even be in the $PATH,
meaning that the configure routine would fail if this is where resize2fs
lives. Secondly, we must ensure that disks now uses this explicit path.

This ensures correct functionality during non privileged testing, and
consistency with installed behaviour.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:49 +00:00
Ikey Doherty 880e0bc84e Drop libparted requirement to 3.1, 3.2 isn't explicitly needed
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2015-11-25 16:21:44 +00:00
Julio Montes 8a655b0b5c update version from 3 to 4 v4 2015-11-24 13:56:08 -06:00
Julio Montes d259dacf5b reimplement exec_task function 2015-11-24 13:52:50 -06:00
Julio Montes bbd77c21a8 enable cloud-init-firstboot service
Signed-off-by: Julio Montes <julio.montes@intel.com>
2015-11-24 10:14:32 -06:00
Julio Montes 0be3c8ebf5 implement hostname module
this module is able to set the system's hostname

add hostname module documentation
update userdata test file
2015-11-20 16:59:08 -06:00
devimc 0c835d688c Merge pull request #3 from cgwalters/autogen-buildapi
autogen: Honor NOCONFIGURE environment variable
2015-11-20 15:48:53 -06:00
Julio Montes a67cbc9a85 update version from v2 to v3 v3 2015-11-20 15:42:58 -06:00
Colin Walters 9b71c00e26 autogen: Honor NOCONFIGURE environment variable
See https://github.com/cgwalters/build-api/ for rationale.
2015-11-20 16:01:36 -05:00
Julio Montes 89cbfb4313 add cloud-init-firstboot service
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)
2015-11-20 11:06:40 -06:00
Julio Montes 71d7ebe86b update docs
add no-growpart doc
2015-11-20 10:53:11 -06:00
Julio Montes 31b04b7a89 update version from v1 to v2 v2 2015-11-19 16:10:44 -06:00
Julio Montes 29b0f75036 fix partition/filesystem resizing and growing
remove get_partition function because now we have
other functions to manipulate disks
2015-11-19 15:56:06 -06:00
Julio Montes 9a34076e96 add functions to manipulate disks
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
2015-11-19 15:41:15 -06:00