- change version on 1.8

- add docker-compose
- update entaxy
This commit is contained in:
2021-09-10 22:42:19 +03:00
parent 7d80bb81c6
commit 094a3fe67f
77 changed files with 2561 additions and 854 deletions

View File

@ -25,90 +25,125 @@ Launch the server
karaf / karaf.bat
#### Step 2: DB Setup
#### Step 2: DB, artemis and artefact manager Setup
If use docker:
If use docker run Artemis
docker run --name entaxy_db -p 5432:5432 -e POSTGRES_PASSWORD=entaxy -e POSTGRES_USER=entaxy -e POSTGRES_DB=cache -d postgres
sudo docker run --rm -p 8161:8161 -p 61616:61616 -e ARTEMIS_USERNAME=entaxy -e ARTEMIS_PASSWORD=entaxy --name=artemis1 -d vromero/activemq-artemis
#### Step 3: Add features
And run postgres
sudo docker run --name entaxy_db -p 5432:5432 -v /etc/timezone:/etc/timezone:ro -e POSTGRES_PASSWORD=entaxy -e POSTGRES_USER=entaxy -e POSTGRES_DB=cache -d postgres
or mssql
sudo docker run --name mssql -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=entaxy' -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-CU8-ubuntu
`By default project use two db: cache и esb_entaxy,`
`Name of db wrote in org.ops4j.datasource-entaxy.esb.*.cfg`
and run nexus, if do you want to use it(necessary for system-management to work)
sudo docker run -d -p 8081:8081 --name nexus sonatype/nexus3
Now we look at the admin password through the command:
docker exec nexus cat /nexus-data/admin.password
And then we go to the admin panel through the browser on http://localhost:8081/.
By default, it needs to create a user entaxy / entaxy and a maven repository called entaxy to work.
On Docker Toolbox, errors may occur due to insufficient memory, solved by changing the memory allocation at startup`
docker run -d -p 8081:8081 --name nexus -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g" sonatype/nexus3
#### Step 3: Preparing and launching karaf
Copy the following files from the entaxy-framework\features\src\main\cfg\ repository to etc karaf
jre.properties
org.apache.karaf.cellar.groups.cfg
Also, the local nexus repository must be added to the standard repositories in the file org.ops4j.pax.url.mvn.cfg property org.ops4j.pax.url.mvn.repositories.`
`The user and the name of the repository are specified in the ru.entaxy.esb.deployer.nexus.cfg configuration file.`
Running Apache Karaf 4.x or newer
karaf
Or starting karaf with cleaning to its original state
karaf clean
## Step 4: Installing all features in one go using the karaf command line
shell:source <project-directory>/entaxy-framework/features/src/main/script/install.karaf
- After that you need to check the configurations of connections to the database in the files org.ops4j.datasource-entaxy.esb. *. Cfg
- Check the address of the broker in the file ru.entaxy.esb.cfg property ru.entaxy.esb.jms.url
- Check broker address in init/entaxy-platform-connections.json file "name": "entaxy-broker" connection in which property url
- Replace org.apache.karaf.cellar.groups.cfg file
#### Step 4a: Add features
Add features required
feature:repo-add mvn:ru.entaxy.esb/karaf-features/LATEST/xml/features
feature:install liquibase-updater
feature:install entaxy-esb-api
feature:repo-add mvn:ru.entaxy.esb/karaf-features/$ESB_ENTAXY_VERSION/xml/features
Install nsi
Install entaxy
feature:install nsi
Install permission
feature:install entaxy-all
feature:install permission
Install system-registry
Add base feature required
feature:install system-registry
Install system-group-registry
feature:repo-add mvn:ru.entaxy.esb.platform.runtime/base/$ESB_ENTAXY_VERSION/xml/features
feature:install system-group-registry
Install system-group-profile
Install base
install -s blueprint:mvn:ru.entaxy.esb.integration.esb.test.profiles/test-profiles/1.0-SNAPSHOT/xml/g_test
Install bridge
feature:install base
feature:install bridge
Install basic-auth
Add core feature required
feature:install basic-auth
Install events
feature:repo-add mvn:ru.entaxy.esb.platform.runtime/core/$ESB_ENTAXY_VERSION/xml/features
feature:install events
Install core
feature:install core
Add entaxy-uniform-service feature required
feature:repo-add mvn:ru.entaxy.esb.platform.runtime.modules/uniform-service/$ESB_ENTAXY_VERSION/xml/features
Install entaxy-uniform-service
feature:install entaxy-uniform-service
Useful comand for dev
bundle:watch mvn:ru.entaxy.esb/nsi-esb/1.0-SNAPSHOT
bundle:watch mvn:ru.entaxy.esb/esb/1.8
#### Step 4: Verify that your service is available using the following url in the browser.
#### Step 5: Verify that your service is available using the following url in the browser.
We assume you're using Karaf's default PAX Web configuration which uses port `8181` for http. If you would like to use another port or https, change the configuration in `${KARAF_HOME}/etc/org.ops4j.pax.web.cfg`. The immediate extension after the hostname and port ("cxf" in the below URL) is configured via the org.apache.cxf.osgi.cfg file (Please see [http://team.ops4j.org/wiki//display/paxweb/Pax+Web](http://team.ops4j.org/wiki//display/paxweb/Pax+Web) for more information on PAX Web).
[http://localhost:8181/cxf/xdto/NSI?wsdl](http://localhost:8181/cxf/xdto/NSI?wsdl)
[http://localhost:8181/cxf/system-management?wsdl](http://localhost:8181/cxf/system-management?wsdl)
#### Step 5: Start SOAPUI or Postman
#### Step 6: Start SOAPUI or Postman
POST request to
http://localhost:8181/cxf/xdto/NSI
http://localhost:8181/cxf/system-management
Send test request:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xdto="http://www.entaxy.ru/xdto_NSI">
<soap:Header/>
<soap:Body>
<xdto:GetMDMReferences/>
</soap:Body>
</soap:Envelope>
Response contains GUID, copy it and send request for get result:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xdto="http://www.entaxy.ru/xdto_NSI">
<soap:Header/>
<soap:Body>
<xdto:GetResult>
<xdto:RequestNumber>{GUID}</xdto:RequestNumber>
</xdto:GetResult>
</soap:Body>
</soap:Envelope>
#### Step 6: Check the file system and DB
Check the folder "target/inbox/" in the Karaf base directory to see that a message has arrived.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sys="http://www.entaxy.ru/system-management-service/">
<soapenv:Header/>
<soapenv:Body>
<sys:listTemplateRequest/>
</soapenv:Body>
</soapenv:Envelope>
### Forum, Help, etc
@ -143,7 +178,7 @@ The Camel riders!
or
newman run "Entaxy Integration Tests.postman_collection.json" --env-var base_url=http://192.168.122.83:8181/cxf
newman run "Entaxy Integration Tests.postman_collection.json" --env-var base_url=http://localhost:8181/cxf
#### CXF logging messages

View File

@ -8,7 +8,7 @@
Для установки фич понадобятся несколько шагов.
Использовать Java 8
Использовать Java 11+
### Шаг 1: Сборка проекта
@ -74,86 +74,67 @@
- После требуется проверить конфигурации соединений с бд в файлах org.ops4j.datasource-entaxy.esb.*.cfg
- Проверить адрес брокера в файле ru.entaxy.esb.cfg свойство ru.entaxy.esb.jms.url
- Проверить адреса брокеров для моста в файле ru.entaxy.esb.system.bridge.cfg свойства jms.url.*
- Проверить адрес брокера в файле init/entaxy-platform-connections.json коннекция "name": "entaxy-broker" в которой свойство url
- Заменить файл org.apache.karaf.cellar.groups.cfg
#### Шаг 4a: Или можно установить фичи вручную
Добавить необходимые фичи
Добавить необходимую фичу
feature:repo-add mvn:ru.entaxy.esb/karaf-features/LATEST/xml/features
feature:install liquibase-updater
feature:install entaxy-esb-api
feature:repo-add mvn:ru.entaxy.esb/karaf-features/$ESB_ENTAXY_VERSION/xml/features
Установить nsi
Установить entaxy
feature:install nsi
feature:install entaxy-all
Установить permission
Добавить необходимую фичу base
feature:install permission
feature:repo-add mvn:ru.entaxy.esb.platform.runtime/base/$ESB_ENTAXY_VERSION/xml/features
Установить реестр систем
Установить base
feature:install system-registry
feature:install base
Установить тестовый профиль
Добавить необходимую фичу core
install -s blueprint:mvn:ru.entaxy.esb.integration.esb.test.profiles/test-profiles/1.0-SNAPSHOT/xml/s_s1
feature:repo-add mvn:ru.entaxy.esb.platform.runtime/core/$ESB_ENTAXY_VERSION/xml/features
Установить реестр групп систем
Установить core
feature:install system-group-registry
feature:install core
Установить профиль группы систем
Добавить необходимую entaxy-uniform-service
install -s blueprint:mvn:ru.entaxy.esb.integration.esb.test.profiles/test-profiles/1.0-SNAPSHOT/xml/g_fzd
feature:repo-add mvn:ru.entaxy.esb.platform.runtime.modules/uniform-service/$ESB_ENTAXY_VERSION/xml/features
Установить мост
Install entaxy-uniform-service
feature:install bridge
Установить сервис управления учётными записями
feature:install entaxy-uniform-service
feature:install basic-auth
Установить events
Useful comand for dev
feature:install events
Для дев окружения может быть полезна команда watch
bundle:watch mvn:ru.entaxy.esb/nsi-esb/1.0-SNAPSHOT
bundle:watch mvn:ru.entaxy.esb/esb/1.8
#### Шаг 5: Проверка доступности сервиса через браузер, используя следующий адрес.
Подразумевается использование настроек по умолчанию для карафовского PAX Web, который для http настроен на порт `8181`. Если Вы желаете использовать другой порт или https, то необходимо поменять настройки в `${KARAF_HOME}/etc/org.ops4j.pax.web.cfg`. Непосредственное продолжение адреса после имени хоста и номера порта (в примере ниже `cxf`) можно настроить в файле `org.apache.cxf.osgi.cfg`. (Для более подробной информации по PAX Web перейдите по ссылке [http://team.ops4j.org/wiki/display/paxweb/Pax+Web](http://team.ops4j.org/wiki/display/paxweb/Pax+Web))
[http://localhost:8181/cxf/system-management?wsdl](http://localhost:8181/cxf/system-management?wsdl)
#### Шаг 6: Запуск SOAPUI или Postman
Отправка POST запроса на адрес
http://localhost:8181/cxf/xdto/NSI
http://localhost:8181/cxf/system-management
Тестовый запрос:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xdto="http://www.entaxy.ru/xdto_NSI">
<soap:Header/>
<soap:Body>
<xdto:GetMDMReferences/>
</soap:Body>
</soap:Envelope>
Ответ сожержит GUID, скопируйте его и отправьте для получения результата:
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xdto="http://www.entaxy.ru/xdto_NSI">
<soap:Header/>
<soap:Body>
<xdto:GetResult>
<xdto:RequestNumber>{GUID}</xdto:RequestNumber>
</xdto:GetResult>
</soap:Body>
</soap:Envelope>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sys="http://www.entaxy.ru/system-management-service/">
<soapenv:Header/>
<soapenv:Body>
<sys:listTemplateRequest/>
</soapenv:Body>
</soapenv:Envelope>
## Автотесты
@ -170,12 +151,7 @@
#### Запуск нагрузочных тестов через Jmeter
В тестах прописана система s1, запросы направляются на 83 ноду
В тестах прописана система s1
* 1C-EXCHANGE_SEND_GET_ASK.jmx - запись и чтение с подтверждением последовательно
* 1C-EXCHANGE_SEND_GET_ASK_ASYNC.jmx - запись и чтение с подтверждением в параллельных потоках
Можно запускать с машины 192.168.122.76
cd /opt/jenkins/.jenkins/workspace/test_master/test/jmeter
/opt/apache-jmeter-5.2.1/bin/jmeter.sh -n -t ./1C-EXCHANGE_SEND_GET_ASK_ASYNC.jmx
* UNIFORM-SERVICE-CONNECTOR_SEND_GET_ACK.jmx - запись и чтение с подтверждением последовательно
* UNIFORM-SERVICE_SEND_GET_AСK_ASYNC.jmx - запись и чтение с подтверждением в параллельных потоках

View File

@ -90,21 +90,6 @@
<type>cfg</type>
<classifier>ru.entaxy.esb</classifier>
</artifact>
<artifact>
<file>target/cfg/ru.entaxy.esb.connector.1c.service.soap.passive.cfg</file>
<type>cfg</type>
<classifier>ru.entaxy.esb.connector.1c.service.soap.passive</classifier>
</artifact>
<artifact>
<file>target/cfg/ru.entaxy.esb.connector.1c.soap.passive.cfg</file>
<type>cfg</type>
<classifier>ru.entaxy.esb.connector.1c.soap.passive</classifier>
</artifact>
<artifact>
<file>target/cfg/ru.entaxy.esb.connector.1c.support.cfg</file>
<type>cfg</type>
<classifier>ru.entaxy.esb.connector.1c.support</classifier>
</artifact>
<artifact>
<file>target/cfg/ru.entaxy.esb.system.basic_auth.cfg</file>
<type>cfg</type>

View File

@ -1,27 +0,0 @@
###
# ~~~~~~licensing~~~~~~
# karaf-features
# ==========
# Copyright (C) 2020 - 2021 EmDev LLC
# ==========
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~~~~/licensing~~~~~~
###
# адрес service-soap, будет формироваться host/cxf + passive.endpoint.address,
# по умолчанию passive.endpoint.address=/service
passive.endpoint.address=/service
# включение кастомной валидации soap сообщений по wsdl
passive.endpoint.validation=true
# название системы, в которую будут отправляться сообщения, если не был выставлен destination
passive.error.system.name=error

View File

@ -1,24 +0,0 @@
###
# ~~~~~~licensing~~~~~~
# karaf-features
# ==========
# Copyright (C) 2020 - 2021 EmDev LLC
# ==========
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~~~~/licensing~~~~~~
###
# адрес soap-connector, будет формироваться host/cxf + passive.endpoint.address,
# по умолчанию passive.endpoint.address=/exchange
passive.endpoint.address=/exchange
# включение кастомной валидации soap сообщений по wsdl
passive.endpoint.validation=true

View File

@ -1,47 +0,0 @@
###
# ~~~~~~licensing~~~~~~
# karaf-features
# ==========
# Copyright (C) 2020 - 2021 EmDev LLC
# ==========
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~~~~/licensing~~~~~~
###
# максимальное количество попыток отправить сообщение в очередь из агрегатора
redelivery.maximumRedeliveries=2
# очередь для отправки сообщений, которые не смог отправить агрегатор в destination
redelivery.deadLetterQueue=revert.message.dead
# задается в mc, значение по умолчанию 10 минут
acknowledge.completion.timeout=600000
# настройка способа агрегирования через игнайт или бд
# Важно! следить за тем чтобы данный параметр был одинаковым во всем кластере
# варианты - igniteAggregationRepository, jdbcAggregationRepository (для всех бд кроме postgres), postgresAggregationRepository
# по умолчанию - jdbcAggregationRepository
acknowledge.aggregation.repository=jdbcAggregationRepository
# Поднимается endpoint /active_connector_test_consumer
# при выставленной настройке mode.dev=true
active.mode.dev=false
active.username=Администратор
active.password=
# валидация сообщения по wsdl
active.validation=false
# uuid шины, для отправки в активном режиме в систему от имени шины
bus.id=FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
get.destination=
# параметр для тестирования активного коннектора
test.empty.rate=20

View File

@ -56,7 +56,7 @@ rm -rf $INSTALL_DIR/data/txlog/*
if test -f "$DIRNAME/version"; then
ESB_ENTAXY_VERSION=`cat $DIRNAME/version`
else
ESB_ENTAXY_VERSION=1.0-SNAPSHOT
ESB_ENTAXY_VERSION=1.8.0
fi
echo "Installing $ESB_ENTAXY_VERSION"

View File

@ -27,7 +27,7 @@ DIRNAME="$( cd "$(dirname "$0")" ; pwd -P )"
if test -f "$DIRNAME/version"; then
ESB_ENTAXY_VERSION=`cat $DIRNAME/version`
else
ESB_ENTAXY_VERSION=1.0-SNAPSHOT
ESB_ENTAXY_VERSION=1.8.0
fi
echo "Create patch version $ESB_ENTAXY_VERSION"

View File

@ -20,7 +20,7 @@
# ~~~~~~/licensing~~~~~~
###
# берет номер версии из файла version, если его нет то используется 1.0-SNAPSHOT
# берет номер версии из файла version, если его нет то используется 1.8
# если задан первый параметр чистит конфиги
DIRNAME="$( cd "$(dirname "$0")" ; pwd -P )"
@ -28,7 +28,7 @@ DIRNAME="$( cd "$(dirname "$0")" ; pwd -P )"
if test -f "$DIRNAME/version"; then
ESB_ENTAXY_VERSION=`cat $DIRNAME/version`
else
ESB_ENTAXY_VERSION=1.0-SNAPSHOT
ESB_ENTAXY_VERSION=1.8
fi
echo "Installing $ESB_ENTAXY_VERSION"