Merge "Add NodeAdminUserData interface for "heat-admin" user"
This commit is contained in:
commit
9a8e384a14
29
firstboot/userdata_heat_admin.yaml
Normal file
29
firstboot/userdata_heat_admin.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
heat_template_version: 2014-10-16
|
||||||
|
|
||||||
|
parameters:
|
||||||
|
# Can be overriden via parameter_defaults in the environment
|
||||||
|
node_admin_username:
|
||||||
|
type: string
|
||||||
|
default: heat-admin
|
||||||
|
|
||||||
|
description: >
|
||||||
|
Uses cloud-init to create an additional user with a known name, in addition
|
||||||
|
to the distro-default user created by the cloud-init default.
|
||||||
|
|
||||||
|
resources:
|
||||||
|
userdata:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: user_config}
|
||||||
|
|
||||||
|
# Note this requires cloud-init >= 0.7.2 ref bug #1100920
|
||||||
|
user_config:
|
||||||
|
type: OS::Heat::CloudConfig
|
||||||
|
properties:
|
||||||
|
cloud_config:
|
||||||
|
user: {get_param: node_admin_username}
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
OS::stack_id:
|
||||||
|
value: {get_resource: userdata}
|
@ -23,6 +23,10 @@ resource_registry:
|
|||||||
OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
|
OS::TripleO::BootstrapNode::SoftwareConfig: puppet/bootstrap-config.yaml
|
||||||
OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml
|
OS::TripleO::Tasks::PackageUpdate: extraconfig/tasks/yum_update.yaml
|
||||||
|
|
||||||
|
# This creates the "heat-admin" user for all OS images by default
|
||||||
|
# To disable, replace with firstboot/userdata_default.yaml
|
||||||
|
OS::TripleO::NodeAdminUserData: firstboot/userdata_heat_admin.yaml
|
||||||
|
|
||||||
# Hooks for operator extra config
|
# Hooks for operator extra config
|
||||||
# NodeUserData == Cloud-init additional user-data, e.g cloud-config
|
# NodeUserData == Cloud-init additional user-data, e.g cloud-config
|
||||||
# ControllerExtraConfigPre == Controller configuration pre service deployment
|
# ControllerExtraConfigPre == Controller configuration pre service deployment
|
||||||
|
@ -66,9 +66,26 @@ resources:
|
|||||||
networks:
|
networks:
|
||||||
- network: ctlplane
|
- network: ctlplane
|
||||||
user_data_format: SOFTWARE_CONFIG
|
user_data_format: SOFTWARE_CONFIG
|
||||||
user_data: {get_resource: NodeUserData}
|
user_data: {get_resource: UserData}
|
||||||
name: {get_param: Hostname}
|
name: {get_param: Hostname}
|
||||||
|
|
||||||
|
# Combine the NodeAdminUserData and NodeUserData mime archives
|
||||||
|
UserData:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: NodeAdminUserData}
|
||||||
|
type: multipart
|
||||||
|
- config: {get_resource: NodeUserData}
|
||||||
|
type: multipart
|
||||||
|
|
||||||
|
# Creates the "heat-admin" user if configured via the environment
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
|
NodeAdminUserData:
|
||||||
|
type: OS::TripleO::NodeAdminUserData
|
||||||
|
|
||||||
|
# For optional operator additional userdata
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
NodeUserData:
|
NodeUserData:
|
||||||
type: OS::TripleO::NodeUserData
|
type: OS::TripleO::NodeUserData
|
||||||
|
|
||||||
|
@ -120,9 +120,26 @@ resources:
|
|||||||
networks:
|
networks:
|
||||||
- network: ctlplane
|
- network: ctlplane
|
||||||
user_data_format: SOFTWARE_CONFIG
|
user_data_format: SOFTWARE_CONFIG
|
||||||
user_data: {get_resource: NodeUserData}
|
user_data: {get_resource: UserData}
|
||||||
name: {get_param: Hostname}
|
name: {get_param: Hostname}
|
||||||
|
|
||||||
|
# Combine the NodeAdminUserData and NodeUserData mime archives
|
||||||
|
UserData:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: NodeAdminUserData}
|
||||||
|
type: multipart
|
||||||
|
- config: {get_resource: NodeUserData}
|
||||||
|
type: multipart
|
||||||
|
|
||||||
|
# Creates the "heat-admin" user if configured via the environment
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
|
NodeAdminUserData:
|
||||||
|
type: OS::TripleO::NodeAdminUserData
|
||||||
|
|
||||||
|
# For optional operator additional userdata
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
NodeUserData:
|
NodeUserData:
|
||||||
type: OS::TripleO::NodeUserData
|
type: OS::TripleO::NodeUserData
|
||||||
|
|
||||||
|
@ -263,9 +263,26 @@ resources:
|
|||||||
networks:
|
networks:
|
||||||
- network: ctlplane
|
- network: ctlplane
|
||||||
user_data_format: SOFTWARE_CONFIG
|
user_data_format: SOFTWARE_CONFIG
|
||||||
user_data: {get_resource: NodeUserData}
|
user_data: {get_resource: UserData}
|
||||||
name: {get_param: Hostname}
|
name: {get_param: Hostname}
|
||||||
|
|
||||||
|
# Combine the NodeAdminUserData and NodeUserData mime archives
|
||||||
|
UserData:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: NodeAdminUserData}
|
||||||
|
type: multipart
|
||||||
|
- config: {get_resource: NodeUserData}
|
||||||
|
type: multipart
|
||||||
|
|
||||||
|
# Creates the "heat-admin" user if configured via the environment
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
|
NodeAdminUserData:
|
||||||
|
type: OS::TripleO::NodeAdminUserData
|
||||||
|
|
||||||
|
# For optional operator additional userdata
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
NodeUserData:
|
NodeUserData:
|
||||||
type: OS::TripleO::NodeUserData
|
type: OS::TripleO::NodeUserData
|
||||||
|
|
||||||
|
@ -531,9 +531,26 @@ resources:
|
|||||||
networks:
|
networks:
|
||||||
- network: ctlplane
|
- network: ctlplane
|
||||||
user_data_format: SOFTWARE_CONFIG
|
user_data_format: SOFTWARE_CONFIG
|
||||||
user_data: {get_resource: NodeUserData}
|
user_data: {get_resource: UserData}
|
||||||
name: {get_param: Hostname}
|
name: {get_param: Hostname}
|
||||||
|
|
||||||
|
# Combine the NodeAdminUserData and NodeUserData mime archives
|
||||||
|
UserData:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: NodeAdminUserData}
|
||||||
|
type: multipart
|
||||||
|
- config: {get_resource: NodeUserData}
|
||||||
|
type: multipart
|
||||||
|
|
||||||
|
# Creates the "heat-admin" user if configured via the environment
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
|
NodeAdminUserData:
|
||||||
|
type: OS::TripleO::NodeAdminUserData
|
||||||
|
|
||||||
|
# For optional operator additional userdata
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
NodeUserData:
|
NodeUserData:
|
||||||
type: OS::TripleO::NodeUserData
|
type: OS::TripleO::NodeUserData
|
||||||
|
|
||||||
|
@ -89,9 +89,26 @@ resources:
|
|||||||
networks:
|
networks:
|
||||||
- network: ctlplane
|
- network: ctlplane
|
||||||
user_data_format: SOFTWARE_CONFIG
|
user_data_format: SOFTWARE_CONFIG
|
||||||
user_data: {get_resource: NodeUserData}
|
user_data: {get_resource: UserData}
|
||||||
name: {get_param: Hostname}
|
name: {get_param: Hostname}
|
||||||
|
|
||||||
|
# Combine the NodeAdminUserData and NodeUserData mime archives
|
||||||
|
UserData:
|
||||||
|
type: OS::Heat::MultipartMime
|
||||||
|
properties:
|
||||||
|
parts:
|
||||||
|
- config: {get_resource: NodeAdminUserData}
|
||||||
|
type: multipart
|
||||||
|
- config: {get_resource: NodeUserData}
|
||||||
|
type: multipart
|
||||||
|
|
||||||
|
# Creates the "heat-admin" user if configured via the environment
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
|
NodeAdminUserData:
|
||||||
|
type: OS::TripleO::NodeAdminUserData
|
||||||
|
|
||||||
|
# For optional operator additional userdata
|
||||||
|
# Should return a OS::Heat::MultipartMime reference via OS::stack_id
|
||||||
NodeUserData:
|
NodeUserData:
|
||||||
type: OS::TripleO::NodeUserData
|
type: OS::TripleO::NodeUserData
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user