Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lakeFS
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
lakeFS
Commits
6f5e6b69
Commit
6f5e6b69
authored
Apr 25, 2025
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added configuration over CWMP
parent
1df0e7ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
91 additions
and
2 deletions
+91
-2
Makefile
Makefile
+17
-2
lakefs
lakefs
+36
-0
lakefs-init
lakefs-init
+38
-0
No files found.
Makefile
View file @
6f5e6b69
all
:
lakeFS-service
all
:
lakeFS-service
lakeFS-config
dd
if
=
/dev/zero
of
=
swap
bs
=
1048576
count
=
2048
dd
if
=
/dev/zero
of
=
swap
bs
=
1048576
count
=
2048
chmod
600 swap
chmod
600 swap
mkswap swap
mkswap swap
...
@@ -24,6 +24,12 @@ all: lakeFS-service
...
@@ -24,6 +24,12 @@ all: lakeFS-service
@echo
"$$LAKEFS_SERVICE"
>
/lib/systemd/system/lakefs.service
@echo
"$$LAKEFS_SERVICE"
>
/lib/systemd/system/lakefs.service
systemctl
enable
lakefs.service
systemctl
enable
lakefs.service
@echo
"$$LAKEFS_CONFIG"
>
/etc/config/lakefs
install
-v
-Dm755
lakefs
/usr/share/easycwmp/functions
@echo
"d /run/lakefs 0755 root root -"
>
/usr/lib/tmpfiles.d/lakefs.conf
install
-v
-Dm755
lakefs-init
/usr/sbin/lakefs-init
rm
-rf
lakefs-home
rm
-rf
lakefs-home
umount
/tmp
umount
/tmp
rm
-rf
tmp
rm
-rf
tmp
...
@@ -47,10 +53,19 @@ Wants=network-online.target
...
@@ -47,10 +53,19 @@ Wants=network-online.target
Type
=
simple
Type
=
simple
User
=
root
User
=
root
Group
=
root
Group
=
root
ExecStart
=
/usr/bin/lakefs
ExecStartPre
=
/usr/sbin/lakefs-init
ExecStart
=
/usr/bin/lakefs
--config
/run/lakefs/config.yaml run
Restart
=
on-failure
Restart
=
on-failure
[Install]
[Install]
WantedBy
=
multi-user.target
WantedBy
=
multi-user.target
endef
endef
export
LAKEFS_SERVICE
export
LAKEFS_SERVICE
lakeFS-config
:
define
LAKEFS_CONFIG
config
lakefs
'auth'
option
secretkey
''
endef
export
LAKEFS_CONFIG
lakefs
0 → 100755
View file @
6f5e6b69
#!/bin/sh
#common_execute_method_param "$parameter" "$permission" "$get_cmd" "$set_cmd" "xsd:$type" "$forcedinform"
# $forcedinform should be set to 1 if the parameter is included in the inform message otherwise empty
# Default of $type = string
#############################
# Entry point functuons #
#############################
prefix_list
=
"
$prefix_list
$DMROOT
.LakeFS."
entry_execute_method_list
=
"
$entry_execute_method_list
entry_execute_method_root_LakeFS"
entry_execute_method_list_forcedinform
=
"
$entry_execute_method_list_forcedinform
entry_execute_method_root_LakeFS"
entry_execute_method_root_LakeFS
()
{
case
"
$1
"
in
""
|
"
$DMROOT
."
|
"
$DMROOT
.LakeFS."
*
)
common_execute_method_obj
"
$DMROOT
.LakeFS."
"0"
common_execute_method_param
"
$DMROOT
.LakeFS.AuthSecretKey"
"1"
""
"lakefs_set_authsecretkey"
return
0
;
;;
esac
return
$E_INVALID_PARAMETER_NAME
;
}
#######################################
# Data model parameters functions #
#######################################
lakefs_set_authsecretkey
()
{
local
secretkey
=
`
$UCI_GET
lakefs.auth.secretkey
`
if
[
"
$secretkey
"
!=
"
$1
"
]
;
then
$UCI_SET
lakefs.auth.secretkey
=
"
$1
"
$UCI_COMMIT
chmod
a+r /etc/config/lakefs
fi
}
lakefs-init
0 → 100644
View file @
6f5e6b69
#!/bin/sh
SERVER
=
`
/sbin/uci
-q
get mongodb.credentials.hostname
`
DATABASE
=
`
/sbin/uci
-q
get mongodb.credentials.database
`
USER
=
`
/sbin/uci
-q
get mongodb.credentials.username
`
PASSWORD
=
`
/sbin/uci
-q
get mongodb.credentials.password
`
AUTH_SECRET_KEY
=
`
/sbin/uci
-q
get lakefs.auth.secretkey
`
S3_URI
=
`
/sbin/uci
-q
get s3.credentials.uri
`
ACCESS_KEY
=
`
/sbin/uci
-q
get s3.credentials.accesskey
`
SECRET_KEY
=
`
/sbin/uci
-q
get s3.credentials.secretkey
`
if
[
!
-z
"
$SERVER
"
]
&&
[
!
-z
"
$DATABASE
"
]
&&
[
!
-z
"
$AUTH_SECRET_KEY
"
]
&&
[
!
-z
"
$ACCESS_KEY
"
]
&&
[
!
-z
"
$SECRET_KEY
"
]
;
then
echo
"---"
>
/run/lakefs/config.yaml
echo
"database:"
>
/run/lakefs/config.yaml
echo
" type:
\"
postgres
\"
"
>
/run/lakefs/config.yaml
echo
" postgres:"
>
/run/lakefs/config.yaml
if
[
!
-z
"
$USER
"
]
&&
[
!
-z
"
$PASSWORD
"
]
;
then
echo
" connection_string: postgresql://
$USER
:
$PASSWORD
@
$SERVER
/
$DATABASE
"
>
/run/lakefs/config.yaml
else
echo
" connection_string: postgresql://
$SERVER
/
$DATABASE
"
>
/run/lakefs/config.yaml
fi
echo
"auth:"
>
/run/lakefs/config.yaml
echo
" encrypt:"
>
/run/lakefs/config.yaml
echo
" secret_key:
$AUTH_SECRET_KEY
"
>
/run/lakefs/config.yaml
echo
"blockstore:"
>
/run/lakefs/config.yaml
echo
" type: s3"
>
/run/lakefs/config.yaml
echo
" s3:"
>
/run/lakefs/config.yaml
echo
" force_path_style: true"
>
/run/lakefs/config.yaml
if
[
!
-z
"
$S3_URI
"
]
;
then
echo
" endpoint:
$S3_URI
"
>
/run/lakefs/config.yaml
fi
echo
" discover_bucket_region: false"
>
/run/lakefs/config.yaml
echo
" credentials:"
>
/run/lakefs/config.yaml
echo
" access_key_id:
\"
$ACCESS_KEY
\"
"
>
/run/lakefs/config.yaml
echo
" secret_access_key:
\"
$SECRET_KEY
\"
"
>
/run/lakefs/config.yaml
else
exit
1
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment