Changelog: https://roxy-wi.org/changelog#6_3_8
pull/364/head
Aidaho 2 years ago
parent 60aee2217c
commit c959240280

@ -36,6 +36,20 @@
- { path: "{{ service_dir }}/conf.d"} - { path: "{{ service_dir }}/conf.d"}
when: service not in ansible_facts.packages when: service not in ansible_facts.packages
- name: Creates directorys for Apache
file:
path: "{{ item.path }}"
state: directory
mode: 0775
owner: "{{ service_user }}"
group: "{{ service_group }}"
with_items:
- { path: "{{ service_dir }}"}
- { path: "{{ service_dir }}/{{ conf_folder }}"}
when:
- service not in ansible_facts.packages
- service = "apache"
- name: Set passlib version - name: Set passlib version
set_fact: set_fact:

@ -37,6 +37,10 @@ PWD=`pwd`
PWD=$PWD/scripts/ansible/ PWD=$PWD/scripts/ansible/
echo "$HOST ansible_port=$SSH_PORT" > $PWD/$HOST echo "$HOST ansible_port=$SSH_PORT" > $PWD/$HOST
if [[ $MASTER == 'BACKUP' ]]; then
sleep 5
fi
if [[ $KEY == "" ]]; then if [[ $KEY == "" ]]; then
ansible-playbook $PWD/roles/keepalived.yml -e "ansible_user=$USER ansible_ssh_pass='$PASS' variable_host=$HOST SYN_FLOOD=$SYN_FLOOD PROXY=$PROXY MASTER=$MASTER ETH=$ETH ETH_SLAVE=$ETH_SLAVE keepalived_path_logs=$keepalived_path_logs IP=$IP RESTART=$RESTART RETURN_TO_MASTER=$RETURN_TO_MASTER ADD_VRRP=$ADD_VRRP router_id=$router_id HAPROXY=$HAPROXY NGINX=$NGINX SSH_PORT=$SSH_PORT" -i $PWD/$HOST ansible-playbook $PWD/roles/keepalived.yml -e "ansible_user=$USER ansible_ssh_pass='$PASS' variable_host=$HOST SYN_FLOOD=$SYN_FLOOD PROXY=$PROXY MASTER=$MASTER ETH=$ETH ETH_SLAVE=$ETH_SLAVE keepalived_path_logs=$keepalived_path_logs IP=$IP RESTART=$RESTART RETURN_TO_MASTER=$RETURN_TO_MASTER ADD_VRRP=$ADD_VRRP router_id=$router_id HAPROXY=$HAPROXY NGINX=$NGINX SSH_PORT=$SSH_PORT" -i $PWD/$HOST
else else

@ -27,13 +27,15 @@ except Exception:
if service in ('haproxy', 'nginx', 'apache'): if service in ('haproxy', 'nginx', 'apache'):
service_desc = sql.select_service(service) service_desc = sql.select_service(service)
if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id): if roxywi_auth.check_login(user_params['user_uuid'], user_params['token'], service=service_desc.service_id):
roxywi_common.get_dick_permit(service=service_desc.slug) servers = roxywi_common.get_dick_permit(service=service_desc.slug)
else: else:
print('<meta http-equiv="refresh" content="0; url=/app/overview.py">') print('<meta http-equiv="refresh" content="0; url=/app/overview.py">')
rendered_template = template.render( rendered_template = template.render(
h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], onclick="showStats()", h2=1, autorefresh=1, role=user_params['role'], user=user_params['user'], onclick="showStats()",
selects=user_params['servers'], serv=serv, service=service, user_services=user_params['user_services'], selects=servers, serv=serv, service=service, user_services=user_params['user_services'],
token=user_params['token'], select_id="serv", lang=user_params['lang'], service_desc=service_desc token=user_params['token'], select_id="serv", lang=user_params['lang'], service_desc=service_desc
) )
print(rendered_template) print(rendered_template)

