Skip to main content

pulp-maven plugin for the Pulp Project

Project description

This is the pulp_maven Plugin for Pulp Project 3.0+. This plugin let’s users use Pulp as a pull-through cache for Maven repositories.

All REST API examples bellow use httpie to perform the requests. The httpie commands below assume that the user executing the commands has a .netrc file in the home directory. The .netrc should have the following configuration:

machine localhost
login admin
password admin

If you configured the admin user with a different password, adjust the configuration accordingly. If you prefer to specify the username and password with each request, please see httpie documentation on how to do that.

This documentation makes use of the jq library to parse the json received from requests, in order to get the unique urls generated when objects are created. To follow this documentation as-is please install the jq library with:

$ sudo dnf install jq

Install pulpcore

Follow the installation instructions provided with pulpcore.

Users should install from either PyPI or source.

Install pulp-maven from source

sudo -u pulp -i
source ~/pulpvenv/bin/activate
git clone https://github.com/pulp/pulp_maven.git
cd pulp_maven
pip install -e .

Install pulp-maven From PyPI

sudo -u pulp -i
source ~/pulpvenv/bin/activate
pip install pulp-maven

Make and Run Migrations

export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
django-admin makemigrations maven
django-admin migrate maven

Run Services

django-admin runserver 24817
gunicorn pulpcore.content:server --bind 'localhost:24816' --worker-class 'aiohttp.GunicornWebWorker' -w 2
sudo systemctl restart pulp-resource-manager
sudo systemctl restart pulp-worker@1
sudo systemctl restart pulp-worker@2

Create a new Maven remote bar

$ http POST http://localhost:24817/pulp/api/v3/remotes/maven/maven/ name='bar' url='https://repo1.maven.org/maven2/'

{
    "_href": "/pulp/api/v3/remotes/maven/maven/2668a20c-3908-4767-b134-531e5145d7b7/",
    ...
}

$ export REMOTE_HREF=$(http :24817/pulp/api/v3/remotes/maven/maven/ | jq -r '.results[] | select(.name == "bar") | ._href')

Create a Maven Distribution for the Maven Remote

$ http POST http://localhost:24817/pulp/api/v3/distributions/maven/maven/ name='baz' base_path='my/local/maven' remote=$REMOTE_HREF

{
    "_href": "/pulp/api/v3/distributions/67baa17e-0a9f-4302-b04a-dbf324d139de/",
   ...
}

Add Pulp as mirror for Maven

<settings>
  <mirrors>
    <mirror>
      <id>pulp-maven-central</id>
      <name>Local Maven Central mirror </name>
      <url>http://localhost:24816/pulp/content/my/local/maven</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulp-maven-0.1.0b2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

pulp_maven-0.1.0b2-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file pulp-maven-0.1.0b2.tar.gz.

File metadata

  • Download URL: pulp-maven-0.1.0b2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for pulp-maven-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 b7af212dad4d1304bd9c43d8f074e3b5260df6514564550eb5912e0438d4e551
MD5 8d6a51887a855126941d8d514e4e9fbf
BLAKE2b-256 8ca5bf77a5c2ef96b4999f43ec14f817cad8fc049ce607bee89a4cfd664f9f0d

See more details on using hashes here.

File details

Details for the file pulp_maven-0.1.0b2-py3-none-any.whl.

File metadata

  • Download URL: pulp_maven-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for pulp_maven-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 4374bf8a422a9309ae53cb47878c6c23adc1b9d9cfabdd9af1357c6b4a8cd825
MD5 2956128a2e1b134fd8df17e37cbe0d78
BLAKE2b-256 54ceee24ba37dd79b49fadf7aa95be569a7494d382e412e1746dba5971d6a616

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page