Skip to content

Commit

Permalink
[#31] rename to storage_tiering, declare package replaces/conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
trel committed Apr 9, 2018
1 parent dc9fbb8 commit 64dc41b
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 68 deletions.
26 changes: 11 additions & 15 deletions CMakeLists.txt
Expand Up @@ -10,7 +10,7 @@ set(CMAKE_C_COMPILER ${IRODS_EXTERNALS_FULLPATH_CLANG}/bin/clang)
set(CMAKE_CXX_COMPILER ${IRODS_EXTERNALS_FULLPATH_CLANG}/bin/clang++)
set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")

project(irods_rule_engine_plugin_tiered_storage C CXX)
project(irods_rule_engine_plugin_storage_tiering C CXX)

include(${IRODS_TARGETS_PATH})

Expand Down Expand Up @@ -68,13 +68,13 @@ set(

set(
PLUGIN
irods_rule_engine_plugin-tiered_storage
irods_rule_engine_plugin-storage_tiering
)

add_library(
${PLUGIN}
MODULE
${CMAKE_SOURCE_DIR}/libirods_rule_engine_plugin-tiered_storage.cpp
${CMAKE_SOURCE_DIR}/libirods_rule_engine_plugin-storage_tiering.cpp
${CMAKE_SOURCE_DIR}/irods_object_migrator.cpp
${CMAKE_SOURCE_DIR}/irods_storage_tiering.cpp
)
Expand Down Expand Up @@ -115,21 +115,14 @@ install(

install(
FILES
${CMAKE_SOURCE_DIR}/packaging/test_plugin_tiered_storage.py
${CMAKE_SOURCE_DIR}/packaging/test_plugin_storage_tiering.py
DESTINATION ${IRODS_HOME_DIRECTORY}/scripts/irods/test
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

install(
FILES
${CMAKE_SOURCE_DIR}/packaging/test_plugin_tiered_storage_server_config.json
DESTINATION ${IRODS_HOME_DIRECTORY}/scripts/irods/test
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

install(
FILES
${CMAKE_SOURCE_DIR}/packaging/run_tiered_storage_plugin_test.py
${CMAKE_SOURCE_DIR}/packaging/run_storage_tiering_plugin_test.py
DESTINATION ${IRODS_HOME_DIRECTORY}/scripts
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
Expand All @@ -142,7 +135,7 @@ install(
)

set(IRODS_PLUGIN_VERSION "${IRODS_PLUGIN_VERSION_MAJOR}.${IRODS_PLUGIN_VERSION_MINOR}.${IRODS_PLUGIN_VERSION_PATCH}")
set(CPACK_PACKAGE_FILE_NAME "irods-rule-engine-plugin-tiered-storage-${IRODS_PLUGIN_VERSION}-${IRODS_LINUX_DISTRIBUTION_NAME}${IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR}-${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_PACKAGE_FILE_NAME "irods-rule-engine-plugin-storage_tiering-${IRODS_PLUGIN_VERSION}-${IRODS_LINUX_DISTRIBUTION_NAME}${IRODS_LINUX_DISTRIBUTION_VERSION_MAJOR}-${CMAKE_SYSTEM_PROCESSOR}")
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_COMPONENTS_GROUPING IGNORE)
Expand All @@ -162,6 +155,8 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://irods.org")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
set(CPACK_DEBIAN_PACKAGE_CONTROL_STRICT_PERMISSION ON)
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/packaging/postinst;")
set(CPACK_DEBIAN_PACKAGE_BREAKS "irods-rule-engine-plugin-tiered_storage")
set(CPACK_DEBIAN_PACKAGE_REPLACES "irods-rule-engine-plugin-tiered_storage")

set(CPACK_RPM_COMPONENT_INSTALL OFF)
set(CPACK_RPM_PACKAGE_RELEASE "1")
Expand All @@ -171,13 +166,14 @@ set(CPACK_RPM_PACKAGE_URL "https://irods.org")
set(CPACK_RPM_PACKAGE_AUTOREQ 0)
set(CPACK_RPM_PACKAGE_AUTOPROV 0)
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/packaging/postinst")
set(CPACK_RPM_PACKAGE_OBSOLETES "irods-rule-engine-plugin-tiered_storage")

set(CPACK_ARCHIVE_COMPONENT_INSTALL OFF)

set(CPACK_DEBIAN_PACKAGE_NAME "irods-rule-engine-plugin-tiered-storage")
set(CPACK_DEBIAN_PACKAGE_NAME "irods-rule-engine-plugin-storage-tiering")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "${IRODS_PACKAGE_DEPENDENCIES_STRING}, irods-server (= ${IRODS_VERSION}), irods-runtime (= ${IRODS_VERSION}), libc6")

set(CPACK_RPM_PACKAGE_NAME "irods-rule-engine-plugin-tiered-storage")
set(CPACK_RPM_PACKAGE_NAME "irods-rule-engine-plugin-storage-tiering")
if (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "centos" OR IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "centos linux")
set(CPACK_RPM_PACKAGE_REQUIRES "${IRODS_PACKAGE_DEPENDENCIES_STRING}, irods-server = ${IRODS_VERSION}, irods-runtime = ${IRODS_VERSION}, openssl")
elseif (IRODS_LINUX_DISTRIBUTION_NAME STREQUAL "opensuse")
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -10,12 +10,12 @@ The example diagram below shows a configuration with three tiers.

# **Rulebase Configuration**

To configure the storage tiering capability the rule engine plugin must be added as a new json object within the "rule_engines" array of the ```server_config.json``` file. The ```plugin_name``` must be **irods_rule_engine_plugin-tiered_storage** and each instance name of the plugin must be unique. By convention the plugin name plus the word **instance** is used. Please note that the same instance name must be used across all servers which participate in tiering groups. Data movement is delegated to the server hosting the source resource, and by convention remote rule calls are directed at specific plugin instances.
To configure the storage tiering capability the rule engine plugin must be added as a new json object within the "rule_engines" array of the ```server_config.json``` file. The ```plugin_name``` must be **irods_rule_engine_plugin-storage_tiering** and each instance name of the plugin must be unique. By convention the plugin name plus the word **instance** is used. Please note that the same instance name must be used across all servers which participate in tiering groups. Data movement is delegated to the server hosting the source resource, and by convention remote rule calls are directed at specific plugin instances.
```
"rule_engines": [
{
"instance_name": "irods_rule_engine_plugin-tiered_storage-instance",
"plugin_name": "irods_rule_engine_plugin-tiered_storage",
"instance_name": "irods_rule_engine_plugin-storage_tiering-instance",
"plugin_name": "irods_rule_engine_plugin-storage_tiering",
"plugin_specific_configuration": {
}
},
Expand Down Expand Up @@ -148,8 +148,8 @@ In order to log the transfer of data objects from one tier to the next, the stor

```
{
"instance_name": "irods_rule_engine_plugin-tiered_storage-instance",
"plugin_name": "irods_rule_engine_plugin-tiered_storage",
"instance_name": "irods_rule_engine_plugin-storage_tiering-instance",
"plugin_name": "irods_rule_engine_plugin-storage_tiering",
"plugin_specific_configuration": {
"data_transfer_log_level" : "LOG_NOTICE"
}
Expand Down
2 changes: 1 addition & 1 deletion example_tiering_invocation.r
@@ -1,5 +1,5 @@
{
"rule-engine-instance-name": "irods_rule_engine_plugin-tiered_storage-instance",
"rule-engine-instance-name": "irods_rule_engine_plugin-storage_tiering-instance",
"rule-engine-operation": "apply_storage_tiering_policy",
"delay-parameters": "<PLUSET>1s</PLUSET><EF>1h DOUBLE UNTIL SUCCESS OR 6 TIMES</EF>",
"storage-tier-groups": [
Expand Down
2 changes: 1 addition & 1 deletion irods_consortium_continuous_integration_build_hook.py
Expand Up @@ -84,7 +84,7 @@ def main(output_root_directory, irods_packages_root_directory):
install_build_prerequisites()
if irods_packages_root_directory:
install_irods_dev_and_runtime_packages(irods_packages_root_directory)
build_directory = tempfile.mkdtemp(prefix='irods_tiered_storage_plugin_build_directory')
build_directory = tempfile.mkdtemp(prefix='irods_storage_tiering_plugin_build_directory')
irods_python_ci_utilities.subprocess_get_output(['cmake', os.path.dirname(os.path.realpath(__file__))], check_rc=True, cwd=build_directory)
irods_python_ci_utilities.subprocess_get_output(['make', '-j', str(multiprocessing.cpu_count()), 'package'], check_rc=True, cwd=build_directory)
if output_root_directory:
Expand Down
4 changes: 2 additions & 2 deletions irods_consortium_continuous_integration_test_hook.py
Expand Up @@ -77,7 +77,7 @@ def main():
built_packages_root_directory = options.built_packages_root_directory
package_suffix = irods_python_ci_utilities.get_package_suffix()
os_specific_directory = irods_python_ci_utilities.append_os_specific_directory(built_packages_root_directory)
irods_python_ci_utilities.install_os_packages_from_files(glob.glob(os.path.join(os_specific_directory, 'irods-rule-engine-plugin-tiered-storage*.{0}'.format(package_suffix))))
irods_python_ci_utilities.install_os_packages_from_files(glob.glob(os.path.join(os_specific_directory, 'irods-rule-engine-plugin-storage-tiering*.{0}'.format(package_suffix))))

irods_python_ci_utilities.install_irods_core_dev_repository()
install_cmake_and_add_to_front_of_path()
Expand All @@ -90,7 +90,7 @@ def main():

try:
test_output_file = 'log/test_output.log'
irods_python_ci_utilities.subprocess_get_output(['sudo', 'su', '-', 'irods', '-c', 'python2 scripts/run_tests.py --xml_output --run_s test_plugin_tiered_storage 2>&1 | tee {0}; exit $PIPESTATUS'.format(test_output_file)], check_rc=True)
irods_python_ci_utilities.subprocess_get_output(['sudo', 'su', '-', 'irods', '-c', 'python2 scripts/run_tests.py --xml_output --run_s test_plugin_storage_tiering 2>&1 | tee {0}; exit $PIPESTATUS'.format(test_output_file)], check_rc=True)
finally:
if output_root_directory:
irods_python_ci_utilities.gather_files_satisfying_predicate('/var/lib/irods/log', output_root_directory, lambda x: True)
Expand Down
8 changes: 4 additions & 4 deletions packaging/postinst
Expand Up @@ -10,8 +10,8 @@ chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods/test
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods/test/test_plugin_tiered_storage.py
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods/test/test_plugin_tiered_storage_server_config.json
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /usr/lib/irods/plugins/rule_engines/libirods_rule_engine_plugin-tiered_storage.so
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/run_tiered_storage_plugin_test.py
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods/test/test_plugin_storage_tiering.py
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/irods/test/test_plugin_storage_tiering_server_config.json
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /usr/lib/irods/plugins/rule_engines/libirods_rule_engine_plugin-storage_tiering.so
chown $IRODS_SERVICE_ACCOUNT_NAME:$IRODS_SERVICE_GROUP_NAME /var/lib/irods/scripts/run_storage_tiering_plugin_test.py

0 comments on commit 64dc41b

Please sign in to comment.