commit | author | age
|
2282af
|
1 |
--- |
GH |
2 |
- name: set namespace |
|
3 |
set_fact: |
|
4 |
_namespace: "{{ namespace_prefix }}{{ user_num }}" |
|
5 |
|
|
6 |
- name: Create namespace for {{ _namespace }} |
|
7 |
k8s: |
|
8 |
state: present |
|
9 |
definition: "{{ lookup('template', role_path ~ '/templates/namespace.j2' ) | from_yaml }}" |
|
10 |
|
22da5e
|
11 |
- name: Create quota in namespace {{ _namespace }} |
GH |
12 |
k8s: |
|
13 |
state: present |
|
14 |
namespace: "{{ _namespace }}" |
|
15 |
definition: "{{ lookup('file', role_path ~ '/files/namespace-quota.yml' ) | from_yaml }}" |
|
16 |
|
|
17 |
- name: Create limits in namespace {{ _namespace }} |
|
18 |
k8s: |
|
19 |
state: present |
|
20 |
namespace: "{{ _namespace }}" |
|
21 |
definition: "{{ lookup('file', role_path ~ '/files/namespace-limits.yml' ) | from_yaml }}" |
|
22 |
|
|
23 |
- name: Create admin rolebinding for user{{ user_num }} in namespace {{ _namespace }} |
|
24 |
k8s: |
|
25 |
state: present |
|
26 |
namespace: "{{ _namespace }}" |
|
27 |
definition: "{{ lookup('template', role_path ~ '/templates/namespace-admin-rolebinding.j2' ) | from_yaml }}" |
|
28 |
|
|
29 |
- name: Check user{{ user_num }} can login |
|
30 |
command: "oc login --username=user{{ user_num }} --password={{ _user_login_password }} {{ ocwhoami.stdout }} -n {{ _namespace }} --insecure-skip-tls-verify=true --config={{ tmp_dir }}.kube/{{ _namespace }}-config" |
|
31 |
|
2282af
|
32 |
- name: Create OperatorGroup for the operators |
GH |
33 |
k8s: |
|
34 |
state: present |
ddd690
|
35 |
definition: "{{ lookup('template', role_path ~ '/templates/olm-operatorgroup/single-namespace.j2' ) | from_yaml }}" |
2282af
|
36 |
|
GH |
37 |
- name: AMQ Streams for {{ _namespace }} |
|
38 |
include_tasks: workload_per_project_amqstreams.yml |
|
39 |
|
|
40 |
- name: DataGrid for {{ _namespace }} |
|
41 |
include_tasks: workload_per_project_datagrid.yml |
|
42 |
|
|
43 |
- name: Business Automation for {{ _namespace }} |
|
44 |
include_tasks: workload_per_project_businessautomation.yml |
22da5e
|
45 |
|
2282af
|
46 |
- name: Gitea for {{ _namespace }} |
GH |
47 |
include_tasks: workload_per_project_gitea.yml |
|
48 |
|
22fc6b
|
49 |
- name: CodeReadyWorkspaces for {{ _namespace }} |
2282af
|
50 |
include_tasks: workload_per_project_codereadyworkspaces.yml |
GH |
51 |
|
|
52 |
- name: Prometheus for {{ _namespace }} |
|
53 |
include_tasks: workload_per_project_prometheus.yml |
|
54 |
|
|
55 |
- name: Grafana for {{ _namespace }} |
|
56 |
include_tasks: workload_per_project_grafana.yml |
|
57 |
|
|
58 |
- name: Fuse workdload for {{ _namespace }} |
ddd690
|
59 |
include_tasks: workload_per_project_fuseworkload.yml |
GH |
60 |
|
|
61 |
- name: Print Overview |
|
62 |
debug: |
|
63 |
msg: "{{ item }}" |
|
64 |
with_items: |
|
65 |
- "user.info: {{ _namespace }} ->" |
22fc6b
|
66 |
- "user.info: DevTools:" |
ddd690
|
67 |
- "user.info: - Code Ready Workspaces (u: {{ _namespace }}, p: {{ _account_password }}): http://{{ che_route.stdout }}" |
22fc6b
|
68 |
- "user.info: - Gitea (u: {{ _namespace }}, p: {{ _account_password }}): https://{{ gitea_route.stdout }}" |