diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..600fdf78 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM fedora:24 + +# so we don't have to compile those when fetched from PyPI +RUN dnf install -y python-pip python2-setuptools python2-cffi python2-zmq python2-cryptography koji python2-pdc-client && \ + dnf autoremove -y && dnf clean all && \ + mkdir /opt/fm-orchestrator/ +WORKDIR /opt/fm-orchestrator/ +COPY ./requirements.txt /opt/fm-orchestrator/ +RUN pip install --user -r ./requirements.txt + +COPY koji.conf /etc/rida/ + +COPY . /opt/fm-orchestrator/ + +RUN python2 ./manage.py upgradedb && ./generate_localhost_cert.sh +CMD ["python2", "manage.py", "runssl"] diff --git a/README.rst b/README.rst index 219966b5..0d2bd6c3 100644 --- a/README.rst +++ b/README.rst @@ -315,3 +315,14 @@ E.g. ``"scmurl": "git://pkgs.stg.fedoraproject.org/modules/testmodule.git?#020ea The toplevel directory containing the trees for each architecture of a module. This field is only present when a module finished building, i.e. with the states 'done' or 'ready'. + + +Development +=========== + +You can use docker containers for development. Here's a guide how to setup `docker `_ and `docker-compose `_. + +After your docker engine is set up and running, and docker-compose installed you can start whole system with a single command:: + + $ sudo docker-compose up + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..84f8d774 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +version: "2" +services: + ridad: + build: + context: . + command: python2 /opt/fm-orchestrator/ridad.py + volumes: + - ./rida/:/opt/fm-orchestrator/rida/ # rida sources are bind-mounted, so you don't have to rebuild + - ~/.fedora.cert:/root/.fedora.cert # koji credentials are mounted inside + - ~/.fedora-server-ca.cert:/root/.fedora-server-ca.cert + - ~/.fedora-upload-ca.cert:/root/.fedora-upload-ca.cert + rida: + build: + context: . + ports: + - "5000:5000" + links: + - ridad + volumes: + - ./rida/:/opt/fm-orchestrator/rida/ diff --git a/koji.conf b/koji.conf new file mode 100644 index 00000000..67c385d7 --- /dev/null +++ b/koji.conf @@ -0,0 +1,31 @@ +[koji] + +;configuration for koji cli tool + +;url of XMLRPC server +server = http://koji.stg.fedoraproject.org/kojihub + +;url of web interface +weburl = http://koji.stg.fedoraproject.org/koji + +;url of package download site +topurl = http://kojipkgs.fedoraproject.org/ + +;path to the koji top directory +;topdir = /mnt/koji + +;configuration for Kerberos authentication + +;the service name of the principal being used by the hub +;krbservice = host + +;configuration for SSL authentication +authtype = ssl +;client certificate +cert = ~/.fedora.cert + +;certificate of the CA that issued the client certificate +ca = ~/.fedora-server-ca.cert + +;certificate of the CA that issued the HTTP server certificate +serverca = ~/.fedora-server-ca.cert