mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-04 11:20:00 +08:00
alter Docker-/Vagrantfile so that it installs all dependencies and use 'python setup.py install' for MBS installation
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -14,16 +14,19 @@ RUN dnf install -y \
|
||||
python-mock \
|
||||
git \
|
||||
krb5-workstation \
|
||||
systemd-devel \
|
||||
gcc \
|
||||
redhat-rpm-config \
|
||||
python-devel \
|
||||
python-flask \
|
||||
# Troubleshooting tools
|
||||
telnet \
|
||||
nc \
|
||||
procps \
|
||||
findutils \
|
||||
&& dnf autoremove -y \
|
||||
&& dnf clean all \
|
||||
&& mkdir /opt/module_build_service/ \
|
||||
&& mkdir /etc/module_build_service
|
||||
WORKDIR /opt/module_build_service/
|
||||
COPY ./requirements.txt /opt/module_build_service/
|
||||
RUN pip install --user -r ./requirements.txt
|
||||
|
||||
RUN ln -s /opt/module_build_service/conf/koji.conf /etc/module_build_service/koji.conf \
|
||||
&& ln -s /opt/module_build_service/conf/copr.conf /etc/module_build_service/copr.conf
|
||||
&& mkdir /tmp/module_build_service/
|
||||
COPY . /tmp/module_build_service/
|
||||
WORKDIR /tmp/module_build_service/
|
||||
RUN python setup.py install
|
||||
|
||||
29
Vagrantfile
vendored
29
Vagrantfile
vendored
@@ -18,26 +18,29 @@ $script = <<SCRIPT
|
||||
rpm-build \
|
||||
fedpkg \
|
||||
python-mock \
|
||||
krb5-workstation
|
||||
pip install -r /opt/module_build_service/requirements.txt
|
||||
pip install -r /opt/module_build_service/test-requirements.txt
|
||||
cd /opt/module_build_service
|
||||
mkdir -p /etc/module_build_service
|
||||
ln -s /opt/module_build_service/conf/koji.conf /etc/module_build_service/koji.conf
|
||||
ln -s /opt/module_build_service/conf/copr.conf /etc/module_build_service/copr.conf
|
||||
python manage.py upgradedb
|
||||
python manage.py generatelocalhostcert
|
||||
krb5-workstation \
|
||||
systemd-devel \
|
||||
gcc \
|
||||
redhat-rpm-config \
|
||||
python-devel \
|
||||
python-flask
|
||||
cd /tmp/module_build_service
|
||||
python setup.py install
|
||||
mbs-upgradedb
|
||||
mbs-gencert
|
||||
systemctl enable fedmsg-relay
|
||||
systemctl start fedmsg-relay
|
||||
echo "export KRB5CCNAME=FILE:/var/tmp/krbcc" >> ~/.bashrc
|
||||
SCRIPT
|
||||
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "boxcutter/fedora24"
|
||||
config.vm.synced_folder "./", "/opt/module_build_service"
|
||||
# $ wget https://download.fedoraproject.org/pub/fedora/linux/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-Vagrant-24-1.2.x86_64.vagrant-libvirt.box && \
|
||||
# vagrant box add Fedora-Cloud-Base-Vagrant-24-1.2.x86_64.vagrant-libvirt.box --name fedora-24
|
||||
config.vm.box = "fedora-24"
|
||||
config.vm.synced_folder "./", "/tmp/module_build_service"
|
||||
config.vm.provision "file", source: "/var/tmp/krbcc", destination: "/var/tmp/krbcc", run: "always"
|
||||
config.vm.network "forwarded_port", guest: 5000, host: 5000
|
||||
config.vm.provision "shell", inline: $script
|
||||
config.vm.provision :shell, inline: "cd /opt/module_build_service && python manage.py runssl --debug &", run: "always"
|
||||
config.vm.provision :shell, inline: "cd /opt/module_build_service && python module_build_service_daemon.py &", run: "always"
|
||||
config.vm.provision :shell, inline: "mbs-frontend &", run: "always"
|
||||
config.vm.provision :shell, inline: "mbs-daemon &", run: "always"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user