Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
M. Huang
Flexible Dataset Integrator
Commits
a4d22647
Commit
a4d22647
authored
1 year ago
by
mh001
Browse files
Options
Download
Email Patches
Plain Diff
attempt to add docker entrypoint inhrit.read_only pool avoid deleting.
parent
2e4ba482
master
develop
syncker
2.8.3
2.8.2
2.8.1
2.8.0
2.7.2
2.7.1
2.7.0
2.6.2
2.6.1
2.6.0
2.5.3
2.5.2
2.5.1
2.5.0
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.4.0.2
2.4.0.1
2.4.0
2.3.2
2.3.1
2.3.0
2.2.6
2.2.5
2.2.4
2.2.3
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.47.3
1.47.2
1.47.1
1.47.0
1.46.11
1.46.10
1.46.9
1.46.8
1.46.7
1.46.6
1.46.5
1.46.4
1.46.3
1.46.2
1.46.1
1.45.2
1.45.1
1.45.0
1.44.3
1.44.2
1.44.1
1.44.0
1.43.5
1.43.4
1.43.3
1.43.1
1.43.0
1.41.3
1.41.2
1.41.1
1.41.0
1.40.7
1.40.6
1.40.4
1.40.3
1.40.2
1.40.1
1.40.0
1.40
1.39.7
1.39.6
1.39.5
1.39.4
1.39.3
1.39.2
1.39.1
1.39.0
1.38.3
1.38.2
1.38.1
1.38.0
1.37.2
1.37.1
1.37.0
ops-v1
No related merge requests found
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
dockerfile
+14
-2
dockerfile
dockerfile_entrypoint.sh
+1
-5
dockerfile_entrypoint.sh
fdi/_version.py
+3
-2
fdi/_version.py
fdi/httppool/resources/httppool_server_entrypoint_uwsgi.sh
+1
-0
fdi/httppool/resources/httppool_server_entrypoint_uwsgi.sh
fdi/httppool/resources/httppool_server_uwsgi.docker
+33
-1
fdi/httppool/resources/httppool_server_uwsgi.docker
fdi/pal/publicclientpool.py
+6
-3
fdi/pal/publicclientpool.py
fdi/pns/config.py
+1
-1
fdi/pns/config.py
fdi/pns/fdi_requests.py
+3
-0
fdi/pns/fdi_requests.py
with
62 additions
and
14 deletions
+62
-14
dockerfile
+
14
-
2
View file @
a4d22647
# syntax=docker/dockerfile:1.2
FROM
ubuntu:18.04
AS
fdi
# 8 inherit ENTRYPOINT
# 1-6 M. Huang <mhuang@nao.cas.cn>
# 0.1 yuxin<syx1026@qq.com>
#ARG DEBIAN_FRONTEND=noninteractive
...
...
@@ -157,8 +158,19 @@ WORKDIR ${UHOME}
RUN
pwd
;
/bin/ls
-la
;
env
\
date
>
build
ENTRYPOINT
["/home/fdi/dockerfile_entrypoint.sh"]
CMD
["/bin/bash"]
# https://dev.to/francescobianco/override-docker-entrypoint-sh-into-dockerfile-4fh
USER
root
COPY
${USR}:${USR} /home/fdi/dockerfile_entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN
echo
/bin/bash
>
/usr/local/bin/service-foreground.sh
RUN
chown
${
USR
}
:
${
USR
}
/usr/local/bin/service-foreground.sh
USER
${USR}
RUN
chmod
+x /usr/local/bin/service-foreground.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT
["docker-entrypoint.sh"]
CMD
["service-foreground.sh"]
ARG
DOCKER_VERSION
ENV
PNS_DOCKER_VERSION=${DOCKER_VERSION}
...
...
This diff is collapsed.
Click to expand it.
dockerfile_entrypoint.sh
+
1
-
5
View file @
a4d22647
#!/bin/bash
id
|
tee
~/lastent_docker
echo
######
rm
-rf
/tmp/fditest
*
/tmp/data
date
>>
~/lastent_docker
date
>>
~/last_ent_fdi
cat
~/lastent_docker
echo
@@@
$@
...
...
This diff is collapsed.
Click to expand it.
fdi/_version.py
+
3
-
2
View file @
a4d22647
__version_info__
=
(
1
,
3
6
,
1
)
__version_info__
=
(
1
,
3
7
,
0
)
__version__
=
'.'
.
join
(
map
(
str
,
__version_info__
))
__revision__
=
'1.36.1-
3
-g2
62a547
'
__revision__
=
'1.36.1-
4
-g2
e4ba48
'
# attempt to add docker entrypoint inhrit.read_only pool avoid deleting.
# 1.36.1 fix getUrn bug. vtse working.
# 1.36.0 read_only pools, single PoolManager for all. remove pool info in session. improve pool request processing and debugging info.rr
# 1.35.6 fix typo. make running docker
...
...
This diff is collapsed.
Click to expand it.
fdi/httppool/resources/httppool_server_entrypoint_uwsgi.sh
+
1
-
0
View file @
a4d22647
...
...
@@ -16,6 +16,7 @@ set +a
sed
-i
"s/^conf
\s
*=
\s
*.*
$/
conf = 'production'/g"
~/.config/pnslocal.py
mkdir
-p
/var/log/uwsgi
if
[
!
-d
/var/log/uwsgi
]
;
then
\
sudo mkdir
-p
/var/log/uwsgi
&&
\
sudo chown
-R
fdi:fdi /var/log/uwsgi
&&
\
...
...
This diff is collapsed.
Click to expand it.
fdi/httppool/resources/httppool_server_uwsgi.docker
+
33
-
1
View file @
a4d22647
...
...
@@ -75,6 +75,15 @@ VOLUME /var/log ${PNS_SERVER_LOCAL_POOLPATH}/..
RUN
date
>
build
USER
root
COPY
/home/fdi/dockerfile_entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN
echo
/bin/bash
>
/usr/local/bin/service-foreground.sh
RUN
chown
${
USR
}
:
${
USR
}
/usr/local/bin/service-foreground.sh /usr/local/bin/docker-entrypoint.sh
USER
${USR}
RUN
chmod
+x /usr/local/bin/service-foreground.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT
["/home/fdi/httppool_server_entrypoint_uwsgi.sh"]
#CMD ["uwsgi --master --module wsgi:app --processes 1"]
...
...
@@ -86,4 +95,27 @@ RUN rm -rf /tmp/test* /tmp/data
ARG
SERVER_VERSION
ENV
PNS_SERVER_VERSION=${SERVER_VERSION}
LABEL
PoolServer ${PNS_SERVER_VERSION}
LABEL
poolserver_${PNS_SERVER_VERSION}
## Extend foreground script
# RUN echo uwsgi --ini httppool_server_uwsgi.ini > startsvr \
# && chmod 755 startsvr
# USER root
# RUN cd /usr/local/bin; \
# cp service-foreground service-foreground-inherit; \
# { \
# echo '#!/bin/bash'; \
# echo '[[ "$1" = "startsvr" ]] && { ~fdi/startsvr "$@"; exit; }'; \
# echo 'service-foreground-inherit "$@"'; \
# } > /usr/local/bin/service-foreground
# ## Extend entrypoint script
# RUN cd /usr/local/bin; \
# cp docker-entrypoint.sh docker-entrypoint-inherit.sh; \
# { \
# echo '#!/bin/bash'; \
# echo 'docker-entrypoint-inherit.sh no-run "$@"'; \
# echo '[[ "$1" = "startsvr" ]] && set -- startsvr "$@"'; \
# } > /usr/local/bin/docker-entrypoint.sh
This diff is collapsed.
Click to expand it.
fdi/pal/publicclientpool.py
+
6
-
3
View file @
a4d22647
...
...
@@ -1008,7 +1008,7 @@ class PublicClientPool(ManagedPool):
raise
ValueError
(
'Tag must be a string or a list of string.'
)
return
res
def
doWipe
(
self
,
keep
=
True
):
def
doWipe
(
self
,
keep
=
True
,
include_read_only
=
False
):
""" to do the action of wiping.
Parameters
...
...
@@ -1047,8 +1047,11 @@ class PublicClientPool(ManagedPool):
else
:
raise
ServerError
(
msg
)
r
=
read_from_cloud
(
'wipePool'
,
poolname
=
poolname
,
client
=
self
.
client
,
token
=
self
.
token
,
keep
=
keep
)
if
not
include_read_only
and
poolname
in
self
.
getPoolManager
().
getMap
().
parents
:
r
=
None
else
:
r
=
read_from_cloud
(
'wipePool'
,
poolname
=
poolname
,
client
=
self
.
client
,
token
=
self
.
token
,
keep
=
keep
)
if
r
is
None
:
logger
.
debug
(
f
'Done removing
{
poolname
}
'
)
else
:
...
...
This diff is collapsed.
Click to expand it.
fdi/pns/config.py
+
1
-
1
View file @
a4d22647
...
...
@@ -82,7 +82,7 @@ elif conf == 'production':
# For server. needed for test_pal so this should point to a locally
# writeable dir. If needed to change for a server, do it with
# an environment var.
pnsconfig
[
'baseurl'
]
=
'/fdi
-dev
/v0.16'
pnsconfig
[
'baseurl'
]
=
'/fdi/v0.16'
pnsconfig
[
'self_host'
]
=
'0.0.0.0'
pnsconfig
[
'self_port'
]
=
9876
...
...
This diff is collapsed.
Click to expand it.
fdi/pns/fdi_requests.py
+
3
-
0
View file @
a4d22647
...
...
@@ -585,6 +585,9 @@ def content2result_csdb(content):
code
,
text
,
url
=
resp
# .status, resp.text(), resp.url.raw_path_qs
else
:
# requests
if
resp
is
None
:
#__import__("pdb").set_trace()
return
[
None
]
*
len
(
content
)
if
alist
else
None
code
,
text
,
url
=
resp
.
status_code
,
resp
.
text
,
resp
.
url
obj
=
deserialize
(
text
)
if
issubclass
(
obj
.
__class__
,
str
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets