mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-13 20:19:58 +08:00
Remove the Docker development environment
This development environment has not been maintained in a long time and it doesn't work anymore. Let's remove it for now and reintroduce containers when we start using OpenShift for development.
This commit is contained in:
39
Dockerfile
39
Dockerfile
@@ -1,39 +0,0 @@
|
||||
FROM fedora:24
|
||||
|
||||
# so we don't have to compile those when fetched from PyPI
|
||||
RUN dnf install -y \
|
||||
fedmsg-relay \
|
||||
gcc \
|
||||
git \
|
||||
koji \
|
||||
krb5-workstation \
|
||||
python-devel \
|
||||
python-flask \
|
||||
python-m2ext \
|
||||
python-mock \
|
||||
python-pip \
|
||||
python-qpid \
|
||||
python-futures \
|
||||
python2-cffi \
|
||||
python2-cryptography \
|
||||
python2-pdc-client \
|
||||
python2-setuptools \
|
||||
python2-zmq \
|
||||
redhat-rpm-config \
|
||||
rpm-build \
|
||||
systemd-devel \
|
||||
# Troubleshooting tools
|
||||
findutils \
|
||||
nc \
|
||||
procps \
|
||||
telnet \
|
||||
&& dnf autoremove -y \
|
||||
&& dnf clean all \
|
||||
&& mkdir /tmp/module_build_service/ \
|
||||
&& mkdir /etc/module-build-service/
|
||||
COPY . /tmp/module_build_service/
|
||||
WORKDIR /tmp/module_build_service/
|
||||
ENV MODULE_BUILD_SERVICE_DEVELOPER_ENV=1
|
||||
RUN python setup.py develop
|
||||
RUN python setup.py egg_info
|
||||
RUN pip install -r test-requirements.txt
|
||||
@@ -1,44 +0,0 @@
|
||||
version: "2"
|
||||
services:
|
||||
|
||||
base:
|
||||
build: .
|
||||
command: bash -c "mbs-upgradedb && touch /etc/module-build-service/.ready"
|
||||
volumes:
|
||||
- ./:/tmp/module_build_service:z
|
||||
- /etc/module-build-service
|
||||
- /tmp/module_build_service/module_build_service.egg-info
|
||||
|
||||
fedmsg-relay:
|
||||
depends_on:
|
||||
- base
|
||||
build: .
|
||||
command: bash -c "while [ ! -f /etc/module-build-service/.ready ] ; do sleep 1 ; done ; fedmsg-relay"
|
||||
expose:
|
||||
- 2001
|
||||
- 2003
|
||||
volumes_from:
|
||||
- base
|
||||
|
||||
scheduler:
|
||||
depends_on:
|
||||
- base
|
||||
build: .
|
||||
command: bash -c "while [ ! -f /etc/module-build-service/.ready ] ; do sleep 1 ; done ; fedmsg-hub"
|
||||
links:
|
||||
- fedmsg-relay
|
||||
volumes_from:
|
||||
- base
|
||||
|
||||
frontend:
|
||||
depends_on:
|
||||
- base
|
||||
build: .
|
||||
command: bash -c "while [ ! -f /etc/module-build-service/.ready ] ; do sleep 1 ; done ; mbs-frontend"
|
||||
ports:
|
||||
- "5000:5000"
|
||||
links:
|
||||
- scheduler
|
||||
- fedmsg-relay
|
||||
volumes_from:
|
||||
- base
|
||||
@@ -50,41 +50,8 @@ Development
|
||||
In most cases, you don't need to deploy your development instance. Please,
|
||||
refer to the `Running Tests` section first.
|
||||
|
||||
We have two mechanisms for quickly setting up a development environment,
|
||||
`docker-compose` and `vagrant`.
|
||||
|
||||
Docker
|
||||
------
|
||||
|
||||
You can use docker containers for development. Here's a guide on how to setup
|
||||
`docker <https://developer.fedoraproject.org/tools/docker/about.html>`_ and
|
||||
`docker-compose <https://developer.fedoraproject.org/tools/docker/compose.html>`_
|
||||
for Fedora users (it's just a `dnf install` away). Mac users should see `these
|
||||
docs <https://docs.docker.com/docker-for-mac/>`_.
|
||||
|
||||
After your docker engine is set up and running and docker-compose is installed,
|
||||
you can start the entire development environment with a single command::
|
||||
|
||||
$ sudo docker-compose up
|
||||
|
||||
That will start a number of services in containers, including the `frontend`
|
||||
and the backend `scheduler`.
|
||||
|
||||
You may want to wipe your local development database from time to time. Try the
|
||||
following commands, and you should have a fresh environment::
|
||||
|
||||
$ rm module_build_service.db
|
||||
$ docker-compose down -v && docker-compose up
|
||||
|
||||
If things get really screwy and your containers won't start properly, the
|
||||
best thing to do is to rebuild the environment from scratch::
|
||||
|
||||
$ docker-compose down -v
|
||||
$ docker-compose build --no-cache --pull
|
||||
|
||||
The first command will stop and remove all your containers and volumes and
|
||||
the second command will pull the latest base image and perform a clean build
|
||||
without using the cache.
|
||||
The easiest way to setup a development environment is by using `vagrant`. You can see instructions
|
||||
about it below.
|
||||
|
||||
Vagrant
|
||||
-------
|
||||
@@ -150,10 +117,9 @@ Environment
|
||||
|
||||
The environment variable `MODULE_BUILD_SERVICE_DEVELOPER_ENV`, which if
|
||||
set to "1", indicates to the Module Build Service that the development
|
||||
configuration should be used. Docker and Vagrant are being run with this
|
||||
environment variable set. This overrides all configuration settings and forces
|
||||
usage of DevConfiguration section in `conf/config.py` from MBS's develop
|
||||
instance.
|
||||
configuration should be used. Vagrant already runs with this environment variable set.
|
||||
This overrides all configuration settings and forces usage of DevConfiguration section
|
||||
in `conf/config.py` from MBS's develop instance.
|
||||
|
||||
Prior to starting MBS, you can force development mode::
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ config = {
|
||||
# End of code signing configuration
|
||||
}
|
||||
|
||||
# developer's instance (docker/vagrant/...)
|
||||
# developer's instance
|
||||
if 'MODULE_BUILD_SERVICE_DEVELOPER_ENV' in os.environ and \
|
||||
os.environ['MODULE_BUILD_SERVICE_DEVELOPER_ENV'].lower() in (
|
||||
'1', 'on', 'true', 'y', 'yes'):
|
||||
|
||||
Reference in New Issue
Block a user