diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 1eef7136..7c669ac6 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -47,7 +47,7 @@ SWIFT_MEMBER_USER_PWD=member # Storlets install tunables STORLETS_DEFAULT_USER_DOMAIN_ID=${STORLETS_DEFAULT_USER_DOMAIN_ID:-default} STORLETS_DEFAULT_PROJECT_DOMAIN_ID=${STORLETS_DEFAULT_PROJECT_DOMAIN_ID:-default} -STORLETS_DOCKER_DEVICE=${STORLETS_DOCKER_DEVICE:-/home/docker_device} +STORLETS_DOCKER_DEVICE=${STORLETS_DOCKER_DEVICE:-/var/lib/storlets} STORLETS_DOCKER_BASE_IMG=${STORLETS_DOCKER_BASE_IMG:-ubuntu:22.04} STORLETS_DOCKER_BASE_IMG_NAME=${STORLETS_DOCKER_BASE_IMG_NAME:-ubuntu_22.04} STORLETS_DOCKER_SWIFT_GROUP_ID=${STORLETS_DOCKER_SWIFT_GROUP_ID:-1003} diff --git a/doc/source/engine_dev_installation.rst b/doc/source/engine_dev_installation.rst index 26c1f7f8..c7f178e7 100644 --- a/doc/source/engine_dev_installation.rst +++ b/doc/source/engine_dev_installation.rst @@ -262,7 +262,7 @@ Create the run time directory :: - export STORLETS_HOME=/home/docker_device + export STORLETS_HOME=/var/lib/storlets sudo mkdir -p $STORLETS_HOME sudo chmod 777 $STORLETS_HOME @@ -328,12 +328,12 @@ with the following content: [DEFAULT] storlet_logcontainer = storletlog - host_root = /home/docker_device - cache_dir = /home/docker_device/cache/scopes - log_dir = /home/docker_device/logs/scopes - script_dir = /home/docker_device/scripts - storlets_dir = /home/docker_device/storlets/scopes - pipes_dir = /home/docker_device/pipes/scopes + host_root = /var/lib/storlets + cache_dir = /var/lib/storlets/cache/scopes + log_dir = /var/lib/storlets/logs/scopes + script_dir = /var/lib/storlets/scripts + storlets_dir = /var/lib/storlets/storlets/scopes + pipes_dir = /var/lib/storlets/pipes/scopes storlet_timeout = 40 docker_repo = restart_linux_container_timeout = 3 diff --git a/doc/source/installation.rst b/doc/source/installation.rst index 32c46ff1..a8823e66 100644 --- a/doc/source/installation.rst +++ b/doc/source/installation.rst @@ -75,7 +75,7 @@ storlets with EC and encryption. Valid values are true / false :: # A cross nodes directory for Storlets internal usage. Must exist with the same name in all proxy and storage nodes. - docker_device: /home/docker_device + docker_device: /var/lib/storlets # A pointer to this repo storlet_source_dir: diff --git a/etc/storlet-docker-gateway.conf-sample b/etc/storlet-docker-gateway.conf-sample index dd8c76ab..79966eeb 100644 --- a/etc/storlet-docker-gateway.conf-sample +++ b/etc/storlet-docker-gateway.conf-sample @@ -1,10 +1,10 @@ [DEFAULT] -host_root = /home/docker_device -cache_dir = /home/docker_device/cache/scopes -log_dir = /home/docker_device/logs/scopes -script_dir = /home/docker_device/scripts -storlets_dir = /home/docker_device/storlets/scopes -pipes_dir = /home/docker_device/pipes/scopes +host_root = /var/lib/storlets +cache_dir = /var/lib/storlets/cache/scopes +log_dir = /var/lib/storlets/logs/scopes +script_dir = /var/lib/storlets/scripts +storlets_dir = /var/lib/storlets/storlets/scopes +pipes_dir = /var/lib/storlets/pipes/scopes docker_repo = localhost:5001 restart_linux_container_timeout = 10 storlet_timeout = 40 diff --git a/storlets/gateway/gateways/docker/runtime.py b/storlets/gateway/gateways/docker/runtime.py index 869af176..5d9c054a 100644 --- a/storlets/gateway/gateways/docker/runtime.py +++ b/storlets/gateway/gateways/docker/runtime.py @@ -115,7 +115,7 @@ class RunTimePaths(object): self.sandbox_pipe_dir = '/mnt/channels' self.sandbox_storlet_base_dir = '/home/swift' - self.host_root_dir = conf.get('host_root', '/home/docker_device') + self.host_root_dir = conf.get('host_root', '/var/lib/storlets') self.host_pipe_root_dir = \ conf.get('pipes_dir', os.path.join(self.host_root_dir, 'pipes', 'scopes')) diff --git a/tests/unit/gateway/gateways/docker/test_runtime.py b/tests/unit/gateway/gateways/docker/test_runtime.py index d55b1686..0ceb5ca4 100644 --- a/tests/unit/gateway/gateways/docker/test_runtime.py +++ b/tests/unit/gateway/gateways/docker/test_runtime.py @@ -88,7 +88,7 @@ class TestRuntimePaths(unittest.TestCase): def _initialize(self): # TODO(takashi): take these values from config file - base_dir = '/home/docker_device' + base_dir = '/var/lib/storlets' self.script_dir = os.path.join(base_dir, 'scripts') self.pipes_dir = os.path.join(base_dir, 'pipes', 'scopes') self.storlets_dir = os.path.join(base_dir, 'storlets', 'scopes') @@ -200,16 +200,16 @@ class TestRuntimePaths(unittest.TestCase): storlet_id = 'Storlet-1.0.jar' # For pipe - self.assertEqual('/home/docker_device/pipes/scopes/account', + self.assertEqual('/var/lib/storlets/pipes/scopes/account', runtime_paths.host_pipe_dir) # 1. host_factory_pipe_path //factory_pipe self.assertEqual( - '/home/docker_device/pipes/scopes/account/factory_pipe', + '/var/lib/storlets/pipes/scopes/account/factory_pipe', runtime_paths.host_factory_pipe) # 2. host_storlet_pipe_path // self.assertEqual( - '/home/docker_device/pipes/scopes/account/Storlet-1.0.jar', + '/var/lib/storlets/pipes/scopes/account/Storlet-1.0.jar', runtime_paths.get_host_storlet_pipe(storlet_id)) # 3. Yes, right now, we don't have the path for #3 in Python # 4. sandbox_storlet_pipe_path | /mnt/channels/ @@ -217,10 +217,10 @@ class TestRuntimePaths(unittest.TestCase): runtime_paths.get_sbox_storlet_pipe(storlet_id)) # This looks like for jar load? - self.assertEqual('/home/docker_device/storlets/scopes/account', + self.assertEqual('/var/lib/storlets/storlets/scopes/account', runtime_paths.host_storlet_base_dir) self.assertEqual( - '/home/docker_device/storlets/scopes/account/Storlet-1.0.jar', + '/var/lib/storlets/storlets/scopes/account/Storlet-1.0.jar', runtime_paths.get_host_storlet_dir(storlet_id)) # And this one is a mount poit in sand box? self.assertEqual('/home/swift/Storlet-1.0.jar',