Skip to content

Commit

Permalink
Issue argoproj#22: Gateway Improvement
Browse files Browse the repository at this point in the history
- Convert gateway to use Flask instead of Django
- Combine gateway, repomanager, eventtrigger into one container instead of 3 containers within the same pod
- Remove all Django dependencies and rebuild axdevopsbuilder (from v8 to v9)
- Change the CPU limit to 800m for the new gateway and use the /v1/ping as the liveness probe
- Conver all related APIs in gateway, axapproval and JIRA integration to use Flask
- Restructure folder and code clean up
  • Loading branch information
Tianhe Zhang authored and wokeGit committed Nov 20, 2017
1 parent 345aecf commit 5d014fa
Show file tree
Hide file tree
Showing 65 changed files with 1,702 additions and 2,581 deletions.
2 changes: 1 addition & 1 deletion build/ax/build/devops.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

DEVOPS_CONTAINERS_PATH = os.path.join(SRC_PATH, "devops/builds")

DEVOPS_BUILDER_IMAGE = '{}/argobase/axdevopsbuilder:v8'.format(ARGO_BASE_REGISTRY)
DEVOPS_BUILDER_IMAGE = '{}/argobase/axdevopsbuilder:v9'.format(ARGO_BASE_REGISTRY)
DEBIAN_BUILDER_IMAGE = '{}/argobase/axplatbuilder-debian:v15'.format(ARGO_BASE_REGISTRY)

class DevOpsModules(object):
Expand Down
File renamed without changes.
12 changes: 0 additions & 12 deletions devops/builds/infrastructure/axeventtrigger/Dockerfile-debug.in

This file was deleted.

10 changes: 0 additions & 10 deletions devops/builds/infrastructure/axeventtrigger/Dockerfile.in

This file was deleted.

10 changes: 0 additions & 10 deletions devops/builds/infrastructure/axeventtrigger/axeventtrigger.py

This file was deleted.

30 changes: 0 additions & 30 deletions devops/builds/infrastructure/axeventtrigger/axeventtrigger.spec

This file was deleted.

4 changes: 0 additions & 4 deletions devops/builds/infrastructure/axeventtrigger/run.sh

This file was deleted.

31 changes: 5 additions & 26 deletions devops/builds/infrastructure/gateway/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,10 @@

FROM %%BUILDER_IMAGE_ID%%

RUN apk --update add nginx

ENV AXHOME=/ax
ENV PYTHONPATH=$AXHOME/src
ENV DJANGOHOME $AXHOME/src/ax/devops/apps/gateway

RUN mkdir -p $AXHOME/db $AXHOME/log
RUN mkdir -p /run/nginx

COPY run.sh \
gateway.conf \
gateway.ini \
$AXHOME/
RUN chmod +x $AXHOME/run.sh
RUN touch /run/nginx/nginx.pid
RUN touch /var/log/cron.log
RUN ln -s $AXHOME/gateway.conf /etc/nginx/conf.d/gateway.conf

ENV PATH $PATH:/ax/bin
ENV PYTHONPATH /ax/src
EXPOSE 8889

COPY docker_build/src $AXHOME/src

RUN python3 $DJANGOHOME/manage.py check \
&& python3 $DJANGOHOME/manage.py makemigrations \
&& python3 $DJANGOHOME/manage.py migrate \
&& python3 $DJANGOHOME/manage.py crontab add

CMD $AXHOME/run.sh
COPY gateway.py /ax/bin/gateway
COPY docker_build/src /ax/src
CMD ["gateway"]
13 changes: 0 additions & 13 deletions devops/builds/infrastructure/gateway/gateway.conf

This file was deleted.

9 changes: 0 additions & 9 deletions devops/builds/infrastructure/gateway/gateway.ini

This file was deleted.

5 changes: 5 additions & 0 deletions devops/builds/infrastructure/gateway/gateway.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env python3

from ax.devops.gateway.main import main
if __name__ == '__main__':
main()
6 changes: 0 additions & 6 deletions devops/builds/infrastructure/gateway/run.sh

This file was deleted.

20 changes: 0 additions & 20 deletions devops/builds/infrastructure/repomanager/Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions devops/builds/infrastructure/repomanager/repomanager.py

This file was deleted.

30 changes: 0 additions & 30 deletions devops/builds/infrastructure/repomanager/repomanager.spec

This file was deleted.

4 changes: 0 additions & 4 deletions devops/builds/infrastructure/repomanager/run.sh

This file was deleted.

8 changes: 0 additions & 8 deletions devops/builds/templates/axdjango/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions devops/builds/templates/axdjango/requirements.txt

This file was deleted.

16 changes: 1 addition & 15 deletions devops/requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,15 @@ Jinja2==2.8
future==0.15.2
google-cloud==0.26.1

# axagent
GitPython==1.0.2
# gateway
jira==1.0.7
flower==0.9.1

# axscheduler
APScheduler==3.2.0

# fixturemanager
pymongo==3.4.0

# gateway
django==1.9
django-extensions==1.6.7
django-filter==0.13.0
djangorestframework==3.3.3
django-crontab==0.7.1
requests==2.10.0
uwsgi==2.0.14
GitPython==1.0.2
pika==0.10.0
redlock-py==1.0.8

# axworkflowadc
transitions==0.4.0

Expand Down
Loading

0 comments on commit 5d014fa

Please sign in to comment.