2018-05-05 12:40:41 +00:00
{% extends "base.html" %}
2023-02-28 13:56:14 +00:00
{% block title %}{{ lang.menu_links.ha.title }} {% endblock %}
{% block h2 %}{{ lang.menu_links.ha.title }} {% endblock %}
2018-05-05 12:40:41 +00:00
{% block content %}
2019-10-25 07:18:57 +00:00
{% from 'include/input_macros.html' import input, checkbox %}
2018-05-05 12:40:41 +00:00
< script src = "/inc/users.js" > < / script >
2021-03-04 05:53:27 +00:00
< script src = "/inc/ha.js" > < / script >
2023-09-17 09:42:39 +00:00
< link href = "/inc/css/ha.css" rel = "stylesheet" >
2021-03-04 05:53:27 +00:00
< style >
p {margin: 0;}
< / style >
2022-04-27 18:10:26 +00:00
{% if user_status == 0 or user_plan == 'user' %}
2023-09-17 09:42:39 +00:00
{% include 'include/no_sub.html' %}
2022-12-04 18:43:25 +00:00
{% elif not is_needed_tool %}
< div style = "text-align: center;" >
< h3 > You have not installed Ansible< / h3 > .
2023-09-17 20:36:55 +00:00
< img src = "{{ url_for('static', filename='images/no_servers.png')}}" alt = "There is no server" >
2022-12-04 18:43:25 +00:00
< h4 >
2023-02-13 14:45:45 +00:00
Read < a href = "https://roxy-wi.org/installation#ansible" title = "{{lang.words.installing|title()}} Ansible" target = "_blank" > here< / a > how to install Ansible.
2022-12-04 18:43:25 +00:00
< / h4 >
< / div >
2022-04-27 18:10:26 +00:00
{% else %}
2022-02-02 20:23:33 +00:00
< table class = "overview" style = "margin-bottom: 20px;" >
2023-02-13 14:45:45 +00:00
< caption > < h3 > {{lang.words.create|title()}} {{lang.words.w_a}} {{lang.words.new}} HA {{lang.words.cluster}}< / h3 > < / caption >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.current2|title()}} {{lang.words.installation}}< / td >
< td class = "padding10 first-collumn" > {{lang.words.current2|title()}}< / td >
< td class = "padding10 first-collumn" > {{lang.words.current2|title()}} {{lang.words.installation}}< / td >
< td > {{lang.words.slave|title()}}< / td >
< td > < span title = "{{lang.phrases.int_vrrp}}" > {{lang.words.master|title()}} {{lang.words.interface|title()}}< / span > < / td >
< td > < span title = "{{lang.phrases.int_vrrp}}" > {{lang.words.slave|title()}} {{lang.words.interface|title()}}< / span > < / td >
2018-05-05 12:40:41 +00:00
< td > VRRP IP< / td >
< td > < / td >
< / tr >
< tr >
2022-02-02 20:23:33 +00:00
< td class = "padding10 first-collumn" id = "cur_master_ver" > < / td >
2018-05-05 12:40:41 +00:00
< td class = "padding10 first-collumn" >
< select id = "master" >
2021-08-08 13:02:00 +00:00
< option disabled selected > ------< / option >
2018-05-05 12:40:41 +00:00
{% for select in selects %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
2022-02-02 20:23:33 +00:00
< td class = "padding10 first-collumn" id = "cur_slave_ver" > < / td >
2018-05-05 12:40:41 +00:00
< td >
< select id = "slave" >
2021-08-08 13:02:00 +00:00
< option disabled selected > ------< / option >
2018-05-05 12:40:41 +00:00
{% for select in selects %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td > {{ input('interface', size='7', title=lang.phrases.int_vrrp) }}< / td >
< td > {{ input('slave_interface', size='7', title=lang.phrases.int_vrrp) }}< / td >
2019-11-06 15:15:41 +00:00
< td > {{ input('vrrp-ip', size='14') }}< / td >
2022-02-02 20:23:33 +00:00
< / tr >
< tr class = "overviewHead" >
< td class = "padding10 first-collumn" > < / td >
2023-04-11 07:10:38 +00:00
< td class = "help_cursor" > < span title = "Roxy-WI will add VRRP address as a separated server" > {{lang.words.add|title()}} VIRT< / span > < / td >
2023-02-13 14:45:45 +00:00
< td class = "checkbox-head help_cursor" style = "padding-left: 20px;" title = "If checked, the Keepalived master will not release VRRP if the service is down" > {{lang.words.stay|title()}} {{lang.words.as}} {{lang.words.master|title()}}< / td >
< td class = "checkbox-head" > SYN-flood {{lang.words.protection}}< / td >
2023-04-11 07:10:38 +00:00
< td class = "checkbox-head help_cursor" style = "padding: 10px 10px 10px 5px;" > < span title = "Roxy-WI will try to install HAProxy" > HAProxy< / span > < / td >
2022-02-02 20:23:33 +00:00
< td class = "checkbox-head help_cursor" style = "display: none" id = "haproxy_docker_td_header" > < span title = "Roxy-WI will install HAProxy as Docker container" > Docker< / span > < / td >
2023-04-11 07:10:38 +00:00
< td class = "help_cursor" style = "padding-left: 5px;" > < span title = "Roxy-WI will try to install NGINX" > NGINX< / span > < / td >
2022-04-20 08:08:36 +00:00
< td class = "checkbox-head help_cursor" style = "display: none" id = "nginx_docker_td_header" > < span title = "Roxy-WI will install NGINX as Docker container" > Docker< / span > < / td >
2022-02-02 20:23:33 +00:00
< td > < / td >
< td > < / td >
< / tr >
< tr >
< td class = "padding10 first-collumn" > < / td >
2022-06-02 09:08:37 +00:00
< td class = "checkbox help_cursor" > {{ checkbox('virt_server', title='Roxy-WI will add VRRP address as a separated server', checked='checked') }}< / td >
2022-07-20 20:49:04 +00:00
< td class = "syn-flood-protection-field help_cursor" > {{ checkbox('return_to_master', title='If checked, the Keepalived master will not release VRRP if the service is down') }}< / td >
2022-02-02 20:23:33 +00:00
< td class = "syn-flood-protection-field" > {{ checkbox('syn_flood') }}< / td >
< td class = "checkbox help_cursor" style = "padding: 10px 10px 10px 15px;" > {{ checkbox('hap', title='Roxy-WI will try to install HAProxy') }}< / td >
2021-11-26 09:11:07 +00:00
< td class = "checkbox help_cursor" style = "display: none" id = "haproxy_docker_td" > {{ checkbox('hap_docker', title='Roxy-WI will install HAProxy as a Docker container') }}< / td >
2022-04-20 08:08:36 +00:00
< td class = "checkbox help_cursor" > {{ checkbox('nginx', title='Roxy-WI will try to install NGINX') }}< / td >
< td class = "checkbox help_cursor" style = "display: none" id = "nginx_docker_td" > {{ checkbox('nginx_docker', title='Roxy-WI will install NGINX as a Docker container') }}< / td >
2018-05-05 12:40:41 +00:00
< td >
2023-02-13 14:45:45 +00:00
< button id = "create" title = "Create HA cluster" > {{lang.words.create|title()}}< / button >
2018-05-05 12:40:41 +00:00
< / td >
2022-02-02 20:23:33 +00:00
< td > < / td >
2018-05-05 12:40:41 +00:00
< / tr >
< / table >
2019-10-21 06:00:16 +00:00
< table class = "overview" >
2023-02-13 14:45:45 +00:00
< caption > < h3 > {{lang.words.add|title()}} VRRP {{lang.words.to}} {{lang.words.an}} {{lang.words.existing2}} {{lang.words.cluster}}< / h3 > < / caption >
2018-05-05 12:40:41 +00:00
< tr class = "overviewHead" >
2023-02-13 14:45:45 +00:00
< td class = "padding10 first-collumn" > {{lang.words.current2|title()}} {{lang.words.installation}}< / td >
< td class = "padding10 first-collumn" > {{lang.words.master|title()}}< / td >
< td class = "padding10 first-collumn" > {{lang.words.current2|title()}} {{lang.words.installation}}< / td >
< td > {{lang.words.slave|title()}}< / td >
< td > < span title = "{{lang.phrases.int_vrrp}}" > {{lang.words.master|title()}} {{lang.words.interface|title()}}< / span > < / td >
< td > < span title = "{{lang.phrases.int_vrrp}}" > {{lang.words.slave|title()}} {{lang.words.interface|title()}}< / span > < / td >
2018-05-05 12:40:41 +00:00
< td > VRRP IP< / td >
< / tr >
< tr >
2022-02-02 20:23:33 +00:00
< td class = "padding10 first-collumn" id = "cur_master_ver-add" > < / td >
2018-05-05 12:40:41 +00:00
< td class = "padding10 first-collumn" >
< select id = "master-add" >
2021-08-08 13:02:00 +00:00
< option disabled selected > ------< / option >
2018-05-05 12:40:41 +00:00
{% for select in selects %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
2022-02-02 20:23:33 +00:00
< td class = "padding10 first-collumn" id = "cur_slave_ver-add" > < / td >
2019-10-21 06:00:16 +00:00
< td >
2018-05-05 12:40:41 +00:00
< select id = "slave-add" >
2021-08-08 13:02:00 +00:00
< option disabled selected > ------< / option >
2018-05-05 12:40:41 +00:00
{% for select in selects %}
< option value = "{{ select.2 }}" > {{ select.1 }}< / option >
{% endfor %}
< / select >
< / td >
2023-02-13 14:45:45 +00:00
< td > {{ input('interface-add', size='7', title=lang.phrases.int_vrrp) }}< / td >
< td > {{ input('slave_interface-add', size='7', title=lang.phrases.int_vrrp) }}< / td >
2019-11-06 15:15:41 +00:00
< td > {{ input('vrrp-ip-add', size='14') }}< / td >
2022-06-02 09:08:37 +00:00
< / tr >
< tr class = "overviewHead" >
< td > < / td >
< td > < / td >
< td > < / td >
< td > < / td >
2023-04-11 07:10:38 +00:00
< td class = "padding10 first-collumn" style = "padding-left: 10px;" > < span title = "If checked Roxy-WI will restart Keepalived" > {{lang.words.restart|title()}}< / span > < / td >
< td class = "help_cursor" title = "If checked, Keepalived master will reclaim VRRP after recovered" > {{lang.words.return|title()}} {{lang.words.to}} {{lang.words.master|title()}} state< / td >
2022-06-02 09:08:37 +00:00
< td > < / td >
< / tr >
< tr >
< td > < / td >
< td > < / td >
< td > < / td >
< td > < / td >
< td class = "padding10 first-collumn checkbox help_cursor" > {{ checkbox('kp', title='If checked Roxy-WI will restart Keepalived') }}< / td >
2022-02-02 20:23:33 +00:00
< td class = "syn-flood-protection-field" > {{ checkbox('add_return_to_master', checked='checked') }}< / td >
2018-05-05 12:40:41 +00:00
< td >
2023-02-13 14:45:45 +00:00
< button id = "add-vrrp" title = "Add a HA configuration" style = "width: 70px;" > {{lang.words.add|title()}}< / button >
2018-05-05 12:40:41 +00:00
< / td >
< / tr >
< / table >
< div id = "ajax" > < / div >
2021-07-15 03:14:13 +00:00
< div class = "add-note alert addName alert-info" style = "width: inherit; margin-right: 15px;" >
2023-02-13 14:45:45 +00:00
{{lang.words.read|title()}} < a href = "https://roxy-wi.org/howto.py/ha_cluster" title = "How to create high available cluster" target = "_blank" > {{lang.phrases.howto_ha}}< / a >
2020-12-30 13:20:52 +00:00
< / div >
2023-03-31 17:37:26 +00:00
< div id = "server_creating" style = "display: none;" title = "{{lang.phrases.creating_ha}}" >
2021-03-04 05:53:27 +00:00
< ul style = "padding: 20px 20px 0px 20px;font-size: 15px;" >
2023-02-13 14:45:45 +00:00
< li id = "creating-master" class = "server-creating proccessing" > {{lang.words.installing|title()}} {{lang.words.master|title()}} Keepalived...< / li >
< li id = "creating-slave" class = "server-creating proccessing" > {{lang.words.installing|title()}} {{lang.words.slave|title()}} Keepalived...< / li >
2021-03-04 05:53:27 +00:00
< div id = "haproxy_installing_div" style = "display: none" >
2023-02-13 14:45:45 +00:00
< li id = "creating-haproxy-master" class = "server-creating" > {{lang.words.installing|title()}} {{lang.words.master|title()}} Haproxy...< / li >
< li id = "creating-haproxy-slave" class = "server-creating" > {{lang.words.installing|title()}} {{lang.words.slave|title()}} Haproxy...< / li >
2021-03-04 05:53:27 +00:00
< / div >
< div id = "nginx_installing_div" style = "display: none" >
2023-02-13 14:45:45 +00:00
< li id = "creating-nginx-master" class = "server-creating" > {{lang.words.installing|title()}} {{lang.words.master|title()}} NGINX...< / li >
< li id = "creating-nginx-slave" class = "server-creating" > {{lang.words.installing|title()}} {{lang.words.slave|title()}} NGINX...< / li >
2021-03-04 05:53:27 +00:00
< / div >
< / ul >
< div id = "wait-mess" > < / div >
< div id = "created-mess" class = "alert alert-success" style = "display:none;" > < / div >
< div id = "creating-error" class = "alert alert-danger" style = "display:none;" > < / div >
< div id = "creating-warning" class = "alert alert-warning" style = "display:none;" > < / div >
< div class = "progress-bar-striped" >
< div id = "creating-progress" style = "width: 0%;" > < / div >
< / div >
< / div >
2023-03-31 17:37:26 +00:00
< div id = "address_creating" style = "display: none;" title = "{{lang.phrases.adding_vrrp}}" >
2021-03-05 05:02:52 +00:00
< ul style = "padding: 20px 20px 0px 20px;font-size: 15px;" >
2023-02-13 14:45:45 +00:00
< li id = "creating-master-add" class = "server-creating proccessing" > {{lang.words.creating|title()}} {{lang.words.a}} {{lang.words.new}} {{lang.words.address}} {{lang.words.on}} {{lang.words.master|title()}} Keepalived...< / li >
< li id = "creating-slave-add" class = "server-creating proccessing" > {{lang.words.creating|title()}} {{lang.words.a}} {{lang.words.new}} {{lang.words.address}} {{lang.words.on}} {{lang.words.slave|title()}} Keepalived...< / li >
2021-03-05 05:02:52 +00:00
< / ul >
< div id = "wait-mess-add" > < / div >
< div id = "created-mess-add" class = "alert alert-success" style = "display:none;" > < / div >
< div id = "creating-error-add" class = "alert alert-danger" style = "display:none;" > < / div >
< div id = "creating-warning-add" class = "alert alert-warning" style = "display:none;" > < / div >
< div class = "progress-bar-striped" >
< div id = "creating-progress-add" style = "width: 0%;" > < / div >
< / div >
< / div >
2022-04-27 18:10:26 +00:00
{% endif %}
{% endblock %}