summaryrefslogtreecommitdiffstats
path: root/playbooks/openstack/advanced-configuration.md
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-02-12 10:33:45 -0800
committerGitHub <noreply@github.com>2018-02-12 10:33:45 -0800
commitf9f61beed982ba841c872b5fc082c6dc05ad27b1 (patch)
treecea87fe39ebf5c7f26c9c4e70ff991a12659d24b /playbooks/openstack/advanced-configuration.md
parentf1263cb5edbe409fd044a37a395cc5b49e48dfeb (diff)
parentaafbd31f00f48ee9e3e1aaea8f5f316669262872 (diff)
downloadopenshift-f9f61beed982ba841c872b5fc082c6dc05ad27b1.tar.gz
openshift-f9f61beed982ba841c872b5fc082c6dc05ad27b1.tar.bz2
openshift-f9f61beed982ba841c872b5fc082c6dc05ad27b1.tar.xz
openshift-f9f61beed982ba841c872b5fc082c6dc05ad27b1.zip
Merge pull request #6699 from bogdando/heat_user_data
Automatic merge from submit-queue. [openstack] custom user commands for cloud-init Allow to specify additional user commands executed on all Nova servers provisioned via Heat. An example use case is installing and starting os-collect-config agents to put Nova servers under the configuration management driven via the host openstack cloud Heat services. This allows to integrate with another deployment tools like TripleO. Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
Diffstat (limited to 'playbooks/openstack/advanced-configuration.md')
-rw-r--r--playbooks/openstack/advanced-configuration.md32
1 files changed, 32 insertions, 0 deletions
diff --git a/playbooks/openstack/advanced-configuration.md b/playbooks/openstack/advanced-configuration.md
index e8f4cfc32..8df3c40b0 100644
--- a/playbooks/openstack/advanced-configuration.md
+++ b/playbooks/openstack/advanced-configuration.md
@@ -273,6 +273,38 @@ openshift_openstack_cluster_node_labels:
mylabel: myvalue
```
+`openshift_openstack_provision_user_commands` allows users to execute
+shell commands via cloud-init for all of the created Nova servers in
+the Heat stack, before they are available for SSH connections.
+Note that you should use custom ansible playbooks whenever
+possible, like this `provision_install_custom.yml` example playbook:
+```
+- import_playbook: openshift-ansible/playbooks/openstack/openshift-cluster/provision.yml
+
+- name: My custom actions
+ hosts: cluster_hosts
+ tasks:
+ - do whatever you want here
+
+- import_playbook: openshift-ansible/playbooks/openstack/openshift-cluster/install.yml
+```
+The playbook leverages a two existing provider interfaces: `provision.yml` and
+`install.yml`. For some cases, like SSH keys configuration and coordinated reboots of
+servers, the cloud-init runcmd directive may be a better choice though. User specified
+shell commands for cloud-init need to be either strings or lists, for example:
+```
+- openshift_openstack_provision_user_commands:
+ - set -vx
+ - systemctl stop sshd # fences off ansible playbooks as we want to reboot later
+ - ['echo', 'foo', '>', '/tmp/foo']
+ - [ ls, /tmp/foo, '||', true ]
+ - reboot # unfences ansible playbooks to continue after reboot
+```
+
+**Note** To protect Nova servers from recreating when the user-data changes via
+`openshift_openstack_provision_user_commands`, the
+`user_data_update_policy` parameter configured to `IGNORE` for Heat resources.
+
The `openshift_openstack_nodes_to_remove` allows you to specify the numerical indexes
of App nodes that should be removed; for example, ['0', '2'],