Skip to content
This repository was archived by the owner on Oct 15, 2023. It is now read-only.
This repository was archived by the owner on Oct 15, 2023. It is now read-only.

How to upgrade from log4j 1.x version to log4j 2.x version in Janusgraph #109

@Riturajvats

Description

@Riturajvats
# NOTE: THIS FILE IS GENERATED VIA "update.sh"
# DO NOT EDIT IT DIRECTLY; CHANGES WILL BE OVERWRITTEN.
#
# Copyright 2019 JanusGraph Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8-jdk as builder

ARG JANUS_VERSION=0.4.1

ENV JANUS_VERSION=${JANUS_VERSION} \
    JANUS_HOME=/opt/janusgraph

RUN curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/janusgraph-${JANUS_VERSIO           N}-hadoop2.zip -o janusgraph.zip && \
    curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/janusgraph-${JANUS_VERSIO           N}-hadoop2.zip.asc -o janusgraph.zip.asc && \
    curl -fSL https://github.com/JanusGraph/janusgraph/releases/download/v${JANUS_VERSION}/KEYS -o KEYS && \
    gpg --import KEYS && \
    gpg --batch --verify janusgraph.zip.asc janusgraph.zip && \
    unzip janusgraph.zip && \
    mv janusgraph-${JANUS_VERSION}-hadoop2 /opt/janusgraph && \
    rm -rf ${JANUS_HOME}/elasticsearch && \
    rm -rf ${JANUS_HOME}/javadocs && \
    rm -rf ${JANUS_HOME}/log && \
    rm -rf ${JANUS_HOME}/examples

COPY conf/janusgraph-berkeleyje-lucene-server.properties conf/log4j-server.properties ${JANUS_HOME}/conf/gremlin-ser           ver/
COPY scripts/remote-connect.groovy ${JANUS_HOME}/scripts/
COPY conf/gremlin-server.yaml ${JANUS_HOME}/conf/
#COPY conf/Circuit_Equipment_cluster.properties /opt/janusgraph/conf/gremlin-server/
COPY ./groovy-sql-2.0.1.jar /opt/janusgraph/lib/
COPY ./ojdbc8.jar /opt/janusgraph/lib/
FROM openjdk:8-jdk

ARG CREATED=test
ARG REVISION=test
ARG JANUS_VERSION=0.4.1

ENV JANUS_VERSION=${JANUS_VERSION} \
    JANUS_HOME=/opt/janusgraph \
    JANUS_CONFIG_DIR=/etc/opt/janusgraph \
    JANUS_DATA_DIR=/var/lib/janusgraph \
    JANUS_SERVER_TIMEOUT=30 \
    JANUS_STORAGE_TIMEOUT=60 \
    JANUS_PROPS_TEMPLATE=berkeleyje-lucene \
    janusgraph.index.search.directory=/var/lib/janusgraph/index \
    janusgraph.storage.directory=/var/lib/janusgraph/data \
    gremlinserver.graph=/etc/opt/janusgraph/janusgraph.properties \
    gremlinserver.threadPoolWorker=1 \
    gremlinserver.gremlinPool=8

RUN groupadd -r janusgraph --gid=999 && \
    useradd -r -g janusgraph --uid=999 janusgraph && \
    apt-get update -y && \
    DEBIAN_FRONTEND=noninteractive apt-get install -y krb5-user && \
    rm -rf /var/lib/apt/lists/* && \
    mkdir /docker-entrypoint-initdb.d

COPY --from=builder /opt/janusgraph/ /opt/janusgraph/

COPY docker-entrypoint.sh /usr/local/bin/
COPY load-initdb.sh /usr/local/bin/

RUN chmod 755 /usr/local/bin/docker-entrypoint.sh && \
    chmod 755 /usr/local/bin/load-initdb.sh && \
    chown -R janusgraph:janusgraph ${JANUS_HOME}

RUN apt-get update
RUN apt-get -y install vim
RUN apt-get -y install net-tools
RUN apt-get -y install cron

WORKDIR /opt
ADD ./oracle-instantclient.deb  /opt
ADD ./oracle-instantclient-sqlplus.deb  /opt
ADD ./oracle-instantclient19.6-tools_19.6.0.0.0-2_amd64.deb  /opt
#if libaio also required
RUN apt-get install libaio1
RUN dpkg -i oracle-instantclient.deb
RUN dpkg -i oracle-instantclient-sqlplus.deb
RUN dpkg -i oracle-instantclient19.6-tools_19.6.0.0.0-2_amd64.deb
#COPY oracle.sh /etc/profile.d/
#RUN chmod 755 /etc/profile.d/oracle.sh
#RUN ["/bin/bash", "-c", "source /etc/profile.d/oracle.sh"
ENV ORACLE_HOME=/usr/lib/oracle/19.6/client64
ENV PATH=$ORACLE_HOME/bin:$PATH
ENV LD_LIBRARY_PATH=$ORACLE_HOME/lib
ENV EDITOR=vim
EXPOSE 8182
EXPOSE 8183
EXPOSE 8184
EXPOSE 8185

WORKDIR ${JANUS_HOME}

ENTRYPOINT [ "docker-entrypoint.sh" ]
CMD [ "janusgraph" ]

LABEL org.opencontainers.image.title="JanusGraph Docker Image" \
      org.opencontainers.image.description="Official JanusGraph Docker image" \
      org.opencontainers.image.url="https://janusgraph.org/" \
      org.opencontainers.image.documentation="https://docs.janusgraph.org/v0.4/" \
      org.opencontainers.image.revision="${REVISION}" \
      org.opencontainers.image.source="https://github.com/JanusGraph/janusgraph-docker/" \
      org.opencontainers.image.vendor="JanusGraph" \
      org.opencontainers.image.version="${JANUS_VERSION}" \
      org.opencontainers.image.created="${CREATED}" \
      org.opencontainers.image.license="Apache-2.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions