From 55dbd62291a06b8bbc1843f84b0dae5b53db10f7 Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Fri, 27 Oct 2023 15:06:32 +0200 Subject: [PATCH] fix(knox): fix broken yarn links for livy --- .../services/livy/0.4.3/rewrite.xml.j2 | 58 +++++++++++++++++++ .../services/livy/0.4.3/service.xml.j2 | 35 +++++++++++ roles/knox/gateway/tasks/config.yml | 25 ++++++++ 3 files changed, 118 insertions(+) create mode 100644 roles/knox/common/templates/services/livy/0.4.3/rewrite.xml.j2 create mode 100644 roles/knox/common/templates/services/livy/0.4.3/service.xml.j2 diff --git a/roles/knox/common/templates/services/livy/0.4.3/rewrite.xml.j2 b/roles/knox/common/templates/services/livy/0.4.3/rewrite.xml.j2 new file mode 100644 index 00000000..c8a7f3c0 --- /dev/null +++ b/roles/knox/common/templates/services/livy/0.4.3/rewrite.xml.j2 @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/roles/knox/common/templates/services/livy/0.4.3/service.xml.j2 b/roles/knox/common/templates/services/livy/0.4.3/service.xml.j2 new file mode 100644 index 00000000..f7434565 --- /dev/null +++ b/roles/knox/common/templates/services/livy/0.4.3/service.xml.j2 @@ -0,0 +1,35 @@ + + + + + API_AND_UI + /livy/ + Livy Server + Apache Livy is a service that enables easy interaction with a Spark cluster over a REST interface. + + + + + + + + + + + + diff --git a/roles/knox/gateway/tasks/config.yml b/roles/knox/gateway/tasks/config.yml index 9c645a92..7a69c11b 100644 --- a/roles/knox/gateway/tasks/config.yml +++ b/roles/knox/gateway/tasks/config.yml @@ -97,6 +97,31 @@ group: "{{ knox_group }}" mode: "644" +# Livy Spark 2 service definition +- name: Create Livy Spark 2 service dir + ansible.builtin.file: + path: "{{ knox_data_dir }}/data/services/livy/0.4.3" + state: directory + owner: "{{ knox_user }}" + group: "{{ knox_group }}" + mode: "755" + +- name: Template Livy Spark 2 service.xml + ansible.builtin.template: + src: services/livy/0.4.3/service.xml.j2 + dest: "{{ knox_data_dir }}/data/services/livy/0.4.3/service.xml" + owner: "{{ knox_user }}" + group: "{{ knox_group }}" + mode: "644" + +- name: Template Livy Spark 2 rewrite.xml + ansible.builtin.template: + src: services/livy/0.4.3/rewrite.xml.j2 + dest: "{{ knox_data_dir }}/data/services/livy/0.4.3/rewrite.xml" + owner: "{{ knox_user }}" + group: "{{ knox_group }}" + mode: "644" + - name: Template Knox gateway-site.xml ansible.builtin.template: src: gateway-site.xml.j2