= ocp-workload-etherpad - Etherpad Workload Role
|
|
== Role overview
|
|
Deploys an instance of etherpad on your cluster, into a new project or an existing project.
|
|
== Review the defaults variable file
|
|
* This file link:./defaults/main.yml[./defaults/main.yml] contains all the variables you need to define to control the deployment of your workload.
|
* The variable *ocp_username* is mandatory to assign the workload to the correct OpenShift user.
|
* A variable *silent=True* can be passed to suppress debug messages.
|
* You can modify any of these default values by adding `-e "variable_name=variable_value"` to the command line
|
|
=== Deploy a Workload with the `ocp-workload` playbook [Mostly for testing]
|
|
----
|
TARGET_HOST="bastion.na39.openshift.opentlc.com"
|
OCP_USERNAME="shacharb-redhat.com"
|
WORKLOAD="ocp-workload-etherpad"
|
GUID=1001
|
|
# a TARGET_HOST is specified in the command line, without using an inventory file
|
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \
|
-e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \
|
-e"ansible_user=ec2-user" \
|
-e"ocp_username=${OCP_USERNAME}" \
|
-e"ocp_workload=${WORKLOAD}" \
|
-e"silent=False" \
|
-e"guid=${GUID}" \
|
-e"ACTION=create"
|
----
|
|
=== To Delete an environment
|
|
----
|
TARGET_HOST="bastion.na39.openshift.opentlc.com"
|
OCP_USERNAME="ankay-redhat.com"
|
WORKLOAD="ocp-workload-etherpad"
|
GUID=1002
|
|
# a TARGET_HOST is specified in the command line, without using an inventory file
|
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \
|
-e"ansible_ssh_private_key_file=~/.ssh/keytoyourhost.pem" \
|
-e"ansible_user=ec2-user" \
|
-e"ocp_username=${OCP_USERNAME}" \
|
-e"ocp_workload=${WORKLOAD}" \
|
-e"guid=${GUID}" \
|
-e"ACTION=remove"
|
----
|
|
|
== Other related information:
|
|
=== Deploy Workload on OpenShift Cluster from an existing playbook:
|
|
[source,yaml]
|
----
|
- name: Deploy a workload role on a master host
|
hosts: all
|
become: true
|
gather_facts: False
|
tags:
|
- step007
|
roles:
|
- { role: "{{ocp_workload}}", when: 'ocp_workload is defined' }
|
----
|
NOTE: You might want to change `hosts: all` to fit your requirements
|