Created
April 13, 2015 14:22
-
-
Save jprovaznik/b6c5a6487fdcca8cb1e7 to your computer and use it in GitHub Desktop.
stack update POC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/overcloud-without-mergepy.yaml b/overcloud-without-mergepy.yaml | |
index be32452..47e6d31 100644 | |
--- a/overcloud-without-mergepy.yaml | |
+++ b/overcloud-without-mergepy.yaml | |
@@ -465,6 +465,9 @@ parameters: | |
type: string | |
constraints: | |
- custom_constraint: nova.flavor | |
+ update_timestamp: | |
+ type: string | |
+ default: '' | |
# Block storage specific parameters | |
BlockStorageCount: | |
@@ -587,6 +590,7 @@ resources: | |
SwiftPartPower: {get_param: SwiftPartPower} | |
SwiftPassword: {get_param: SwiftPassword} | |
SwiftReplicas: { get_param: SwiftReplicas} | |
+ update_timestamp: { get_param: update_timestamp} | |
VirtualIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]} | |
PublicVirtualIP: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]} | |
@@ -641,6 +645,7 @@ resources: | |
RabbitUserName: {get_param: RabbitUserName} | |
SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName} | |
SnmpdReadonlyUserPassword: {get_param: SnmpdReadonlyUserPassword} | |
+ update_timestamp: { get_param: update_timestamp} | |
BlockStorage: | |
type: OS::Heat::ResourceGroup | |
diff --git a/puppet/controller-puppet.yaml b/puppet/controller-puppet.yaml | |
index 0fd4e7a..f96f0f1 100644 | |
--- a/puppet/controller-puppet.yaml | |
+++ b/puppet/controller-puppet.yaml | |
@@ -392,6 +392,9 @@ parameters: | |
default: 'false' | |
description: Set to true to enable package installation via Puppet | |
type: boolean | |
+ update_timestamp: | |
+ type: string | |
+ default: '' | |
resources: | |
@@ -406,6 +409,27 @@ resources: | |
- network: ctlplane | |
user_data_format: SOFTWARE_CONFIG | |
+ update_config: | |
+ type: OS::Heat::SoftwareConfig | |
+ properties: | |
+ group: script | |
+ inputs: | |
+ - name: update_after_time | |
+ description: Timestamp of the most recent update request | |
+ config: | |
+ get_file: manifests/do_update.sh | |
+ | |
+ update_deployment: | |
+ type: OS::Heat::SoftwareDeployment | |
+ properties: | |
+ #actions: | |
+ # - UPDATE | |
+ config: {get_resource: update_config} | |
+ server: {get_resource: Controller} | |
+ signal_transport: NO_SIGNAL | |
+ input_values: | |
+ update_after_time: {get_param: update_timestamp} | |
+ | |
NetworkConfig: | |
type: OS::TripleO::Net::SoftwareConfig | |
diff --git a/puppet/manifests/do_update.sh b/puppet/manifests/do_update.sh | |
new file mode 100644 | |
index 0000000..c224cdf | |
--- /dev/null | |
+++ b/puppet/manifests/do_update.sh | |
@@ -0,0 +1,2 @@ | |
+#!/bin/sh | |
+echo `date` >> /tmp/update.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment