commit | author | age
|
7e8ece
|
1 |
= ocp-workload-amq-enmasse |
727c42
|
2 |
|
7e8ece
|
3 |
== Overview |
J |
4 |
|
|
5 |
=== Purpose |
|
6 |
This role creates a `single-tenant` enmasse project primarily for supporting elab students of the _AMQ Enmasse Foundations_ course. |
|
7 |
|
|
8 |
The alternative would be a `mulit-tenant` environment. |
|
9 |
However, a multi-tenant enmasse deployment requires the OCP user to be provided with _cluster-admin_ role. |
|
10 |
|
|
11 |
A multi-tenant environment would be better suited for an ILT where a dedicated _OCP Workshop_ environment existed. |
|
12 |
The course instructor would provision the multi-tenant enmasse using the _opentlc-mgr_ account (which is a cluster-admin). |
|
13 |
Students (via accounts user[1-100] ), would authenticate into the multi-tenant enmasse address-controller. |
|
14 |
|
|
15 |
=== Why this ansible ? |
|
16 |
|
|
17 |
The enmasse project already includes ansible playbooks link://https://github.com/EnMasseProject/enmasse/tree/master/templates/install[found here]. |
|
18 |
|
|
19 |
However, there are challenges with leveraging that community enmasse ansible from this ansible-agnostic-deployer role as indicated in link:https://gist.github.com/jbride/e421267bc82493229a42220bd0c8f66c[this gist]. |
|
20 |
|
|
21 |
Subsequentlly, the approach is to copy ansible into this ansible-agnostic-deployer role from the following two projects: |
|
22 |
|
|
23 |
. https://github.com/btison/enmasse-ansible |
|
24 |
. https://github.com/EnMasseProject/enmasse |
|
25 |
|
|
26 |
== Deploy a Workload with the `ocp-workload` playbook |
727c42
|
27 |
---- |
5cf40a
|
28 |
GUID=jb45 |
d17f0e
|
29 |
HOST_GUID=dev39 |
5cf40a
|
30 |
TARGET_HOST="bastion.$HOST_GUID.openshift.opentlc.com" |
J |
31 |
OCP_USERNAME="jbride-redhat.com" |
7e8ece
|
32 |
WORKLOAD="ocp-workload-amq-enmasse" |
5cf40a
|
33 |
SSH_USERNAME="jbride-redhat.com" |
J |
34 |
SSH_PRIVATE_KEY="id_ocp" |
727c42
|
35 |
|
S |
36 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
7c976b
|
37 |
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
5cf40a
|
38 |
-e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
J |
39 |
-e"ansible_ssh_user=${SSH_USERNAME}" \ |
727c42
|
40 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
S |
41 |
-e"ocp_username=${OCP_USERNAME}" \ |
|
42 |
-e"ocp_workload=${WORKLOAD}" \ |
|
43 |
-e"guid=${GUID}" \ |
|
44 |
-e"ocp_user_needs_quota=true" \ |
5cf40a
|
45 |
-e"ocp_apps_domain=apps.${HOST_GUID}.openshift.opentlc.com" \ |
J |
46 |
-e"namespace=amq-enmasse-${GUID}" \ |
727c42
|
47 |
-e"ACTION=create" |
S |
48 |
|
|
49 |
---- |
|
50 |
|
7e8ece
|
51 |
== To Delete an environment |
727c42
|
52 |
---- |
5cf40a
|
53 |
GUID=jb45 |
d17f0e
|
54 |
HOST_GUID=dev39 |
5cf40a
|
55 |
TARGET_HOST="bastion.$HOST_GUID.openshift.opentlc.com" |
J |
56 |
OCP_USERNAME="jbride-redhat.com" |
7e8ece
|
57 |
WORKLOAD="ocp-workload-amq-enmasse" |
5cf40a
|
58 |
SSH_USERNAME="jbride-redhat.com" |
J |
59 |
SSH_PRIVATE_KEY="id_ocp" |
727c42
|
60 |
|
S |
61 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
|
62 |
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
5cf40a
|
63 |
-e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
J |
64 |
-e"ansible_ssh_user=${SSH_USERNAME}" \ |
727c42
|
65 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
S |
66 |
-e"ocp_username=${OCP_USERNAME}" \ |
|
67 |
-e"ocp_workload=${WORKLOAD}" \ |
|
68 |
-e"guid=${GUID}" \ |
5cf40a
|
69 |
-e"namespace="amq-enmasse-${GUID} \ |
727c42
|
70 |
-e"ACTION=remove" |
S |
71 |
---- |