Devpi

DevPI is no longer in use. See instead

Installing DevPi Server

  1. Preferred environment is Python 2.7 with pip, virtualenv installed.

  2. Install the server

    mkdir -p /opt/devpi/data cd /opt/devpi scl enable python27 bash virtualenv venv source venv/bin/activate pip install --upgrade pip pip -q -U devpi-server
  3. The data area needs to be initialised using

    cd /opt/devpi/ source venv/bin/activate devpi-server --serverdir /opt/rh/devpi/data --init
  4. The server is run with the commands

    cd /opt/devpi/ source env/bin/activate # Drop the --start to run in the forground # --stop --status --log also available devpi-server --port 3141 --serverdir /opt/rh/devpi/data --start

     

  5. A proxy can be setup and it is assumed nginx will be used and the service runner needs to be set up to redirect to the devi-pi. Example configs (but not init.d) can be generated by running the devpi-server with --gen-config

  6. devpi is currently configured on the jira/bitbucket/confluence server using an apache proxy and is accessible at the following url https://devpi.renalregistry.nhs.uk

devpi-server is started and stopped using scripts in /opt/devpi/bin . These are called from an init.d  script located in /etc/init.d/devpi .

/etc/init.d/devpi

The current set up of devpi server on the jira/Bitbucket server runs RedHat 6 and doesn't use the default httpd but uses httpd v2.4 which means it is installed via the the software collection and referenced as httpd24 with config files stored in /opt/rh/httpd24/root/etc/httpd  rather than the default path of /etc/httpd . 

Upgrading the Server

Installing DevPi Client

The version of Pip supplied with Python 3.6 no longer works with DevPi. Before following these steps upgrade it to the latest version.
Install a devpi client on your client machine

  1. Create a pip.ini file

    1. For your local machine:

      GS: Mine is in C:\Users\MY_USERNAME\AppData\Roaming\pip

    2. On rr-bamboo,

      1. for 32bit Python (27 and 36 in our case), add the pip.ini file to the
        C:\Windows\system32\config\systemprofile\pip
        folder

      2. For 64 bit Python (36 in our case), add the above pip.ini file to the
        C:\Windows\SysWOW64\config\systemprofile\pip
        folder

Configuring DevPi Server

  1. Create a root user:

  2. Create a user named 'ukrr' with the following:

  3. Login and create the initial indices:

  4. Initial seed of pips:


    The lxml, pywin32 and PyQt pips were obtained from http://www.lfd.uci.edu/~gohlke/pythonlibs/
    The pysvn pip has to be built using https://github.com/ferraith/pysvn-wheeler Instructions are contained in the download.

  5. I noticed when I uploaded pyinstaller 3.3 (for tpckd_validation, python 3.5), devpi refused to search the main indices for other versions of same modules. Setting up a mirror allowed access to the tip version, so if you want a previous version, this needs to be uploaded by hand. Fetch the source from pypi, and build the wheel using python setup.py bdist_wheel (remember to use the right version of python for the target wheel).

Filter by label

There are no items with the selected labels at this time.