Commit 16763c1b authored by Matthias's avatar Matthias
Browse files

remove more flask code

parents c264dd86 6ead2b4e
Pipeline #16078 passed with stages
in 4 minutes and 21 seconds
......@@ -3,21 +3,10 @@ FROM python:3.8
WORKDIR /mediametadatatodb_app
ADD mediametadatatodb_app /mediametadatatodb_app/
ADD requirements.txt /mediametadatatodb_app/
WORKDIR /mediametadatatodb_app/kubectl
#install kubectl so that helm can work in the docker container
RUN wget && chmod +x ./kubectl
ENV PATH /mediametadatatodb_app/kubectl:$PATH
WORKDIR /mediametadatatodb_app
#install helm
#RUN wget && tar -xvzf helm-v3.2.1-linux-amd64.tar.gz && mv linux-amd64 helm
#ENV PATH /mediametadatatodb_app/helm:$PATH
#RUN ./
RUN pip install -r requirements.txt
RUN pip install -e .
ENV FLASK_APP mediametadatatodb_app
ENV FLASK_ENV development
ENTRYPOINT ["python"]
CMD ["/mediametadatatodb_app/"]
# mediametadatatodb
# Read form mediaserve-metadata from kafka and write it into mediaserver-mariaDB
cd kubernetes-manifests
kubectl apply -f .
# Start the app
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
cd mediametadatatodb_app
#mkdir charts
cd ..
export FLASK_APP=mediametadatatodb_app
export FLASK_ENV=development
flask run
This will start a development web server hosting your application, which you will be able to see by navigating to
# Reads form mediaserver-metadata from kafka and write it into mediaserver-mariaDB
from datetime import timezone
def generate_helm_name(process_id, job_name):
return process_id + '-' + job_name
def get_job_info(job):
job is a Kubernetes V1Job
utc_start_time = job.status.start_time
local_start_time = utc_start_time.replace(tzinfo=timezone.utc).astimezone(tz=None)
status = 'Unknown'
if job.status.failed:
status = 'Failed'
elif (
status = 'Running'
return {
"status": status,
"started": local_start_time.strftime("%m/%d/%Y, %H:%M:%S")
......@@ -4,7 +4,4 @@ setup(
Supports Markdown
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