@ -142,7 +142,7 @@
<div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;"> <div class="add-note alert addName alert-info" style="width: inherit; margin-right: 15px;">
{{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> {{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>
</div> </div>
<div id="server_creating" style="display: none;"> <div id="server_creating" style="display: none;" title="{{lang.phrases.creating_ha}}">
<ul style="padding: 20px 20px 0px 20px;font-size: 15px;"> <ul style="padding: 20px 20px 0px 20px;font-size: 15px;">
<li id="creating-master" class="server-creating proccessing">{{lang.words.installing|title()}} {{lang.words.master|title()}} Keepalived...</li> <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> <li id="creating-slave" class="server-creating proccessing">{{lang.words.installing|title()}} {{lang.words.slave|title()}} Keepalived...</li>
@ -163,7 +163,7 @@
<div id="creating-progress" style="width: 0%;"></div> <div id="creating-progress" style="width: 0%;"></div>
</div> </div>
</div> </div>
<div id="address_creating" style="display: none;"> <div id="address_creating" style="display: none;" title="{{lang.phrases.adding_vrrp}}">
<ul style="padding: 20px 20px 0px 20px;font-size: 15px;"> <ul style="padding: 20px 20px 0px 20px;font-size: 15px;">
<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-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> <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>

@ -251,6 +251,7 @@
"how_to_install_metrics": "how to install Metrics service", "how_to_install_metrics": "how to install Metrics service",
"checker_not_installed": "You do not have the Checker service installed", "checker_not_installed": "You do not have the Checker service installed",
"how_to_install_checker": "how to install checker service", "how_to_install_checker": "how to install checker service",
"auto_start_not_installed": "You do not have the Auto start service installed",
"enable_avg_table": "Enable display of the table of averages", "enable_avg_table": "Enable display of the table of averages",
"disable_avg_table": "Disable display of the table of averages", "disable_avg_table": "Disable display of the table of averages",
"protected_title": "If protection is enabled, then the server is inaccessible for editing by everyone except the admin role", "protected_title": "If protection is enabled, then the server is inaccessible for editing by everyone except the admin role",
@ -300,6 +301,14 @@
"select_newer_config": "Select a newer config", "select_newer_config": "Select a newer config",
"not_checked": "Without check", "not_checked": "Without check",
"show_not_checked": "Show servers without checking", "show_not_checked": "Show servers without checking",
"read_desc_runtime_api": "You can read the description of all Run Time API parameters",
"read_desc_statuses": "You can read the description about statuses",
"login_or_pass_incorrect": "Login or password is incorrect",
"can_try_again": "You can try again in",
"is_not_installed": "is not installed",
"server_is_inaccessible_for_editing": "This server is inaccessible for editing by everyone except the admin role",
"creating_ha": "Creating a new High Availability cluster",
"adding_vrrp": "Adding a new VRRP address",
} }
%} %}
{% set roles = { {% set roles = {
@ -550,6 +559,7 @@
"interval": "interval", "interval": "interval",
"desc": "description", "desc": "description",
"login": "login", "login": "login",
"login2": "login",
"role": "role", "role": "role",
"roles": "roles", "roles": "roles",
"subs": "subscription", "subs": "subscription",
@ -557,6 +567,7 @@
"plan": "plan", "plan": "plan",
"pay_method": "pay method", "pay_method": "pay method",
"active": "active", "active": "active",
"actives": "actives",
"open": "open", "open": "open",
"opened": "opened", "opened": "opened",
"edit": "edit", "edit": "edit",
@ -574,6 +585,7 @@
"show": "show", "show": "show",
"run": "run", "run": "run",
"running": "running", "running": "running",
"running2": "running",
"statistics": "statistics", "statistics": "statistics",
"rollback": "rollback", "rollback": "rollback",
"previous": "previous", "previous": "previous",
@ -585,6 +597,7 @@
"backend": "backend", "backend": "backend",
"maintain": "maintain", "maintain": "maintain",
"drain": "drain", "drain": "drain",
"drains": "drains",
"number": "number", "number": "number",
"rows": "rows", "rows": "rows",
"row": "row", "row": "row",
@ -665,6 +678,7 @@
"connections2": "connections", "connections2": "connections",
"enable": "enable", "enable": "enable",
"enabled": "enabled", "enabled": "enabled",
"enabled2": "enabled",
"virt": "virt", "virt": "virt",
"virtual": "virtual", "virtual": "virtual",
"check": "check", "check": "check",
@ -833,5 +847,9 @@
"recent": "recent", "recent": "recent",
"already": "already", "already": "already",
"disable": "disable", "disable": "disable",
"worker": "worker",
"worker2": "worker",
"processes": "processes",
"position": "position",
} }
%} %}

@ -247,10 +247,11 @@
"howto_user": "Comment utilser", "howto_user": "Comment utilser",
"select_file": "Selectionner un fichier", "select_file": "Selectionner un fichier",
"read_how_it_works": "Vous pouvez lire comment cela fonctionne", "read_how_it_works": "Vous pouvez lire comment cela fonctionne",
"metrics_not_installed": "Vous n\'avez pas installer le service Metrics.", "metrics_not_installed": "Vous n\'avez pas installer le service Metrics",
"how_to_install_metrics": "Comment installer le service Metrics", "how_to_install_metrics": "Comment installer le service Metrics",
"checker_not_installed": "Vous n'avez pas installé le service Checker", "checker_not_installed": "Vous n'avez pas installé le service Checker",
"how_to_install_checker": "comment installer le service de vérification", "how_to_install_checker": "comment installer le service de vérification",
"auto_start_not_installed": "Vous n'avez pas installé le service de démarrage automatique",
"enable_avg_table": "Activer l\'affichage du tableau des moyennes", "enable_avg_table": "Activer l\'affichage du tableau des moyennes",
"disable_avg_table": "Désactiver l\'affichage du tableau des moyennes", "disable_avg_table": "Désactiver l\'affichage du tableau des moyennes",
"protected_title": "Si la protection est activée, le serveur est inaccessible pour modification par tout le monde, sauf par le rôle d\'administrateur.", "protected_title": "Si la protection est activée, le serveur est inaccessible pour modification par tout le monde, sauf par le rôle d\'administrateur.",
@ -300,6 +301,14 @@
"select_newer_config": "Sélectionnez une configuration plus récente", "select_newer_config": "Sélectionnez une configuration plus récente",
"not_checked": "Sans chèque", "not_checked": "Sans chèque",
"show_not_checked": "Afficher les serveurs sans vérifier", "show_not_checked": "Afficher les serveurs sans vérifier",
"read_desc_runtime_api": "Vous pouvez lire la description de tous les paramètres de l'API RunTime",
"read_desc_statuses": "Vous pouvez lire la description des statuts",
"login_or_pass_incorrect": "L'identifiant ou le mot de passe est incorrect",
"can_try_again": "Vous pouvez réessayer dans",
"is_not_installed": "n'est pas installé",
"server_is_inaccessible_for_editing": "Ce serveur est inaccessible pour modification par tout le monde sauf le rôle d'administrateur",
"creating_ha": "Créer un nouveau cluster haute disponibilité",
"adding_vrrp": "Ajout d'une nouvelle adresse VRRP",
} }
%} %}
{% set roles = { {% set roles = {
@ -550,6 +559,7 @@
"interval": "interval", "interval": "interval",
"desc": "déscription", "desc": "déscription",
"login": "connexion", "login": "connexion",
"login2": "connexion",
"role": "rôle", "role": "rôle",
"roles": "rôles", "roles": "rôles",
"subs": "abonnement", "subs": "abonnement",
@ -557,6 +567,7 @@
"plan": "plan", "plan": "plan",
"pay_method": "méthode de paiement", "pay_method": "méthode de paiement",
"active": "actif", "active": "actif",
"actives": "actifs",
"open": "ouvert", "open": "ouvert",
"opened": "ouvert", "opened": "ouvert",
"edit": "éditer", "edit": "éditer",
@ -574,6 +585,7 @@
"show": "afficher", "show": "afficher",
"run": "exécuter", "run": "exécuter",
"running": "exécution en cours", "running": "exécution en cours",
"running2": "lancés",
"statistics": "statistiques", "statistics": "statistiques",
"rollback": "retour en arrière", "rollback": "retour en arrière",
"previous": "précédent", "previous": "précédent",
@ -585,6 +597,7 @@
"backend": "backend", "backend": "backend",
"maintain": "maintain", "maintain": "maintain",
"drain": "drain", "drain": "drain",
"drains": "draine",
"number": "nombre", "number": "nombre",
"rows": "lignes", "rows": "lignes",
"row": "ligne", "row": "ligne",
@ -665,6 +678,7 @@
"connections2": "connections", "connections2": "connections",
"enable": "activer", "enable": "activer",
"enabled": "activé", "enabled": "activé",
"enabled2": "activé",
"virt": "virt", "virt": "virt",
"virtual": "virtuel", "virtual": "virtuel",
"check": "check", "check": "check",
@ -833,5 +847,9 @@
"recent": "récent", "recent": "récent",
"already": "déjà", "already": "déjà",
"disable": "désactiver", "disable": "désactiver",
"worker": "ouvrier",
"worker2": "ouvrier",
"processes": "processus",
"position": "position",
} }
%} %}

@ -247,10 +247,11 @@
"howto_user": "Como utilizar", "howto_user": "Como utilizar",
"select_file": "Escolhe um arquivo", "select_file": "Escolhe um arquivo",
"read_how_it_works": "Você pode ler como isso funciona", "read_how_it_works": "Você pode ler como isso funciona",
"metrics_not_installed": "Você não instalou o serviço Métricas.", "metrics_not_installed": "Você não instalou o serviço Métricas",
"how_to_install_metrics": "Como instalar o serviço Métricas", "how_to_install_metrics": "Como instalar o serviço Métricas",
"checker_not_installed": "Você não tem o serviço Checker instalado", "checker_not_installed": "Você não tem o serviço Checker instalado",
"how_to_install_checker": "como instalar o serviço verificador", "how_to_install_checker": "como instalar o serviço verificador",
"auto_start_not_installed": "Você não tem o serviço de início automático instalado",
"enable_avg_table": "Ativar exibição da tabela de médias", "enable_avg_table": "Ativar exibição da tabela de médias",
"disable_avg_table": "Desativar exibição da tabela de médiasDisable display of the table of averages", "disable_avg_table": "Desativar exibição da tabela de médiasDisable display of the table of averages",
"protected_title": "Se a proteção estiver ativada, o servidor ficará inacessível para edição por todos, exceto administradores", "protected_title": "Se a proteção estiver ativada, o servidor ficará inacessível para edição por todos, exceto administradores",
@ -300,6 +301,14 @@
"select_newer_config": "Selecione uma configuração mais nova", "select_newer_config": "Selecione uma configuração mais nova",
"not_checked": "Sem cheque", "not_checked": "Sem cheque",
"show_not_checked": "Mostrar servidores sem verificar", "show_not_checked": "Mostrar servidores sem verificar",
"read_desc_runtime_api": "Você pode ler a descrição de todos os parâmetros da API RunTime",
"read_desc_statuses": "Você pode ler a descrição sobre os status",
"login_or_pass_incorrect": "Login ou senha está incorreto",
"can_try_again": "Você pode tentar novamente em",
"is_not_installed": "não está instalado",
"server_is_inaccessible_for_editing": "Este servidor está inacessível para edição por todos, exceto a função de administrador",
"creating_ha": "Criando um novo cluster de alta disponibilidade",
"adding_vrrp": "Adicionando um novo endereço VRRP",
} }
%} %}
{% set roles = { {% set roles = {
@ -550,6 +559,7 @@
"interval": "interval", "interval": "interval",
"desc": "descrição", "desc": "descrição",
"login": "login", "login": "login",
"login2": "login",
"role": "função", "role": "função",
"roles": "funções", "roles": "funções",
"subs": "inscrição", "subs": "inscrição",
@ -557,6 +567,7 @@
"plan": "plan", "plan": "plan",
"pay_method": "método de pagamento.", "pay_method": "método de pagamento.",
"active": "ativo", "active": "ativo",
"actives": "ativos",
"open": "abrir", "open": "abrir",
"opened": "aberto", "opened": "aberto",
"edit": "editar", "edit": "editar",
@ -574,6 +585,7 @@
"show": "mostrar", "show": "mostrar",
"run": "executar", "run": "executar",
"running": "executando", "running": "executando",
"running2": "iniciados",
"statistics": "estatisticas", "statistics": "estatisticas",
"rollback": "rollback", "rollback": "rollback",
"previous": "anterior", "previous": "anterior",
@ -585,6 +597,7 @@
"backend": "backend", "backend": "backend",
"maintain": "manter", "maintain": "manter",
"drain": "desativado", "drain": "desativado",
"drains": "drenos",
"number": "número", "number": "número",
"rows": "linhas", "rows": "linhas",
"row": "linha", "row": "linha",
@ -665,6 +678,7 @@
"connections2": "conexões", "connections2": "conexões",
"enable": "ativar", "enable": "ativar",
"enabled": "desativar", "enabled": "desativar",
"enabled2": "desativar",
"virt": "virt", "virt": "virt",
"virtual": "virtual", "virtual": "virtual",
"check": "verificar", "check": "verificar",
@ -833,5 +847,9 @@
"recent": "recente", "recent": "recente",
"already": "já", "already": "já",
"disable": "desabilitar", "disable": "desabilitar",
"worker": "trabalhador",
"worker2": "trabalhador",
"processes": "processos",
"position": "posição",
} }
%} %}

