Skip to content
Snippets Groups Projects
Commit b0cfb99a authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

changes for live deployments

parent eb0f15d7
No related branches found
No related tags found
2 merge requests!1452Merge 2.8.2 to main,!1396changes for local builds
...@@ -47,12 +47,9 @@ RUN poetry install ...@@ -47,12 +47,9 @@ RUN poetry install
FROM base as prod FROM base as prod
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
# Don't start until notification and workflow are ready # Don't start until notification and workflow are ready
CMD sh /code/bin/start-capability-with-healthchecks.sh CMD sh /code/bin/start-capability-with-healthchecks.sh
FROM base as dev FROM base as dev
RUN #SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
CMD ["poetry", "run", "pserve", "--reload", "dev.ini"] CMD ["poetry", "run", "pserve", "--reload", "dev.ini"]
...@@ -16,4 +16,4 @@ ...@@ -16,4 +16,4 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with Workspaces. If not, see <https://www.gnu.org/licenses/>. # along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
if ( curl -f -LI ${ENV_HOST}:3458/healthcheck ) && ( curl -f -LI ${ENV_HOST}:3456/healthcheck ); then pserve --reload dev.ini; else exit 1; fi if ( curl -f -LI ${ENV_HOST}:3458/healthcheck ) && ( curl -f -LI ${ENV_HOST}:3456/healthcheck ); then poetry run pserve --reload dev.ini; else exit 1; fi
...@@ -32,7 +32,6 @@ RUN apt update -y && apt install -y curl -y nano ...@@ -32,7 +32,6 @@ RUN apt update -y && apt install -y curl -y nano
USER vlapipe USER vlapipe
RUN curl -sSL https://install.python-poetry.org | python3 - RUN curl -sSL https://install.python-poetry.org | python3 -
#WORKDIR /packages/
ENV PATH "${PATH}:/home/vlapipe/.local/bin" ENV PATH "${PATH}:/home/vlapipe/.local/bin"
COPY --chown=vlapipe:vlapipe ./shared ./shared COPY --chown=vlapipe:vlapipe ./shared ./shared
COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli
...@@ -41,7 +40,6 @@ COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli ...@@ -41,7 +40,6 @@ COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli
# Copy service directory to /code in the image # Copy service directory to /code in the image
# set ownership of content to vlapipe and the vlapipe group # set ownership of content to vlapipe and the vlapipe group
#WORKDIR /code
COPY --chown=vlapipe:vlapipe ./services/notification ./services/notification COPY --chown=vlapipe:vlapipe ./services/notification ./services/notification
WORKDIR /code/services/notification WORKDIR /code/services/notification
RUN poetry install RUN poetry install
...@@ -53,11 +51,9 @@ ARG WS_VERSION=unknown-version ...@@ -53,11 +51,9 @@ ARG WS_VERSION=unknown-version
# Switch to vlapipe # Switch to vlapipe
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local" ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e . #RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
CMD pserve --reload ${DEPLOY_ENV}.ini CMD pserve --reload ${DEPLOY_ENV}.ini
FROM base as dev FROM base as dev
# Python library installation
#RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
CMD ["poetry", "run", "pserve", "--reload", "dev.ini"] CMD ["poetry", "run", "pserve", "--reload", "dev.ini"]
...@@ -34,7 +34,6 @@ RUN chown vlapipe . && chgrp vlapipe . ...@@ -34,7 +34,6 @@ RUN chown vlapipe . && chgrp vlapipe .
USER vlapipe USER vlapipe
RUN curl -sSL https://install.python-poetry.org | python3 - RUN curl -sSL https://install.python-poetry.org | python3 -
#WORKDIR /packages/
ENV PATH "${PATH}:/home/vlapipe/.local/bin" ENV PATH "${PATH}:/home/vlapipe/.local/bin"
COPY --chown=vlapipe:vlapipe ./shared ./shared COPY --chown=vlapipe:vlapipe ./shared ./shared
COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli COPY --chown=vlapipe:vlapipe ./apps/cli ./apps/cli
...@@ -61,7 +60,7 @@ RUN apt update && apt install -y procps htcondor nano ...@@ -61,7 +60,7 @@ RUN apt update && apt install -y procps htcondor nano
# HTCondor setup # HTCondor setup
# Copy over HTCondor submit node config # Copy over HTCondor submit node config
#COPY /config/htcondor/00-htcondor-9.0.config /etc/condor/config.d/00-htcondor-9.0.config # 00-htcondor-9.0.config is environment specific, copy handled later
COPY /config/htcondor/submit/99-workspaces-submit.${DEPLOY_ENV}.conf /etc/condor/config.d/99-workspaces-submit.${DEPLOY_ENV}.conf COPY /config/htcondor/submit/99-workspaces-submit.${DEPLOY_ENV}.conf /etc/condor/config.d/99-workspaces-submit.${DEPLOY_ENV}.conf
COPY /config/htcondor/submit/nrao-nofile.conf /etc/security/limits.d/nrao-nofile.conf COPY /config/htcondor/submit/nrao-nofile.conf /etc/security/limits.d/nrao-nofile.conf
...@@ -80,7 +79,6 @@ FROM pex-base as prod ...@@ -80,7 +79,6 @@ FROM pex-base as prod
ARG WS_VERSION=unknown-version ARG WS_VERSION=unknown-version
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local" ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
ENV PATH "${PATH}:/home/vlapipe/.local/bin" ENV PATH "${PATH}:/home/vlapipe/.local/bin"
RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
USER root USER root
COPY /config/htcondor/00-htcondor-9.0.config /etc/condor/config.d/00-htcondor-9.0.config COPY /config/htcondor/00-htcondor-9.0.config /etc/condor/config.d/00-htcondor-9.0.config
...@@ -92,7 +90,6 @@ FROM pex-base as dev ...@@ -92,7 +90,6 @@ FROM pex-base as dev
ARG WS_VERSION=unknown-version ARG WS_VERSION=unknown-version
ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local" ENV PYTHONPATH "${PYTHONPATH}:/home/vlapipe/.local"
ENV PATH "${PATH}:/home/vlapipe/.local/bin" ENV PATH "${PATH}:/home/vlapipe/.local/bin"
#RUN SETUPTOOLS_SCM_PRETEND_VERSION=${WS_VERSION} pip install -e .
ENV PATH $PATH:/lustre/aoc/pipeline/$CAPO_PROFILE/workflow ENV PATH $PATH:/lustre/aoc/pipeline/$CAPO_PROFILE/workflow
USER root USER root
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment