mirror of
https://github.com/1C-Company/docker_fresh.git
synced 2024-12-12 10:45:25 +02:00
Исправил ошибку формата потока
This commit is contained in:
parent
42342c6b12
commit
7ca581e187
@ -72,7 +72,7 @@ services:
|
|||||||
command: srv+cli
|
command: srv+cli
|
||||||
volumes:
|
volumes:
|
||||||
- 1c_pg_socket:/tmp/postgresql/socket
|
- 1c_pg_socket:/tmp/postgresql/socket
|
||||||
- ./artifacts/srv/data:/var/lib/1c/data
|
- 1c_server_data:/var/lib/1c/data
|
||||||
- ./artifacts/srv/log:/var/log/1c
|
- ./artifacts/srv/log:/var/log/1c
|
||||||
- ./mnt:/mnt
|
- ./mnt:/mnt
|
||||||
- /tmp/.aksusb:/tmp/.aksusb
|
- /tmp/.aksusb:/tmp/.aksusb
|
||||||
@ -154,4 +154,5 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
1c_pg_data:
|
1c_pg_data:
|
||||||
1c_pg_socket:
|
1c_pg_socket:
|
||||||
|
1c_server_data:
|
@ -26,6 +26,16 @@ def new_docker_command(extra_path=None):
|
|||||||
command.append(current_distr_path + ':/out_files')
|
command.append(current_distr_path + ':/out_files')
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
def add_command_copy_file_from_mnt_to_tmp(commands, container_name, full_path, file_name):
|
||||||
|
|
||||||
|
commands.append('docker')
|
||||||
|
commands.append('exec')
|
||||||
|
commands.append(container_name)
|
||||||
|
commands.append('sh')
|
||||||
|
commands.append('-c')
|
||||||
|
commands.append('"cp {} /tmp/{}"'.format(full_path, file_name))
|
||||||
|
commands.append('&&')
|
||||||
|
|
||||||
def web_publish_command(host_name, conf_name, internal, descriptor, base_name=''):
|
def web_publish_command(host_name, conf_name, internal, descriptor, base_name=''):
|
||||||
|
|
||||||
if internal:
|
if internal:
|
||||||
@ -59,32 +69,42 @@ def get_out_file_name_command(action, ib_name):
|
|||||||
return '/Out "/mnt/{}_{}.out"'.format(action, ib_name)
|
return '/Out "/mnt/{}_{}.out"'.format(action, ib_name)
|
||||||
|
|
||||||
def create_ib_command(host_name, ib_name, file_name, job_block, action):
|
def create_ib_command(host_name, ib_name, file_name, job_block, action):
|
||||||
|
|
||||||
|
full_path = '/mnt/{}'.format(file_name)
|
||||||
|
container_name = 'srv.{}'.format(host_name)
|
||||||
|
|
||||||
command = []
|
command = []
|
||||||
|
add_command_copy_file_from_mnt_to_tmp(command, container_name, full_path, file_name)
|
||||||
command.append('docker')
|
command.append('docker')
|
||||||
command.append('exec')
|
command.append('exec')
|
||||||
command.append('-t')
|
command.append('-t')
|
||||||
command.append('srv.' + host_name)
|
command.append(container_name)
|
||||||
command.append('{}1cv8'.format(path_to_1c))
|
command.append('{}1cv8'.format(path_to_1c))
|
||||||
command.append('CREATEINFOBASE')
|
command.append('CREATEINFOBASE')
|
||||||
command.append('"Srvr=srv;Ref={0};DBMS=PostgreSQL;DBSrvr=/tmp/postgresql/socket;DB={0};DBUID=postgres;LicDstr=Y;Locale=ru_RU;CrSQLDB=Y;SchJobDn={1};"'.format(
|
command.append('"Srvr=srv;Ref={0};DBMS=PostgreSQL;DBSrvr=/tmp/postgresql/socket;DB={0};DBUID=postgres;LicDstr=Y;Locale=ru_RU;CrSQLDB=Y;SchJobDn={1};"'.format(
|
||||||
ib_name, job_block))
|
ib_name, job_block))
|
||||||
command.append('/UseTemplate')
|
command.append('/UseTemplate')
|
||||||
command.append('/mnt/{}'.format(file_name))
|
command.append('/tmp/{}'.format(file_name))
|
||||||
command.append(get_out_file_name_command(action, ib_name))
|
command.append(get_out_file_name_command(action, ib_name))
|
||||||
return command
|
return command
|
||||||
|
|
||||||
def install_control_ext_command(host_name, ib_name, action):
|
def install_control_ext_command(host_name, ib_name, action):
|
||||||
|
|
||||||
|
full_path = '/mnt/other-files/cfe/api_1cfresh.cfe'
|
||||||
|
container_name = 'srv.{}'.format(host_name)
|
||||||
|
|
||||||
command = []
|
command = []
|
||||||
|
add_command_copy_file_from_mnt_to_tmp(command, container_name, full_path, 'api_1cfresh.cfe')
|
||||||
command.append('docker')
|
command.append('docker')
|
||||||
command.append('exec')
|
command.append('exec')
|
||||||
command.append('-t')
|
command.append('-t')
|
||||||
command.append('srv.' + host_name)
|
command.append(container_name)
|
||||||
command.append('{}1cv8'.format(path_to_1c))
|
command.append('{}1cv8'.format(path_to_1c))
|
||||||
command.append('DESIGNER')
|
command.append('DESIGNER')
|
||||||
command.append('/S')
|
command.append('/S')
|
||||||
command.append('"srv\\{}"'.format(ib_name))
|
command.append('"srv\\{}"'.format(ib_name))
|
||||||
command.append('/LoadCfg')
|
command.append('/LoadCfg')
|
||||||
command.append('"/mnt/other-files/cfe/api_1cfresh.cfe"')
|
command.append('"/tmp/api_1cfresh.cfe"')
|
||||||
command.append('-Extension')
|
command.append('-Extension')
|
||||||
command.append('"api_1cfresh"')
|
command.append('"api_1cfresh"')
|
||||||
command.append('/UpdateDBCfg')
|
command.append('/UpdateDBCfg')
|
||||||
@ -92,17 +112,22 @@ def install_control_ext_command(host_name, ib_name, action):
|
|||||||
return command
|
return command
|
||||||
|
|
||||||
def install_sm_ext_command(host_name, ib_name, action):
|
def install_sm_ext_command(host_name, ib_name, action):
|
||||||
|
|
||||||
|
full_path = '/mnt/other-files/cfe/УправлениеМС.cfe'
|
||||||
|
container_name = 'srv.{}'.format(host_name)
|
||||||
|
|
||||||
command = []
|
command = []
|
||||||
|
add_command_copy_file_from_mnt_to_tmp(command, container_name, full_path, 'УправлениеМС.cfe')
|
||||||
command.append('docker')
|
command.append('docker')
|
||||||
command.append('exec')
|
command.append('exec')
|
||||||
command.append('-t')
|
command.append('-t')
|
||||||
command.append('srv.' + host_name)
|
command.append(container_name)
|
||||||
command.append('{}1cv8'.format(path_to_1c))
|
command.append('{}1cv8'.format(path_to_1c))
|
||||||
command.append('DESIGNER')
|
command.append('DESIGNER')
|
||||||
command.append('/S')
|
command.append('/S')
|
||||||
command.append('"srv\\{}"'.format(ib_name))
|
command.append('"srv\\{}"'.format(ib_name))
|
||||||
command.append('/LoadCfg')
|
command.append('/LoadCfg')
|
||||||
command.append('"/mnt/other-files/cfe/УправлениеМС.cfe"')
|
command.append('"/tmp/УправлениеМС.cfe"')
|
||||||
command.append('-Extension')
|
command.append('-Extension')
|
||||||
command.append('"УправлениеМС"')
|
command.append('"УправлениеМС"')
|
||||||
command.append('/UpdateDBCfg')
|
command.append('/UpdateDBCfg')
|
||||||
@ -110,17 +135,23 @@ def install_sm_ext_command(host_name, ib_name, action):
|
|||||||
return command
|
return command
|
||||||
|
|
||||||
def install_ext_command(host_name, ib_name, action):
|
def install_ext_command(host_name, ib_name, action):
|
||||||
|
|
||||||
|
full_path = '/mnt/{}.cfe'.format(ib_name)
|
||||||
|
file_name = '{}.cfe'.format(ib_name)
|
||||||
|
container_name = 'srv.{}'.format(host_name)
|
||||||
|
|
||||||
command = []
|
command = []
|
||||||
|
add_command_copy_file_from_mnt_to_tmp(command, container_name, full_path, file_name)
|
||||||
command.append('docker')
|
command.append('docker')
|
||||||
command.append('exec')
|
command.append('exec')
|
||||||
command.append('-t')
|
command.append('-t')
|
||||||
command.append('srv.' + host_name)
|
command.append(container_name)
|
||||||
command.append('{}1cv8'.format(path_to_1c))
|
command.append('{}1cv8'.format(path_to_1c))
|
||||||
command.append('DESIGNER')
|
command.append('DESIGNER')
|
||||||
command.append('/S')
|
command.append('/S')
|
||||||
command.append('"srv\\{}"'.format(ib_name))
|
command.append('"srv\\{}"'.format(ib_name))
|
||||||
command.append('/LoadCfg')
|
command.append('/LoadCfg')
|
||||||
command.append('"/mnt/{}.cfe"'.format(ib_name))
|
command.append('"/tmp/{}"'.format(file_name))
|
||||||
command.append('-Extension')
|
command.append('-Extension')
|
||||||
command.append('"fresh"')
|
command.append('"fresh"')
|
||||||
command.append('/UpdateDBCfg')
|
command.append('/UpdateDBCfg')
|
||||||
@ -128,17 +159,22 @@ def install_ext_command(host_name, ib_name, action):
|
|||||||
return command
|
return command
|
||||||
|
|
||||||
def disable_safe_mode(host_name, ib_name, action):
|
def disable_safe_mode(host_name, ib_name, action):
|
||||||
|
|
||||||
|
full_path = '/mnt/other-files/cfe/disable.epf'
|
||||||
|
container_name = 'srv.{}'.format(host_name)
|
||||||
|
|
||||||
command = []
|
command = []
|
||||||
|
add_command_copy_file_from_mnt_to_tmp(command, container_name, full_path, 'disable.epf')
|
||||||
command.append('docker')
|
command.append('docker')
|
||||||
command.append('exec')
|
command.append('exec')
|
||||||
command.append('-t')
|
command.append('-t')
|
||||||
command.append('srv.' + host_name)
|
command.append(container_name)
|
||||||
command.append('{}1cv8'.format(path_to_1c))
|
command.append('{}1cv8'.format(path_to_1c))
|
||||||
command.append('ENTERPRICE')
|
command.append('ENTERPRICE')
|
||||||
command.append('/S')
|
command.append('/S')
|
||||||
command.append('"srv\\{}"'.format(ib_name))
|
command.append('"srv\\{}"'.format(ib_name))
|
||||||
command.append('/Execute')
|
command.append('/Execute')
|
||||||
command.append('"/mnt/other-files/cfe/disable.epf"')
|
command.append('"/tmp/disable.epf"')
|
||||||
command.append(get_out_file_name_command(action, ib_name))
|
command.append(get_out_file_name_command(action, ib_name))
|
||||||
return command
|
return command
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
||||||
"СоздаватьВМенеджере": true,
|
"СоздаватьВМенеджере": true,
|
||||||
"ИмяФайлаКонфигурации":"smtl.cf",
|
"ИмяФайлаКонфигурации":"smtl.cf",
|
||||||
"БлокироватьРаботуРегЗаданийПриСоздании": false
|
"БлокироватьРаботуРегЗаданийПриСоздании": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Сервер": "web/int/sa",
|
"Сервер": "web/int/sa",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
||||||
"СоздаватьВМенеджере": true,
|
"СоздаватьВМенеджере": true,
|
||||||
"ИмяФайлаКонфигурации":"sa.cf",
|
"ИмяФайлаКонфигурации":"sa.cf",
|
||||||
"БлокироватьРаботуРегЗаданийПриСоздании": false
|
"БлокироватьРаботуРегЗаданийПриСоздании": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Сервер": "",
|
"Сервер": "",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
"ИмяФайлаШаблонаВнутреннейПубликации": "zoneless",
|
||||||
"СоздаватьВМенеджере": false,
|
"СоздаватьВМенеджере": false,
|
||||||
"ИмяФайлаКонфигурации":"am.cf",
|
"ИмяФайлаКонфигурации":"am.cf",
|
||||||
"БлокироватьРаботуРегЗаданийПриСоздании": false
|
"БлокироватьРаботуРегЗаданийПриСоздании": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
15
start.py
15
start.py
@ -212,6 +212,7 @@ def delete_volumes():
|
|||||||
|
|
||||||
call('docker volume rm workdir_1c_pg_data', remote=False)
|
call('docker volume rm workdir_1c_pg_data', remote=False)
|
||||||
call('docker volume rm workdir_1c_pg_socket', remote=False)
|
call('docker volume rm workdir_1c_pg_socket', remote=False)
|
||||||
|
call('docker volume rm workdir_1c_server_data', remote=False)
|
||||||
|
|
||||||
@print_description
|
@print_description
|
||||||
def prepare_bases():
|
def prepare_bases():
|
||||||
@ -229,6 +230,8 @@ def prepare_bases():
|
|||||||
conf_file_name=ib_data[ib_prop.conf_file],
|
conf_file_name=ib_data[ib_prop.conf_file],
|
||||||
job_block=ib_data[ib_prop.job]
|
job_block=ib_data[ib_prop.job]
|
||||||
)
|
)
|
||||||
|
if ib_data[ib_prop.job]:
|
||||||
|
enable_job(ib_data[ib_prop.name], ib_data[ib_prop.adm])
|
||||||
|
|
||||||
# prepare sm base
|
# prepare sm base
|
||||||
prepare_new_ib(
|
prepare_new_ib(
|
||||||
@ -236,7 +239,9 @@ def prepare_bases():
|
|||||||
int_name=sm_ib[ib_prop.int_name],
|
int_name=sm_ib[ib_prop.int_name],
|
||||||
conf_file_name=sm_ib[ib_prop.conf_file],
|
conf_file_name=sm_ib[ib_prop.conf_file],
|
||||||
job_block=sm_ib[ib_prop.job]
|
job_block=sm_ib[ib_prop.job]
|
||||||
)
|
)
|
||||||
|
if ib_prop.job:
|
||||||
|
enable_job(ib_data[ib_prop.name], ib_data[ib_prop.adm])
|
||||||
|
|
||||||
@print_description
|
@print_description
|
||||||
def renew_nginx_files():
|
def renew_nginx_files():
|
||||||
@ -413,12 +418,9 @@ def wait_site():
|
|||||||
|
|
||||||
call('docker exec -t site.{} /wait_site.sh'.format(host_name), remote=False)
|
call('docker exec -t site.{} /wait_site.sh'.format(host_name), remote=False)
|
||||||
|
|
||||||
|
def enable_job(base_name, user):
|
||||||
|
|
||||||
@print_description
|
call('docker exec -t ras.{} deployka scheduledjobs unlock -db {} -db-user "{}"'.format(host_name, base_name, user),
|
||||||
def enable_job_in_sm():
|
|
||||||
"""Enable scheduled jobs sm"""
|
|
||||||
|
|
||||||
call('docker exec -t ras.{} deployka scheduledjobs unlock -db sm -db-user "Администратор"'.format(host_name),
|
|
||||||
remote=False)
|
remote=False)
|
||||||
|
|
||||||
@print_description
|
@print_description
|
||||||
@ -465,7 +467,6 @@ if new_server:
|
|||||||
create_bucket()
|
create_bucket()
|
||||||
publish_sevises()
|
publish_sevises()
|
||||||
prepare_bases()
|
prepare_bases()
|
||||||
enable_job_in_sm()
|
|
||||||
create_db_site()
|
create_db_site()
|
||||||
create_db_forum()
|
create_db_forum()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user