Commit 725c00a1 authored by Matthieu Lamalle's avatar Matthieu Lamalle Committed by Lionel Morin

Acl

parent da528f3b
...@@ -43,7 +43,7 @@ RUN git clone "${CONTAINERPILOT_REPO_URL}" "/tmp/orchestrate" \ ...@@ -43,7 +43,7 @@ RUN git clone "${CONTAINERPILOT_REPO_URL}" "/tmp/orchestrate" \
# API messages description # API messages description
ARG MESSAGES_API_REPO_URL=https://gitlab.mim.ovh/EOLE/Zephir/messages-api.git ARG MESSAGES_API_REPO_URL=https://gitlab.mim.ovh/EOLE/Zephir/messages-api.git
ARG MESSAGES_API_REPO_REF=0.0.4-dev ARG MESSAGES_API_REPO_REF=0.0.6-dev
RUN git clone "${MESSAGES_API_REPO_URL}" "/tmp/messages-api" \ RUN git clone "${MESSAGES_API_REPO_URL}" "/tmp/messages-api" \
&& cd /tmp/messages-api \ && cd /tmp/messages-api \
...@@ -52,7 +52,7 @@ RUN git clone "${MESSAGES_API_REPO_URL}" "/tmp/messages-api" \ ...@@ -52,7 +52,7 @@ RUN git clone "${MESSAGES_API_REPO_URL}" "/tmp/messages-api" \
# Common python Zéphir library # Common python Zéphir library
ARG PYTHON_ZEPHIR_REPO_URL=https://gitlab.mim.ovh/EOLE/Zephir/python-zephir.git ARG PYTHON_ZEPHIR_REPO_URL=https://gitlab.mim.ovh/EOLE/Zephir/python-zephir.git
ARG PYTHON_ZEPHIR_REPO_REF=0.0.2-dev ARG PYTHON_ZEPHIR_REPO_REF=0.0.3-dev
RUN git clone "${PYTHON_ZEPHIR_REPO_URL}" "/tmp/python-zephir" \ RUN git clone "${PYTHON_ZEPHIR_REPO_URL}" "/tmp/python-zephir" \
&& cd /tmp/python-zephir \ && cd /tmp/python-zephir \
...@@ -100,6 +100,7 @@ RUN apt-get update -y && apt-get install -y \ ...@@ -100,6 +100,7 @@ RUN apt-get update -y && apt-get install -y \
python3-psycopg2 \ python3-psycopg2 \
python3-requests \ python3-requests \
python3-yaml \ python3-yaml \
python3-pip \
sqitch \ sqitch \
tzdata tzdata
...@@ -119,6 +120,8 @@ ENV LC_ALL fr_FR.UTF-8 ...@@ -119,6 +120,8 @@ ENV LC_ALL fr_FR.UTF-8
RUN ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime RUN ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime
RUN dpkg-reconfigure --frontend noninteractive tzdata RUN dpkg-reconfigure --frontend noninteractive tzdata
RUN pip3 install casbin
# Sqitch # Sqitch
RUN sqitch config --user user.name 'Equipe EOLE'\ RUN sqitch config --user user.name 'Equipe EOLE'\
&& sqitch config --user user.email 'eole@ac-dijon.fr' && sqitch config --user user.email 'eole@ac-dijon.fr'
...@@ -139,6 +142,7 @@ COPY --from=build /tmp/orchestrate/${services_conf_filename}.ctmpl ${services_co ...@@ -139,6 +142,7 @@ COPY --from=build /tmp/orchestrate/${services_conf_filename}.ctmpl ${services_co
# Install libraries required by service # Install libraries required by service
COPY --from=build /tmp/python-zephir/zephir /usr/lib/python3/dist-packages/zephir COPY --from=build /tmp/python-zephir/zephir /usr/lib/python3/dist-packages/zephir
COPY --from=build /tmp/python-zephir/acl /etc/acl
COPY --from=build /tmp/messages-api/messages /srv/messages COPY --from=build /tmp/messages-api/messages /srv/messages
# Manage container with ContainerPilot # Manage container with ContainerPilot
...@@ -150,6 +154,8 @@ COPY containerpilot.json5 /etc/containerpilot.json5 ...@@ -150,6 +154,8 @@ COPY containerpilot.json5 /etc/containerpilot.json5
## Service specific ## Service specific
## ##
RUN apt-get update -y && apt-get install -y \
python3-ipy
# Tiramisu # Tiramisu
COPY --from=build /tmp/build/tiramisu/usr/share/locale /usr/share/locale COPY --from=build /tmp/build/tiramisu/usr/share/locale /usr/share/locale
COPY --from=build /tmp/build/tiramisu/usr/local/lib/python3.6/dist-packages/tiramisu/ /usr/local/lib/python3.6/dist-packages/tiramisu/ COPY --from=build /tmp/build/tiramisu/usr/local/lib/python3.6/dist-packages/tiramisu/ /usr/local/lib/python3.6/dist-packages/tiramisu/
......
...@@ -32,9 +32,10 @@ class ApiBridgeCtrl(ZephirCommonController): ...@@ -32,9 +32,10 @@ class ApiBridgeCtrl(ZephirCommonController):
return super().__new__(cls) return super().__new__(cls)
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
self.policy = None
super().__init__(*args, **kwargs) super().__init__(*args, **kwargs)
self.needs, self.responses, self.tiramisu = get_messages() self.needs, self.responses, self.tiramisu = get_messages()
async def http_to_rpc(self, request, uri, **kwargs): async def http_to_rpc(self, request, uri, **kwargs):
ret = await self.call(uri, **kwargs) ret = await self.call(uri, **kwargs)
return {'response': ret} return {'response': ret}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment