From 4e6dfc00c5619c4e749602d345fd2829ab0a3f07 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sun, 18 Apr 2021 17:31:52 +0300 Subject: - Draft implementation of the service plugin --- tests/plugins/service/configs/.rr-service-init.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/plugins/service/configs/.rr-service-init.yaml (limited to 'tests/plugins/service/configs/.rr-service-init.yaml') diff --git a/tests/plugins/service/configs/.rr-service-init.yaml b/tests/plugins/service/configs/.rr-service-init.yaml new file mode 100644 index 00000000..9ca0bde5 --- /dev/null +++ b/tests/plugins/service/configs/.rr-service-init.yaml @@ -0,0 +1,21 @@ +service: + some_service_1: #<-- user defined name + command: "php php/loop.php" # command, can be any command (php, script, binary, exe)" + process_num: 10 # number of copies (processes) + exec_timeout: 5s # how long process allowed to run (until restart or stop), default - unlimited + restart_after_exit: false # run and restart after finish + restart_delay: 1s # delay between binary/script restarts, default 1minute +# some_service_2: # exec_timeout is not set, by default - unlimited +# command: "./test_binary" +# process_num: 1 +# restart_after_exit: false +# restart_delay: 10 # <--- ignored when restart_after_exit is false + +logs: + level: debug + mode: raw + +endure: + grace_period: 120s + print_graph: false + log_level: debug -- cgit v1.2.3 From 4931146022a644a69e73f241e094966bdb5cb51f Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sun, 18 Apr 2021 23:51:27 +0300 Subject: - Add test binaries/exe for the Linux/Windows Signed-off-by: Valery Piashchynski --- .../plugins/service/configs/.rr-service-init.yaml | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'tests/plugins/service/configs/.rr-service-init.yaml') diff --git a/tests/plugins/service/configs/.rr-service-init.yaml b/tests/plugins/service/configs/.rr-service-init.yaml index 9ca0bde5..1b9cf754 100644 --- a/tests/plugins/service/configs/.rr-service-init.yaml +++ b/tests/plugins/service/configs/.rr-service-init.yaml @@ -1,21 +1,22 @@ service: - some_service_1: #<-- user defined name - command: "php php/loop.php" # command, can be any command (php, script, binary, exe)" - process_num: 10 # number of copies (processes) - exec_timeout: 5s # how long process allowed to run (until restart or stop), default - unlimited - restart_after_exit: false # run and restart after finish - restart_delay: 1s # delay between binary/script restarts, default 1minute -# some_service_2: # exec_timeout is not set, by default - unlimited -# command: "./test_binary" -# process_num: 1 -# restart_after_exit: false -# restart_delay: 10 # <--- ignored when restart_after_exit is false + some_service_1: + command: "php test_files/loop.php" + process_num: 1 + exec_timeout: 5s + restart_after_exit: true + restart_delay: 1s + some_service_2: + command: "test_files/test_binary" + process_num: 1 + restart_after_exit: true + restart_delay: 1s + exec_timeout: 5s logs: - level: debug + level: info mode: raw endure: grace_period: 120s print_graph: false - log_level: debug + log_level: error -- cgit v1.2.3 From baa12b092578d41218585d918fb7e1425700272d Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 19 Apr 2021 16:42:28 +0300 Subject: - Add tests, update Informer implementation Signed-off-by: Valery Piashchynski --- tests/plugins/service/configs/.rr-service-init.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/plugins/service/configs/.rr-service-init.yaml') diff --git a/tests/plugins/service/configs/.rr-service-init.yaml b/tests/plugins/service/configs/.rr-service-init.yaml index 1b9cf754..e32f2eda 100644 --- a/tests/plugins/service/configs/.rr-service-init.yaml +++ b/tests/plugins/service/configs/.rr-service-init.yaml @@ -2,13 +2,13 @@ service: some_service_1: command: "php test_files/loop.php" process_num: 1 - exec_timeout: 5s - restart_after_exit: true - restart_delay: 1s + exec_timeout: 5s # s,m,h (seconds, minutes, hours) + remain_after_exit: true + restart_sec: 1 some_service_2: command: "test_files/test_binary" process_num: 1 - restart_after_exit: true + remain_after_exit: true restart_delay: 1s exec_timeout: 5s -- cgit v1.2.3