Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
1b7305f1
Commit
1b7305f1
authored
10 years ago
by
Dmitry Simonenko
Browse files
Options
Downloads
Patches
Plain Diff
dist: sophia_dir support
parent
d7e8a5ff
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
extra/dist/default/tarantool
+6
-5
6 additions, 5 deletions
extra/dist/default/tarantool
extra/dist/dist.lua
+18
-11
18 additions, 11 deletions
extra/dist/dist.lua
with
24 additions
and
16 deletions
extra/dist/default/tarantool
+
6
−
5
View file @
1b7305f1
-- Options for Tarantool
default_cfg
=
{
pid_file
=
"/var/run/tarantool"
,
-- will become pid_file .. instance .. '.pid'
wal_dir
=
"/var/lib/tarantool"
,
-- will become wal_dir/instance/
snap_dir
=
"/var/lib/tarantool"
,
-- snap_dir/instance/
logger
=
"/var/log/tarantool"
,
-- logger/instance .. '.log'
username
=
"tarantool"
,
pid_file
=
"/var/run/tarantool"
,
-- will become pid_file .. instance .. '.pid'
wal_dir
=
"/var/lib/tarantool"
,
-- will become wal_dir/instance/
snap_dir
=
"/var/lib/tarantool"
,
-- snap_dir/instance/
sophia_dir
=
"/var/lig/tarantool/sophia"
,
-- will become sophia_dir/sophia/instance/
logger
=
"/var/log/tarantool"
,
-- logger/instance .. '.log'
username
=
"tarantool"
,
}
instance_dir
=
"/etc/tarantool/instances.enabled"
...
...
This diff is collapsed.
Click to expand it.
extra/dist/dist.lua
+
18
−
11
View file @
1b7305f1
...
...
@@ -31,6 +31,9 @@ The file contains common default instances options:
-- snap_dir/instance/
snap_dir = "/var/lib/tarantool",
-- sophia_dir/instance/
sophia_dir = "/var/lib/tarantool/sophia",
-- logger/instance .. '.log'
logger = "/var/log/tarantool",
...
...
@@ -111,19 +114,21 @@ if instance_dir == nil then
instance_dir
=
'/etc/tarantool/instances.enabled'
end
default_cfg
.
pid_file
=
default_cfg
.
pid_file
and
default_cfg
.
pid_file
or
"/var/run/tarantool"
default_cfg
.
wal_dir
=
default_cfg
.
wal_dir
and
default_cfg
.
wal_dir
or
"/var/lib/tarantool"
default_cfg
.
snap_dir
=
default_cfg
.
snap_dir
and
default_cfg
.
snap_dir
or
"/var/lib/tarantool"
default_cfg
.
logger
=
default_cfg
.
logger
and
default_cfg
.
logger
or
"/var/log/tarantool"
default_cfg
.
username
=
default_cfg
.
username
and
default_cfg
.
username
or
"tarantool"
default_cfg
.
pid_file
=
default_cfg
.
pid_file
and
default_cfg
.
pid_file
or
"/var/run/tarantool"
default_cfg
.
wal_dir
=
default_cfg
.
wal_dir
and
default_cfg
.
wal_dir
or
"/var/lib/tarantool"
default_cfg
.
snap_dir
=
default_cfg
.
snap_dir
and
default_cfg
.
snap_dir
or
"/var/lib/tarantool"
default_cfg
.
sophia_dir
=
default_cfg
.
sophia_dir
and
default_cfg
.
sophia_dir
or
"/var/lib/tarantool/sophia"
default_cfg
.
logger
=
default_cfg
.
logger
and
default_cfg
.
logger
or
"/var/log/tarantool"
default_cfg
.
username
=
default_cfg
.
username
and
default_cfg
.
username
or
"tarantool"
-- create a path to the control socket (admin console)
local
console_sock
=
fio
.
pathjoin
(
default_cfg
.
pid_file
,
instance
..
'.control'
)
default_cfg
.
pid_file
=
fio
.
pathjoin
(
default_cfg
.
pid_file
,
instance
..
'.pid'
)
default_cfg
.
wal_dir
=
fio
.
pathjoin
(
default_cfg
.
wal_dir
,
instance
)
default_cfg
.
snap_dir
=
fio
.
pathjoin
(
default_cfg
.
snap_dir
,
instance
)
default_cfg
.
logger
=
fio
.
pathjoin
(
default_cfg
.
logger
,
instance
..
'.log'
)
default_cfg
.
pid_file
=
fio
.
pathjoin
(
default_cfg
.
pid_file
,
instance
..
'.pid'
)
default_cfg
.
wal_dir
=
fio
.
pathjoin
(
default_cfg
.
wal_dir
,
instance
)
default_cfg
.
snap_dir
=
fio
.
pathjoin
(
default_cfg
.
snap_dir
,
instance
)
default_cfg
.
sophia_dir
=
fio
.
pathjoin
(
default_cfg
.
sophia_dir
,
instance
)
default_cfg
.
logger
=
fio
.
pathjoin
(
default_cfg
.
logger
,
instance
..
'.log'
)
local
instance_lua
=
fio
.
pathjoin
(
instance_dir
,
instance
..
'.lua'
)
...
...
@@ -146,16 +151,18 @@ function mk_default_dirs(cfg)
if
fio
.
stat
(
pid_dir
)
==
nil
then
mkdir
(
pid_dir
)
end
-- create wal_dir
if
fio
.
stat
(
cfg
.
wal_dir
)
==
nil
then
mkdir
(
cfg
.
wal_dir
)
end
-- create snap_dir
if
fio
.
stat
(
cfg
.
snap_dir
)
==
nil
then
mkdir
(
cfg
.
snap_dir
)
end
-- create sophia_dir
if
fio
.
stat
(
cfg
.
sophia_dir
)
==
nil
then
mkdir
(
cfg
.
sophia_dir
)
end
-- create log_dir
log_dir
=
fio
.
dirname
(
cfg
.
logger
)
if
log_dir
:
find
(
'|'
)
==
nil
and
fio
.
stat
(
log_dir
)
==
nil
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment