# -------------------------------------------------------------------------
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"]
--- /dev/null
+# 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
-#codecloud.web.att.com
-#vi /etc/resolve.conf
-#nameserver 135.207.142.20
-#nameserver 135.207.142.21
-#nameserver 135.207.255.13
-
+#!/bin/bash
+# TODO (IKRAM): need to test api only first to test the docker upload chain.
+# Will enable the others once api is tested
docker build -t api api/
docker build -t controller controller/
docker build -t data data/
FROM python:2.7
RUN apt-get update
RUN apt-get --assume-yes install python-setuptools
-RUN virtualenv ../venv
RUN git clone https://gerrit.onap.org/r/optf/has
-WORKDIR ./conductor
-RUN pip install .
-RUN pwd
+WORKDIR ./has/conductor/
+RUN pip install -e .
RUN echo "Starting conductor-controller"
CMD ["python","/usr/local/bin/conductor-controller", "--config-file=/usr/local/bin/conductor.conf"]
FROM python:2.7
RUN apt-get update
RUN apt-get --assume-yes install python-setuptools
-RUN virtualenv ../venv
RUN git clone https://gerrit.onap.org/r/optf/has
-WORKDIR ./conductor
-RUN pip install .
-RUN pwd
+WORKDIR ./has/conductor
+RUN pip install -e .
RUN echo "Starting conductor-data"
CMD ["python","/usr/local/bin/conductor-data", "--config-file=/usr/local/bin/conductor.conf"]
--- /dev/null
+#!/bin/bash \r
+BUILD_ARGS="--no-cache" \r
+ORG="onap" \r
+VERSION="1.1.0" \r
+PROJECT="optf" \r
+IMAGE="api" \r
+DOCKER_REPOSITORY="nexus3.onap.org:10003" \r
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" \r
+TIMESTAMP=$(date +"%Y%m%dT%H%M%S") \r
+ \r
+if [ $HTTP_PROXY ]; then \r
+BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" \r
+fi \r
+if [ $HTTPS_PROXY ]; then \r
+ BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" \r
+fi \r
+ \r
+function tag {\r
+ echo "Tagging !!!"\r
+ docker tag api "nexus3.onap.org:10003/onap/optf/api"\r
+ docker tag data "nexus3.onap.org:10003/onap/optf/data"\r
+ docker tag controller "nexus3.onap.org:10003/onap/optf/controller"\r
+ docker tag solver "nexus3.onap.org:10003/onap/optf/solver"\r
+ docker tag reservation "nexus3.onap.org:10003/onap/optf/reservation"\r
+}\r
+\r
+\r
+function push_image { \r
+ echo "Start push ${IMAGE_NAME}:latest" \r
+ \r
+ tag\r
+ docker push "nexus3.onap.org:10003/onap/optf/api"\r
+ docker push "nexus3.onap.org:10003/onap/optf/data"\r
+ docker push "nexus3.onap.org:10003/onap/optf/controller"\r
+ docker push "nexus3.onap.org:10003/onap/optf/solver"\r
+ docker push "nexus3.onap.org:10003/onap/optf/reservation"\r
+ \r
+ #docker push ${IMAGE_NAME}:latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-SNAPSHOT-latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-latest \r
+ #push_image_tag ${IMAGE_NAME}:${VERSION}-STAGING-${TIMESTAMP} \r
+ } \r
+push_image\r
FROM python:2.7
RUN apt-get update
RUN apt-get --assume-yes install python-setuptools
-RUN virtualenv ../venv
RUN git clone https://gerrit.onap.org/r/optf/has
-WORKDIR ./conductor
-RUN pip install .
+WORKDIR ./has/conductor/
+RUN pip install -e .
RUN pwd
RUN echo "Starting conductor-reservation"
CMD ["python","/usr/local/bin/conductor-reservation", "--config-file=/usr/local/bin/conductor.conf"]
### example run - provide the conductor configuration file as input to the run script
-#./run-dockers.sh <path-to>/conductor.conf
-docker run -v $1:/usr/local/bin/conductor.conf api &
+# ./run-dockers.sh <path-to>/conductor.conf
+docker run -v $1:/usr/local/bin/conductor.conf data &
docker run -v $1:/usr/local/bin/conductor.conf controller &
-docker run -v $1:/usr/local/bin/conductor.conf data &
+docker run -p "8091:8091" -v $1:/usr/local/bin/conductor.conf api &
docker run -v $1:/usr/local/bin/conductor.conf solver &
docker run -v $1:/usr/local/bin/conductor.conf reservation &
FROM python:2.7
RUN apt-get update
RUN apt-get --assume-yes install python-setuptools
-RUN virtualenv ../venv
RUN git clone https://gerrit.onap.org/r/optf/has
-WORKDIR ./conductor
-RUN pip install .
-RUN pwd
+WORKDIR ./has/conductor
+RUN pip install -e .
RUN echo "Starting conductor-solver"
CMD ["python","/usr/local/bin/conductor-solver", "--config-file=/usr/local/bin/conductor.conf"]
--- /dev/null
+docker stop $(sudo docker ps -a -q --filter ancestor=api)
+docker stop $(sudo docker ps -a -q --filter ancestor=solver)
+docker stop $(sudo docker ps -a -q --filter ancestor=reservation)
+docker stop $(sudo docker ps -a -q --filter ancestor=data)
+docker stop $(sudo docker ps -a -q --filter ancestor=controller)