Install and run two versions concurrently

General support for problems installing or using Deluge
Post Reply
cinderblock63
Member
Member
Posts: 23
Joined: Thu Jan 22, 2009 10:07 am
Location: Menlo Park, CA
Contact:

Install and run two versions concurrently

Post by cinderblock63 »

I am writing some test for a package and I'd like to test it against both 1.3 and 2.0 branches. I'm having trouble getting both versions installed on one system at the same time.

Note, I'm not trying to have two daemons serve the same torrents. Just want to run coverage tests on my package against both versions at the same time.

My first idea was to try to trick apt-get to allow me to install both versions at once. But I couldn't figure out how to hack the ppa to get it to install as deluge2 for instance (and not overwrite the installed 1.3 version).

Another passing thought was to find some docker images with deluge that I could run against. But I'm hesitant to try that because of unfamiliarity with docker and also wanting to test against latest Deluge sources automatically.

So, what I'm trying now, is installing from source.

Since this is just a testing environment that gets destroyed after ever run, I don't see the advantage of "installing" in the conventional sense. I expect I should be able to "build" the sources and "run" directly from there. But I'm not finding an obvious executable in `build` after running `python2 setup.py build`.

Full disclosure, I'm not well versed in how Python installs packages normally.

Looking at it with my under informed eyes, do I need to copy to `.../site-packages`? This doesn't bode well for installing Deluge2 at the same time since I expect they would conflict. Is there some trivial way to call it deluge2 instead that I'm unaware of?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Install and run two versions concurrently

Post by mhertz »

I'd install the other in a virtualenv, to have both concurrently. One user here asked about such not too long ago and I gave him some instructions for my distro and he posted the diff for his(ubuntu). Maybe it's the other way around in case what you want, with regards to which is installed originally, and which to install later in a virtualenv, but regardless.

viewtopic.php?f=7&t=55488&p=230450&hili ... nv#p230450
cinderblock63
Member
Member
Posts: 23
Joined: Thu Jan 22, 2009 10:07 am
Location: Menlo Park, CA
Contact:

Re: Install and run two versions concurrently

Post by cinderblock63 »

Thank you. Very helpful. Cheers!
User avatar
gderf
Seeder
Seeder
Posts: 155
Joined: Sat Jun 18, 2016 1:32 am

Re: Install and run two versions concurrently

Post by gderf »

You can run multiple versions with dockers. And docker is well worth learning.
cinderblock63
Member
Member
Posts: 23
Joined: Thu Jan 22, 2009 10:07 am
Location: Menlo Park, CA
Contact:

Re: Install and run two versions concurrently

Post by cinderblock63 »

gderf, got a docker image that runs the latest stable version of deluge, even as it updates?
boredazfcuk
Member
Member
Posts: 22
Joined: Sun Jun 16, 2019 10:08 pm

Re: Install and run two versions concurrently

Post by boredazfcuk »

cinderblock63 wrote:gderf, got a docker image that runs the latest stable version of deluge, even as it updates?
My docker container is probably up to the job, but may need a couple of tweaks: https://hub.docker.com/r/boredazfcuk/deluge

I run this as part of a stack with a lot of other components, so have just put this together docker-compose.yaml for you (I've stripped out lots of other services so not tested this).

It should start you off

Code: Select all

version: "2.4"

volumes:
   deluge_config:
      name: deluge_config
   deluge:
      image: boredazfcuk/deluge
      networks:
         containers:
            aliases:
               - deluge
      environment:
         - TZ=Europe/Berlin
         - STACKUSER=myuser
         - STACKPASSWORD=mypassword
         - UID=1111
         - GROUP=deluge
         - GID=1111
         - DOWNLOADCOMPLETEDIR=/storage/downloads/complete/
         - MOVIECOMPLETEDIR=/storage/downloads/complete/movie/
         - MUSICCOMPLETEDIR=/storage/downloads/complete/music/
         - OTHERCOMPLETEDIR=/storage/downloads/complete/other/
         - TVCOMPLETEDIR=/storage/downloads/complete/tv
         - DELUGEWATCHDIR=/storage/downloads/watch/deluge/
         - DELUGEINCOMINGDIR=/storage/downloads/incoming/deluge/
         - DELUGEFILEBACKUPDIR=/storage/downloads/backup/deluge/
      healthcheck:
         test: /usr/local/bin/healthcheck.sh
         interval: 1m
         timeout: 10s
         retries: 3
         start_period: 40s
      restart: always
      volumes:
         - deluge_config:/config/
         - /usr/share/GeoIP/:/usr/share/GeoIP/
         - /storage/:/storage/
         
networks:
   containers:
      name: containers
      driver: bridge
      enable_ipv6: no
      ipam:
         driver: default
         config:
            - subnet: 192.168.168.0/24
              gateway: 192.168.168.254
      driver_opts:
         com.docker.network.bridge.name: containers0

It depends on having the GeoIP.dat database in /usr/share/GeoIP. I have this mapped to the same folder on my host with the .dat file in. You'll need the Maxmind Country IPv4 DB file from here: https://www.miyuru.lk/geoiplegacy
cinderblock63
Member
Member
Posts: 23
Joined: Thu Jan 22, 2009 10:07 am
Location: Menlo Park, CA
Contact:

Re: Install and run two versions concurrently

Post by cinderblock63 »

Thanks boredazfcuk. I look forward to playing with that.

To those that are curious, I've got this working with virtualenv. I'm totally open to any suggestions.

https://github.com/cinderblock/node-del ... /373583102
Post Reply