summaryrefslogtreecommitdiffstats
path: root/extraconfig
diff options
context:
space:
mode:
Diffstat (limited to 'extraconfig')
-rw-r--r--extraconfig/controller/cinder-netapp.yaml38
-rw-r--r--extraconfig/controller/noop.yaml3
-rwxr-xr-xextraconfig/tasks/yum_update.sh41
-rw-r--r--extraconfig/tasks/yum_update.yaml26
4 files changed, 108 insertions, 0 deletions
diff --git a/extraconfig/controller/cinder-netapp.yaml b/extraconfig/controller/cinder-netapp.yaml
new file mode 100644
index 00000000..223ceacd
--- /dev/null
+++ b/extraconfig/controller/cinder-netapp.yaml
@@ -0,0 +1,38 @@
+heat_template_version: 2015-04-30
+
+description: >
+ Configure hieradata for Cinder Netapp configuration
+
+resources:
+ CinderNetappConfig:
+ type: OS::Heat::StructuredConfig
+ properties:
+ group: os-apply-config
+ config:
+ hiera:
+ datafiles:
+ cinder_netapp_data:
+ mapped_data:
+ cinder_enable_netapp_backend: {get_param: CinderEnableNetappBackend}
+ cinder::backend::netapp::title: {get_param: CinderNetappBackendName}
+ cinder::backend::netapp::netapp_login: {get_param: CinderNetappLogin}
+ cinder::backend::netapp::netapp_password: {get_param: CinderNetappPassword}
+ cinder::backend::netapp::netapp_hostname: {get_param: CinderNetappServerHostname}
+ cinder::backend::netapp::netapp_server_port: {get_param: CinderNetappServerPort}
+ cinder::backend::netapp::netapp_size_multiplier: {get_param: CinderNetappSizeMultiplier}
+ cinder::backend::netapp::netapp_storage_family: {get_param: CinderNetappStorageFamily}
+ cinder::backend::netapp::netapp_storage_protocol: {get_param: CinderNetappStorageProtocol}
+ cinder::backend::netapp::netapp_transport_type: {get_param: CinderNetappTransportType}
+ cinder::backend::netapp::netapp_vfiler: {get_param: CinderNetappVfiler}
+ cinder::backend::netapp::netapp_volume_list: {get_param: CinderNetappVolumeList}
+ cinder::backend::netapp::netapp_vserver: {get_param: CinderNetappVserver}
+ cinder::backend::netapp::netapp_partner_backend_name: {get_param: CinderNetappPartnerBackendName}
+ cinder::backend::netapp::nfs_shares: {get_param: CinderNetappNfsShares}
+ cinder::backend::netapp::nfs_shares_config: {get_param: CinderNetappNfsSharesConfig}
+ cinder::backend::netapp::nfs_mount_options: {get_param: CinderNetappNfsMountOptions}
+ cinder::backend::netapp::netapp_copyoffload_tool_path: {get_param: CinderNetappCopyOffloadToolPath}
+ cinder::backend::netapp::netapp_controller_ips: {get_param: CinderNetappControllerIps}
+ cinder::backend::netapp::netapp_sa_password: {get_param: CinderNetappSaPassword}
+ cinder::backend::netapp::netapp_storage_pools: {get_param: CinderNetappStoragePools}
+ cinder::backend::netapp::netapp_eseries_host_type: {get_param: CinderNetappEseriesHostType}
+ cinder::backend::netapp::netapp_webservice_path: {get_param: CinderNetappWebservicePath}
diff --git a/extraconfig/controller/noop.yaml b/extraconfig/controller/noop.yaml
new file mode 100644
index 00000000..2eb35763
--- /dev/null
+++ b/extraconfig/controller/noop.yaml
@@ -0,0 +1,3 @@
+heat_template_version: 2015-04-30
+
+description: A stack which doesn't configure anything.
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
new file mode 100755
index 00000000..3d4c772b
--- /dev/null
+++ b/extraconfig/tasks/yum_update.sh
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# A heat-config-script which runs yum update during a stack-update.
+# Inputs:
+# deploy_action - yum will only be run if this is UPDATE
+# update_identifier - yum will only run for previously unused values of update_identifier
+# command - yum sub-command to run, defaults to "update"
+# command_arguments - yum command arguments, defaults to ""
+
+echo "Started yum_update.sh on server $deploy_server_id at `date`"
+
+if [[ -z "$update_identifier" ]]; then
+ echo "Not running due to unset update_identifier"
+ exit 0
+fi
+
+timestamp_dir=/var/lib/overcloud-yum-update
+mkdir -p $timestamp_dir
+
+# sanitise to remove unusual characters
+update_identifier=${update_identifier//[^a-zA-Z0-9-_]/}
+
+timestamp_file="$timestamp_dir/$update_identifier"
+if [[ -a "$timestamp_file" ]]; then
+ echo "Not running for already-run timestamp \"$update_identifier\""
+ exit 0
+fi
+touch "$timestamp_file"
+
+command=${command:-update}
+full_command="yum -y $command $command_arguments"
+echo "Running: $full_command"
+
+result=$($full_command)
+return_code=$?
+echo "$result"
+echo "yum return code: $return_code"
+
+echo "Finished yum_update.sh on server $deploy_server_id at `date`"
+
+exit $return_code
diff --git a/extraconfig/tasks/yum_update.yaml b/extraconfig/tasks/yum_update.yaml
new file mode 100644
index 00000000..e918149e
--- /dev/null
+++ b/extraconfig/tasks/yum_update.yaml
@@ -0,0 +1,26 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Software-config for performing package updates using yum
+
+resources:
+
+ config:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ config: {get_file: yum_update.sh}
+ inputs:
+ - name: update_identifier
+ description: yum will only run for previously unused values of update_identifier
+ default: ''
+ - name: command
+ description: yum sub-command to run, defaults to "update"
+ default: update
+ - name: command_arguments
+ description: yum command arguments, defaults to ""
+ default: ''
+
+outputs:
+ OS::stack_id:
+ value: {get_resource: config} \ No newline at end of file