Skip to content
Snippets Groups Projects
Commit 96b72e42 authored by Carsten Patzke's avatar Carsten Patzke
Browse files

Added receiver tcp and fabric nomad files

parent 63afc0a5
No related branches found
No related tags found
No related merge requests found
......@@ -27,22 +27,25 @@ function(prepare_asapo)
endif()
if (WIN32)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/receiver.json.tpl.win.in receiver.json.tpl @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/nginx_kill_win.nmd nginx_kill.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/receiver_tcp.json.tpl.win.in receiver_tcp.json.tpl @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/authorizer_settings.json.tpl.win authorizer.json.tpl COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/common_scripts/start_services.bat start_services.bat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/common_scripts/stop_services.bat stop_services.bat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/receiver_tcp.nmd.in receiver_tcp.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/nginx_kill_win.nmd nginx_kill.nmd @ONLY)
else()
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/receiver.json.tpl.lin.in receiver.json.tpl @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/nginx_kill_lin.nmd nginx_kill.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/receiver_tcp.json.tpl.lin.in receiver_tcp.json.tpl @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/receiver_fabric.json.tpl.lin.in receiver_fabric.json.tpl @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/authorizer_settings.json.tpl.lin authorizer.json.tpl COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/common_scripts/start_services.sh start_services.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/common_scripts/stop_services.sh stop_services.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/receiver_tcp.nmd.in receiver_tcp.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/receiver_fabric.nmd.in receiver_fabric.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/nginx_kill_lin.nmd nginx_kill.nmd @ONLY)
endif()
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/receiver.nmd.in receiver.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/discovery.nmd.in discovery.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/authorizer.nmd.in authorizer.nmd @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/file_transfer.nmd.in file_transfer.nmd @ONLY)
......@@ -54,7 +57,6 @@ function(prepare_asapo)
configure_file(${CMAKE_SOURCE_DIR}/tests/automatic/settings/nginx.conf.tpl nginx.conf.tpl COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/config/nomad/nginx.nmd.in nginx.nmd @ONLY)
endfunction()
macro(configure_files srcDir destDir)
......
......@@ -14,6 +14,7 @@ typedef uint64_t NetworkRequestId;
enum class NetworkConnectionType {
kAsapoTcp, // ASAPOs TCP (Multiple connections for parallel data transfers)
kFabric, // Fabric connection (Primarily used for InfiniBand verbs)
};
enum Opcode : uint8_t {
......
job "receiver" {
datacenters = ["dc1"]
type = "service"
group "group" {
count = 1
task "receiver" {
driver = "raw_exec"
config {
command = "@RECEIVER_DIR@/@RECEIVER_NAME@",
args = ["${NOMAD_TASK_DIR}/receiver.json"]
}
resources {
cpu = 500 # 500 MHz
memory = 256 # 256MB
network {
port "recv" {}
port "recv_ds" {}
}
}
service {
name = "asapo-receiver"
port = "recv"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
initial_status = "passing"
}
}
template {
source = "@WORK_DIR@/receiver_fabric.json.tpl"
destination = "local/receiver.json"
change_mode = "signal"
change_signal = "SIGHUP"
}
}
}
}
......@@ -36,7 +36,7 @@ job "receiver" {
}
template {
source = "@WORK_DIR@/receiver.json.tpl"
source = "@WORK_DIR@/receiver_tcp.json.tpl"
destination = "local/receiver.json"
change_mode = "signal"
change_signal = "SIGHUP"
......
......@@ -25,6 +25,7 @@ std::unique_ptr<DataBroker> Create(const std::string& source_name,
}
// TODO Add NetworkConnectionType
std::unique_ptr<DataBroker> DataBrokerFactory::CreateServerBroker(std::string server_name, std::string source_path,
bool has_filesystem, SourceCredentials source,
Error* error) noexcept {
......
......@@ -98,8 +98,8 @@ TEST_F(RdsFabricServerTests, Initialize_Error_DoubleInitialize) {
));
EXPECT_CALL(mock_fabric_server, GetAddress()).WillOnce(Return(
"TestAddress"
));
"TestAddress"
));
Error err = rds_server.Initialize();
ASSERT_THAT(rds_server.server__, Ne(nullptr));
......
{
"PerformanceDbServer":"localhost:8086",
"PerformanceDbName": "db_test",
"DatabaseServer":"auto",
"DiscoveryServer": "localhost:8400/asapo-discovery",
"DataServer": {
"AdvertiseURI": "127.0.0.1:{{ env "NOMAD_PORT_recv_ds" }}",
"NThreads": 2,
"ListenPort": {{ env "NOMAD_PORT_recv_ds" }},
"NetworkMode": ["fabric"]
},
"DataCache": {
"Use": @RECEIVER_USE_CACHE@,
"SizeGB": 1,
"ReservedShare": 10
},
"AuthorizationServer": "localhost:8400/asapo-authorizer",
"AuthorizationInterval": 1000,
"ListenPort": {{ env "NOMAD_PORT_recv" }},
"Tag": "{{ env "NOMAD_ADDR_recv" }}",
"WriteToDisk": @RECEIVER_WRITE_TO_DISK@,
"ReceiveToDiskThresholdMB":50,
"WriteToDb": true,
"LogLevel" : "debug"
}
......@@ -6,7 +6,8 @@
"DataServer": {
"AdvertiseURI": "127.0.0.1:{{ env "NOMAD_PORT_recv_ds" }}",
"NThreads": 2,
"ListenPort": {{ env "NOMAD_PORT_recv_ds" }}
"ListenPort": {{ env "NOMAD_PORT_recv_ds" }},
"NetworkMode": ["tcp"]
},
"DataCache": {
"Use": @RECEIVER_USE_CACHE@,
......
......@@ -9,7 +9,8 @@
"DataServer": {
"AdvertiseURI": "127.0.0.1:{{ env "NOMAD_PORT_recv_ds" }}",
"NThreads": 2,
"ListenPort": {{ env "NOMAD_PORT_recv_ds" }}
"ListenPort": {{ env "NOMAD_PORT_recv_ds" }},
"NetworkMode": ["tcp"]
},
"DataCache": {
"Use": @RECEIVER_USE_CACHE@,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment