Loading etc/CMakeLists.txt +19 −4 Original line number Diff line number Diff line Loading @@ -4,20 +4,35 @@ # This software was partially supported by the EuroHPC-funded project ADMIRE # # (Project ID: 956748, https://www.admire-eurohpc.eu). # # # # This file is part of cargo. # # This file is part of Cargo. # # # # cargo is free software: you can redistribute it and/or modify # # Cargo is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # cargo is distributed in the hope that it will be useful, # # Cargo is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with cargo. If not, see <https://www.gnu.org/licenses/>. # # along with Cargo. If not, see <https://www.gnu.org/licenses/>. # # # # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ configure_file(cargo.conf.in cargo.conf) # install the configuration file to sysconfdir (normally /etc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cargo.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} ) # create empty 'cargo' directories for logs and pidfiles in the appropriate # locations (e.g. /var/run/cargo/, /var/log/cargo/, etc. install( DIRECTORY DESTINATION ${CMAKE_INSTALL_RUNSTATEDIR}/${CMAKE_PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME} ) etc/cargo.conf.in 0 → 100644 +26 −0 Original line number Diff line number Diff line ## vim: set filetype=yaml: ## global service settings global_settings: [ # if true, dump log messages to syslog use_syslog: false, # log file log_file: "@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@.log", # path to pidfile pidfile: "@CMAKE_INSTALL_FULL_RUNSTATEDIR@/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@.pid", # transport protocol used for communication transport_protocol: "@CARGO_TRANSPORT_PROTOCOL@", # address to bind to bind_address: "@CARGO_BIND_ADDRESS@", # incoming port for remote connections remote_port: @CARGO_BIND_PORT@, # number of worker threads to serve I/O requests workers: 4, ] src/config/config/config.hpp +8 −8 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #ifndef SCORD_CONFIG_HPP #define SCORD_CONFIG_HPP #ifndef CONFIG_HPP #define CONFIG_HPP #include "defaults.hpp" #include "settings.hpp" #endif /* SCORD_CONFIG_HPP */ #endif /* CONFIG_HPP */ src/config/config/defaults.cpp.in +7 −7 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ Loading @@ -29,7 +29,7 @@ #include <netinet/in.h> #include <cstdint> namespace scord::config::defaults { namespace config::defaults { const char* progname = "@CMAKE_PROJECT_NAME@"; const bool daemonize = true; Loading @@ -49,4 +49,4 @@ const uint32_t backlog_size = 128; const char* config_file = "@CMAKE_INSTALL_FULL_SYSCONFDIR@/@CMAKE_PROJECT_NAME@.conf"; } // namespace scord::config::defaults } // namespace config::defaults src/config/config/defaults.hpp +10 −10 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #ifndef SCORD_CONFIG_DEFAULTS_HPP #define SCORD_CONFIG_DEFAULTS_HPP #ifndef CONFIG_DEFAULTS_HPP #define CONFIG_DEFAULTS_HPP #include <cstdint> #include <netinet/in.h> Loading @@ -31,7 +31,7 @@ namespace fs = std::filesystem; namespace scord::config::defaults { namespace config::defaults { extern const char* progname; extern const bool daemonize; Loading @@ -48,6 +48,6 @@ extern const char* staging_directory; extern const uint32_t backlog_size; extern const char* config_file; } // namespace scord::config::defaults } // namespace config::defaults #endif /* SCORD_CONFIG_DEFAULTS_HPP */ #endif /* CONFIG_DEFAULTS_HPP */ Loading
etc/CMakeLists.txt +19 −4 Original line number Diff line number Diff line Loading @@ -4,20 +4,35 @@ # This software was partially supported by the EuroHPC-funded project ADMIRE # # (Project ID: 956748, https://www.admire-eurohpc.eu). # # # # This file is part of cargo. # # This file is part of Cargo. # # # # cargo is free software: you can redistribute it and/or modify # # Cargo is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # cargo is distributed in the hope that it will be useful, # # Cargo is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with cargo. If not, see <https://www.gnu.org/licenses/>. # # along with Cargo. If not, see <https://www.gnu.org/licenses/>. # # # # SPDX-License-Identifier: GPL-3.0-or-later # ################################################################################ configure_file(cargo.conf.in cargo.conf) # install the configuration file to sysconfdir (normally /etc) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cargo.conf DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} ) # create empty 'cargo' directories for logs and pidfiles in the appropriate # locations (e.g. /var/run/cargo/, /var/log/cargo/, etc. install( DIRECTORY DESTINATION ${CMAKE_INSTALL_RUNSTATEDIR}/${CMAKE_PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR}/log/${CMAKE_PROJECT_NAME} )
etc/cargo.conf.in 0 → 100644 +26 −0 Original line number Diff line number Diff line ## vim: set filetype=yaml: ## global service settings global_settings: [ # if true, dump log messages to syslog use_syslog: false, # log file log_file: "@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@.log", # path to pidfile pidfile: "@CMAKE_INSTALL_FULL_RUNSTATEDIR@/@CMAKE_PROJECT_NAME@/@CMAKE_PROJECT_NAME@.pid", # transport protocol used for communication transport_protocol: "@CARGO_TRANSPORT_PROTOCOL@", # address to bind to bind_address: "@CARGO_BIND_ADDRESS@", # incoming port for remote connections remote_port: @CARGO_BIND_PORT@, # number of worker threads to serve I/O requests workers: 4, ]
src/config/config/config.hpp +8 −8 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #ifndef SCORD_CONFIG_HPP #define SCORD_CONFIG_HPP #ifndef CONFIG_HPP #define CONFIG_HPP #include "defaults.hpp" #include "settings.hpp" #endif /* SCORD_CONFIG_HPP */ #endif /* CONFIG_HPP */
src/config/config/defaults.cpp.in +7 −7 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ Loading @@ -29,7 +29,7 @@ #include <netinet/in.h> #include <cstdint> namespace scord::config::defaults { namespace config::defaults { const char* progname = "@CMAKE_PROJECT_NAME@"; const bool daemonize = true; Loading @@ -49,4 +49,4 @@ const uint32_t backlog_size = 128; const char* config_file = "@CMAKE_INSTALL_FULL_SYSCONFDIR@/@CMAKE_PROJECT_NAME@.conf"; } // namespace scord::config::defaults } // namespace config::defaults
src/config/config/defaults.hpp +10 −10 Original line number Diff line number Diff line /****************************************************************************** * Copyright 2021, Barcelona Supercomputing Center (BSC), Spain * Copyright 2022-2023, Barcelona Supercomputing Center (BSC), Spain * * This software was partially supported by the EuroHPC-funded project ADMIRE * (Project ID: 956748, https://www.admire-eurohpc.eu). * * This file is part of scord. * This file is part of Cargo. * * scord is free software: you can redistribute it and/or modify * Cargo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * scord is distributed in the hope that it will be useful, * Cargo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with scord. If not, see <https://www.gnu.org/licenses/>. * along with Cargo. If not, see <https://www.gnu.org/licenses/>. * * SPDX-License-Identifier: GPL-3.0-or-later *****************************************************************************/ #ifndef SCORD_CONFIG_DEFAULTS_HPP #define SCORD_CONFIG_DEFAULTS_HPP #ifndef CONFIG_DEFAULTS_HPP #define CONFIG_DEFAULTS_HPP #include <cstdint> #include <netinet/in.h> Loading @@ -31,7 +31,7 @@ namespace fs = std::filesystem; namespace scord::config::defaults { namespace config::defaults { extern const char* progname; extern const bool daemonize; Loading @@ -48,6 +48,6 @@ extern const char* staging_directory; extern const uint32_t backlog_size; extern const char* config_file; } // namespace scord::config::defaults } // namespace config::defaults #endif /* SCORD_CONFIG_DEFAULTS_HPP */ #endif /* CONFIG_DEFAULTS_HPP */