commit | author | age
|
8f3feb
|
1 |
= ocp-workload-rhte-mw-op-intel |
J |
2 |
|
46fd7c
|
3 |
== NOTES |
J |
4 |
. Corresponds to the link:https://drive.google.com/open?id=1mppB7fFbSYzxHdLURXIUYN2FbSoUX9KquxwfW88pB-A[Operational Intelligence] Tech Exchange lab |
|
5 |
. Using a version of oc utility that corresponds to your target OCP cluster, ensure oc utility is already authenticated as the cluster-admin: opentlc-mgr |
8f3feb
|
6 |
|
J |
7 |
=== Deploy a Workload with the `ocp-workload` playbook [Mostly for testing] |
46fd7c
|
8 |
|
8f3feb
|
9 |
---- |
J |
10 |
GUID=jb45 |
|
11 |
OCP_USERNAME="jbride-redhat.com" |
|
12 |
WORKLOAD="ocp-workload-rhte-mw-op-intel" |
|
13 |
|
|
14 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
aa70e0
|
15 |
ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
H |
16 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
|
17 |
-e"ocp_workload=${WORKLOAD}" \ |
|
18 |
-e"ocp_username=${OCP_USERNAME}" \ |
|
19 |
-e"guid=${GUID}" \ |
|
20 |
-e"ocp_user_needs_quota=true" \ |
|
21 |
-e"ocp_domain=${OCP_DOMAIN}" \ |
|
22 |
-e"ACTION=create" |
8f3feb
|
23 |
|
J |
24 |
---- |
|
25 |
|
|
26 |
=== To Delete an environment |
|
27 |
---- |
|
28 |
GUID=jb45 |
|
29 |
HOST_GUID=dev39 |
aa70e0
|
30 |
TARGET_HOST="master.$HOST_GUID.openshift.opentlc.com" |
8f3feb
|
31 |
OCP_USERNAME="jbride-redhat.com" |
J |
32 |
WORKLOAD="ocp-workload-rhte-mw-op-intel" |
|
33 |
|
|
34 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
a8ae65
|
35 |
======= |
8f3feb
|
36 |
WORKLOAD="ocp-workload-rhte-mw-op-intel" |
46fd7c
|
37 |
OCP_USERNAME="jbride-redhat.com" |
J |
38 |
|
|
39 |
HOST_GUID=`oc whoami --show-server | cut -d'.' -f 2` |
|
40 |
OCP_DOMAIN=$HOST_GUID.openshift.opentlc.com |
8f3feb
|
41 |
|
J |
42 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
46fd7c
|
43 |
ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
8f3feb
|
44 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
J |
45 |
-e"ocp_workload=${WORKLOAD}" \ |
46fd7c
|
46 |
-e"ocp_username=${OCP_USERNAME}" \ |
8f3feb
|
47 |
-e"guid=${GUID}" \ |
J |
48 |
-e"ocp_user_needs_quota=true" \ |
46fd7c
|
49 |
-e"ocp_domain=${OCP_DOMAIN}" \ |
8f3feb
|
50 |
-e"ACTION=create" |
J |
51 |
|
aa70e0
|
52 |
ansible-playbook -i localhost, -c local ./configs/ocp-workloads/ocp-workload.yml \ |
8f3feb
|
53 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
J |
54 |
-e"ocp_workload=${WORKLOAD}" \ |
aa70e0
|
55 |
-e"guid=$GUID" \ |
8f3feb
|
56 |
-e"ACTION=remove" |
46fd7c
|
57 |
|
8f3feb
|
58 |
---- |
67d82e
|
59 |
|
H |
60 |
|
|
61 |
|
|
62 |
== Execution using remote (bastion node) oc client |
|
63 |
=== Deploy a Workload with the `ocp-workload` playbook [Mostly for testing] |
|
64 |
---- |
|
65 |
HOST_GUID=dev39 |
|
66 |
TARGET_HOST="bastion.$HOST_GUID.openshift.opentlc.com" |
|
67 |
WORKLOAD="ocp-workload-rhte-mw-op-intel" |
|
68 |
SSH_USERNAME="jbride-redhat.com" |
|
69 |
SSH_PRIVATE_KEY="id_ocp" |
|
70 |
GUID=jb05 |
|
71 |
OCP_USERNAME="jbride-redhat.com" |
|
72 |
|
|
73 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
|
74 |
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
|
75 |
-e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
|
76 |
-e"ansible_ssh_user=${SSH_USERNAME}" \ |
|
77 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
|
78 |
-e"ocp_username=${OCP_USERNAME}" \ |
|
79 |
-e"ocp_workload=${WORKLOAD}" \ |
|
80 |
-e"guid=${GUID}" \ |
|
81 |
-e"ocp_domain=$HOST_GUID.openshift.opentlc.com" \ |
|
82 |
-e"ACTION=create" |
|
83 |
|
|
84 |
---- |
|
85 |
|
|
86 |
=== To Delete an environment |
|
87 |
---- |
|
88 |
HOST_GUID=dev39 |
|
89 |
TARGET_HOST="bastion.$HOST_GUID.openshift.opentlc.com" |
|
90 |
WORKLOAD="ocp-workload-rhte-mw-op-intel" |
|
91 |
GUID=jb05 |
|
92 |
OCP_USERNAME="jbride-redhat.com" |
|
93 |
|
|
94 |
# a TARGET_HOST is specified in the command line, without using an inventory file |
|
95 |
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \ |
|
96 |
-e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \ |
|
97 |
-e"ansible_ssh_user=${SSH_USERNAME}" \ |
|
98 |
-e"ANSIBLE_REPO_PATH=`pwd`" \ |
|
99 |
-e"ocp_username=${OCP_USERNAME}" \ |
|
100 |
-e"ocp_workload=${WORKLOAD}" \ |
|
101 |
-e"guid=${GUID}" \ |
|
102 |
-e"ACTION=remove" |
|
103 |
---- |