@ -251,6 +251,7 @@
"how_to_install_metrics": "как установить сервис Metrics", "how_to_install_metrics": "как установить сервис Metrics",
"checker_not_installed": "У вас не установлен сервис Checker", "checker_not_installed": "У вас не установлен сервис Checker",
"how_to_install_checker": "как установить сервис Checker", "how_to_install_checker": "как установить сервис Checker",
"auto_start_not_installed": " вас не установлен сервис Auto start",
"enable_avg_table": "Включить отображение таблицы средних значений", "enable_avg_table": "Включить отображение таблицы средних значений",
"disable_avg_table": "Выключить отображение таблицы средних значений", "disable_avg_table": "Выключить отображение таблицы средних значений",
"protected_title": "Защищенный сервер может редактировать только пользователь с ролью admin", "protected_title": "Защищенный сервер может редактировать только пользователь с ролью admin",
@ -300,6 +301,14 @@
"select_newer_config": "Выберите более новую конфигурацию", "select_newer_config": "Выберите более новую конфигурацию",
"not_checked": "Без проверки", "not_checked": "Без проверки",
"show_not_checked": "Показать сервера без проверки", "show_not_checked": "Показать сервера без проверки",
"read_desc_runtime_api": "Вы можете прочитать описание всех параметров RunTime API",
"read_desc_statuses": "Вы можете прочитать описание статусов",
"login_or_pass_incorrect": "Логин или пароль неверный",
"can_try_again": "Вы можете попробовать еще раз через",
"is_not_installed": "не установлен",
"server_is_inaccessible_for_editing": "Этот сервер недоступен для редактирования всеми, кроме роли администратора",
"creating_ha": "Создание нового кластера высокой доступности",
"adding_vrrp": "Добавление нового адреса VRRP",
} }
%} %}
{% set roles = { {% set roles = {
@ -550,6 +559,7 @@
"interval": "интервал", "interval": "интервал",
"desc": "описание", "desc": "описание",
"login": "логин", "login": "логин",
"login2": "войти",
"role": "роль", "role": "роль",
"roles": "роли", "roles": "роли",
"subs": "подписка", "subs": "подписка",
@ -557,6 +567,7 @@
"plan": "план", "plan": "план",
"pay_method": "платежный метод", "pay_method": "платежный метод",
"active": "активный", "active": "активный",
"actives": "активные",
"open": "открыть", "open": "открыть",
"opened": "открытые", "opened": "открытые",
"edit": "редактировать", "edit": "редактировать",
@ -574,6 +585,7 @@
"show": "показать", "show": "показать",
"run": "запустить", "run": "запустить",
"running": "запущенный", "running": "запущенный",
"running2": "запущенно",
"statistics": "статистики", "statistics": "статистики",
"rollback": "откатить", "rollback": "откатить",
"previous": "предыдущий", "previous": "предыдущий",
@ -585,6 +597,7 @@
"backend": "бэкенд", "backend": "бэкенд",
"maintain": "в обслуживание", "maintain": "в обслуживание",
"drain": "отключенный", "drain": "отключенный",
"drains": "отключенные",
"number": "количество", "number": "количество",
"rows": "строк", "rows": "строк",
"row": "строка", "row": "строка",
@ -665,6 +678,7 @@
"connections2": "соединения", "connections2": "соединения",
"enable": "активировать", "enable": "активировать",
"enabled": "активный", "enabled": "активный",
"enabled2": "включен",
"virt": "вирт", "virt": "вирт",
"virtual": "виртуальный", "virtual": "виртуальный",
"check": "проверить", "check": "проверить",
@ -833,5 +847,9 @@
"recent": "недавние", "recent": "недавние",
"already": "уже", "already": "уже",
"disable": "отключить", "disable": "отключить",
"worker": "рабочий",
"worker2": "рабочих",
"processes": "процессов",
"position": "позицию",
} }
%} %}

@ -105,11 +105,12 @@ $( function() {
autoFocus: true, autoFocus: true,
minLength: -1 minLength: -1
}); });
var server_creating_title = $( "#server_creating" ).attr('title');
var server_creating = $( "#server_creating" ).dialog({ var server_creating = $( "#server_creating" ).dialog({
autoOpen: false, autoOpen: false,
width: 574, width: 574,
modal: true, modal: true,
title: "Creating a new HA cluster", title: server_creating_title,
buttons: { buttons: {
Close: function() { Close: function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );
@ -118,11 +119,12 @@ $( function() {
} }
} }
}); });
var address_creating_title = $( "#server_creating" ).attr('title');
var address_add = $( "#address_creating" ).dialog({ var address_add = $( "#address_creating" ).dialog({
autoOpen: false, autoOpen: false,
width: 574, width: 574,
modal: true, modal: true,
title: "Adding a new VRRP address", title: address_creating_title,
buttons: { buttons: {
Close: function() { Close: function() {
$( this ).dialog( "close" ); $( this ).dialog( "close" );

Loading…
Cancel
Save