Skip to content

Commit

Permalink
Bootstrap pulp_python for Pulp 3
Browse files Browse the repository at this point in the history
Replace current code with boilerplate created by plugin template.
Added back README changes, AUTHORS, COPYRIGHT, travis.yaml, etc.

closes: #2882
https://pulp.plan.io/issues/2882
  • Loading branch information
dralley committed Nov 8, 2017
1 parent 4e4687a commit 5a02277
Show file tree
Hide file tree
Showing 74 changed files with 355 additions and 4,622 deletions.
6 changes: 0 additions & 6 deletions .coveragerc

This file was deleted.

7 changes: 0 additions & 7 deletions .mention-bot

This file was deleted.

4 changes: 2 additions & 2 deletions .travis.yml
@@ -1,7 +1,7 @@
language: python
python:
- "2.6"
- "2.7"
- "3.5"
- "3.6"
install:
- "pip install -r test_requirements.txt"
script:
Expand Down
10 changes: 9 additions & 1 deletion AUTHORS
@@ -1,3 +1,11 @@
Graham Forest <graham@urbanairship.com>
This is an alphabetical (by last name) list of the authors of the pulp_python project. If you submit a pull request
to pulp_python and your name is not on this list, please add yourself.

Mike Adams <mike.adams@unix-security.net>
Daniel Alley (dalley@redhat.com)
Muhammad Ammar Ansari <mansari@redhat.com>
Randy Barlow <rbarlow@redhat.com>
Graham Forest <graham@urbanairship.com>
Sayli Karmarkar <skarmark@redhat.com>
Austin Macdonald (amacdona@redhat.com)
Bihan Zhang (bizhang@redhat.com)
3 changes: 1 addition & 2 deletions LICENSE
@@ -1,4 +1,4 @@
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
Expand Down Expand Up @@ -337,4 +337,3 @@ proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

134 changes: 126 additions & 8 deletions README.rst
@@ -1,12 +1,130 @@
pulp_python
===========
``pulp_python`` Plugin
=======================

.. image:: https://travis-ci.org/pulp/pulp_python.svg?branch=master
:target: https://travis-ci.org/pulp/pulp_python
This is the ``pulp_python`` Plugin for `Pulp Project
3.0+ <https://pypi.python.org/pypi/pulpcore/>`__. A Pulp plugin to support hosting your own
pip compatible Python packages.

.. image:: https://coveralls.io/repos/pulp/pulp_python/badge.png?branch=master
:target: https://coveralls.io/r/pulp/pulp_python?branch=master
For more information, please see http://www.pulpproject.org.

A Pulp plugin to support hosting your own pip compatible Python packages.
All REST API examples bellow use `httpie <https://httpie.org/doc>`__ 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:

For more information, please see http://www.pulpproject.org.
.. code-block::
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.

Install ``pulpcore``
--------------------

Follow the `installation
instructions <https://docs.pulpproject.org/en/3.0/nightly/installation/instructions.html>`__
provided with pulpcore.

Install ``pulp-python`` from source
---------------------------------

1) sudo -u pulp -i
2) source ~/pulpvenv/bin/activate
3) git clone https://github.com/pulp/pulp\_python.git
4) cd pulp\_python
5) python setup.py develop
6) pulp-manager makemigrations pulp\_python
7) pulp-manager migrate pulp\_python
8) django-admin runserver
9) sudo systemctl restart pulp\_worker@1
10) sudo systemctl restart pulp\_worker@2

Install ``pulp-python`` From PyPI
-------------------------------

1) sudo -u pulp -i
2) source ~/pulpvenv/bin/activate
3) pip install pulp-python
4) pulp-manager makemigrations pulp\_python
5) pulp-manager migrate pulp\_python
6) django-admin runserver
7) sudo systemctl restart pulp\_worker@1
8) sudo systemctl restart pulp\_worker@2


Create a repository ``foo``
---------------------------

``$ http POST http://localhost:8000/api/v3/repositories/ name=foo``

Add an Importer to repository ``foo``
-------------------------------------

Add important details about your Importer and provide examples.

``$ http POST http://localhost:8000/api/v3/repositories/foo/importers/python/ some=params``

.. code:: json
{
"_href": "http://localhost:8000/api/v3/repositories/foo/importers/python/bar/",
...
}
Add a Publisher to repository ``foo``
-------------------------------------

``$ http POST http://localhost:8000/api/v3/repositories/foo/publishers/python/ name=bar``

.. code:: json
{
"_href": "http://localhost:8000/api/v3/repositories/foo/publishers/python/bar/",
...
}
Add a Distribution to Publisher ``bar``
---------------------------------------

``$ http POST http://localhost:8000/api/v3/repositories/foo/publishers/python/bar/distributions/ some=params``

Sync repository ``foo`` using Importer ``bar``
----------------------------------------------

Use ``python`` Importer:

``http POST http://localhost:8000/api/v3/repositories/foo/importers/python/bar/sync/``

Add content to repository ``foo``
---------------------------------

``$ http POST http://localhost:8000/api/v3/repositorycontents/ repository='http://localhost:8000/api/v3/repositories/foo/' content='http://localhost:8000/api/v3/content/python/a9578a5f-c59f-4920-9497-8d1699c112ff/'``

Create a Publication using Publisher ``bar``
--------------------------------------------

Dispatch the Publish task

``$ http POST http://localhost:8000/api/v3/repositories/foo/publishers/python/bar/publish/``

.. code:: json
[
{
"_href": "http://localhost:8000/api/v3/tasks/fd4cbecd-6c6a-4197-9cbe-4e45b0516309/",
"task_id": "fd4cbecd-6c6a-4197-9cbe-4e45b0516309"
}
]
Check status of a task
----------------------

``$ http GET http://localhost:8000/api/v3/tasks/82e64412-47f8-4dd4-aa55-9de89a6c549b/``

Download ``foo.tar.gz`` from Pulp
---------------------------------

``$ http GET http://localhost:8000/content/foo/foo.tar.gz``
2 changes: 0 additions & 2 deletions common/pulp_python/__init__.py

This file was deleted.

Empty file.
22 changes: 0 additions & 22 deletions common/pulp_python/common/constants.py

This file was deleted.

15 changes: 0 additions & 15 deletions common/setup.py

This file was deleted.

Empty file removed common/test/unit/__init__.py
Empty file.
Empty file.
Empty file.
1 change: 0 additions & 1 deletion dist_list.txt

This file was deleted.

2 changes: 0 additions & 2 deletions extensions_admin/pulp_python/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions extensions_admin/pulp_python/extensions/__init__.py

This file was deleted.

Empty file.

0 comments on commit 5a02277

Please sign in to comment.