summaryrefslogtreecommitdiffstats
path: root/conductor/docker/api
diff options
context:
space:
mode:
Diffstat (limited to 'conductor/docker/api')
-rwxr-xr-xconductor/docker/api/Dockerfile22
-rwxr-xr-xconductor/docker/api/api_paste.ini26
2 files changed, 43 insertions, 5 deletions
diff --git a/conductor/docker/api/Dockerfile b/conductor/docker/api/Dockerfile
index bc0b07d..9280c6c 100755
--- a/conductor/docker/api/Dockerfile
+++ b/conductor/docker/api/Dockerfile
@@ -16,11 +16,23 @@
# -------------------------------------------------------------------------
FROM python:2.7
+ENV CON_ADDR "127.0.0.1"
+ENV CON_PORT "8091"
+
+EXPOSE 8091
+
RUN apt-get update
RUN apt-get --assume-yes install python-setuptools
+RUN apt-get install -y unzip
+RUN apt-get install -y curl
+RUN apt-get install -y wget
+RUN rm -rf ./has
RUN git clone https://gerrit.onap.org/r/optf/has
-WORKDIR ./conductor
-RUN pip install .
-COPY ./conductor.conf conductor.conf
-RUN ls -ltr /usr/local/bin/conductor-api
-CMD ["sh","-c", "python /usr/local/bin/conductor-api --port=8091 -- --config-file=conductor.conf"]
+WORKDIR ./has/conductor/
+#RUN ls
+RUN pip install -e .
+#COPY ./conductor.conf conductor.conf
+WORKDIR ./has/conductor/docker/api
+COPY api_paste.ini /usr/local/bin/api_paste.ini
+RUN ls
+CMD ["sh","-c", "python /usr/local/bin/conductor-api --port=8091 -- --config-file=/usr/local/bin/conductor.conf"]
diff --git a/conductor/docker/api/api_paste.ini b/conductor/docker/api/api_paste.ini
new file mode 100755
index 0000000..4299f46
--- /dev/null
+++ b/conductor/docker/api/api_paste.ini
@@ -0,0 +1,26 @@
+# Conductor API WSGI Pipeline
+# Define the filters that make up the pipeline for processing WSGI requests
+# Note: This pipeline is PasteDeploy's term rather than Conductor's pipeline
+# used for processing samples
+
+# Remove authtoken from the pipeline if you don't want to use keystone authentication
+[pipeline:main]
+pipeline = cors http_proxy_to_wsgi api-server
+#pipeline = cors http_proxy_to_wsgi request_id authtoken api-server
+
+[app:api-server]
+paste.app_factory = conductor.api.app:app_factory
+
+#[filter:authtoken]
+#paste.filter_factory = keystonemiddleware.auth_token:filter_factory
+
+#[filter:request_id]
+#paste.filter_factory = oslo_middleware:RequestId.factory
+
+[filter:cors]
+paste.filter_factory = oslo_middleware.cors:filter_factory
+oslo_config_project = conductor
+
+[filter:http_proxy_to_wsgi]
+paste.filter_factory = oslo_middleware.http_proxy_to_wsgi:HTTPProxyToWSGI.factory
+oslo_config_project = conductor