Commit Graph

8 Commits (bbf29137282769f6c96123fe92babe41ea64e625)

Author SHA1 Message Date
Tomas Sedovic b8eefd1de9 Don't create cloud-init user unless specified
When the the instance_user value from heat.conf is set to empty string/None and
the user doesn't specify Server's admin_user property, Heat will not create a
custom cloud-init user.

The instance_user config option and admin_user property are deprecated and will
be removed in Juno where this behaviour becomes the default.

AWS::EC2::Instance will still create a cloud-init user for CloudFormation
compatibility. In the absence of the instance_user config option, 'ec2-user'
will be used.

Closes-Bug: #1257410
Change-Id: I42dda36045f79be079b2030669284e9db71463d7
2014-03-25 05:01:11 -04:00
Tomas Sedovic 00e574e595 Don't disable SELinux in cloud-init's
This is a first step towards fixing #1257410 as outlined in the bug

Disabling SELinux is not necessary, but the fact that we're using both
the `user` directive in cloudinit/config and `useradd` in
is a bit confusing so this documents the reasons for both.

Change-Id: Ife4fec99650341de698eb51741d96f95de00dcf0
Partial-Bug: #1257410
2014-02-17 03:41:44 -05:00
BK Box 265467f5cd Verify setenforce is executable
Some images/distros do not install/use selinux. This small change will
verify that `setenforce` is executable and in the path before attempting
to run the command. This prevents the script from erroring and causing a
failed `cloud-init` run.

Change-Id: I42f802c7994b8d907f0cc4e3b1a38e6fd89dac0c
2014-02-04 10:16:58 -06:00
Steve Baker edb7a6dbe9 Call cfn-create-aws-symlinks in
Images which have heat-cfntools installed from rpm or deb
will not have cfn tool links in /opt/aws/bin.

This change runs cfn-create-aws-symlinks during cloud-init It should do the following:
* if no cfn tools exist in /opt/aws/bin, symlinks from /usr/bin
  will be created
* if cfn tools exist in /opt/aws/bin, no symlinks are created
* if cfn-create-aws-symlinks doesn't exist, there will be no effect

This is required to use a vanilla Fedora 20 cloud image with heat,
which has heat-cfntools pre-installed.

Change-Id: I5426fdad3031f91b4b9c1f9c9c19ac9cc42cf2dd
2013-12-05 10:41:25 +13:00
Steven Dake 715e5d4f51 Revert "Replace with write-files cloudinit mechanism"
Ubuntu has 0.6 of cloudinit, and write-files doesn't work on that
distro.  Ubuntu does not intend to update cloudinit in their LTS release
to 0.7.

This reverts commit 621f5bfdba.
Fixes: Bug #1207088

Change-Id: If80863883afee28bdde6dd506826ec5710cc0308
2013-08-05 12:13:59 -05:00
Steven Dake 621f5bfdba Replace with write-files cloudinit mechanism was acting as a write-files mechanism.  Instead just
use the write-files mechanism directly to avoid the complexities of
the part-handler.

blueprint: use-cloudinit-write
Change-Id: I6e80c344743d6fd2fa9a49507de6d50e3d9eea73
2013-07-30 15:24:08 -07:00
Jeff Peeler d665740935 Change executable file permissions for rpmlint
Fixes: Bug #1158009
Change-Id: I761debfb77be5cf5204af90a013d7f4f043fdb17
Signed-off-by: Jeff Peeler <>
2013-03-20 18:56:36 -04:00
sdake ac8b8f9c42 Allow per-deployment configuration of user id
Previously user ids of new instances were limited to ec2-user.
This patch adds a new configuration option to be placed in
/etc/heat/heat-engine.conf called "default_instance_user" which
allows the default of ec2-user to be overriden.

Note for reviewers that runcmd does not work properly.  It was
actually running after the script finished execution.

Fixes: Bug #1101347
Change-Id: Ica2dbe63d9dcbce8bb8de298eba452c34ab173d9
2013-03-14 09:51:59 -07:00