Software repository API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. docker-artifact
  2. ===============
  3. Software repository server
  4. Artifactd provides an HTTP API for repository management. Currently, Python and Apt repositories are supported.
  5. Quickstart
  6. ----------
  7. * Pull or build the image
  8. * `docker run -it --rm -e 'DATABASE_URL=mysql+pymysql://...' -e 'S3_URL=http://...' -p 8080:8080 artifact`
  9. The in-container webserver will listen on port 8080 by default. Database url is passed directly to sqlalchemy, but only
  10. mysql is tested. S3_URL is in the form of `https?://keyname:keysecret@endpoint_url/bucket_name`. Amazon S3 is supported
  11. but minio is the preferred backend.
  12. Examples
  13. --------
  14. Upload python package:
  15. `curl -vv -F 'f=@pyircbot-4.0.0.post3-py3.5.egg' 'http://localhost:8080/addpkg?provider=pypi&reponame=reponame&name=pyircbot&version=4.0.0'`
  16. Install python packages:
  17. `pip3 install -i http://host/repo/pypi/reponame/ --trusted-host host <packages>`
  18. Upload apt package:
  19. `curl -vv -F 'f=@python3_3.6.7-1~18.04_amd64.deb' 'http://host/addpkg?provider=apt&reponame=reponame&name=python3&version=3.6.7-1~18.04&dist=bionic'`
  20. Install apt packages:
  21. ```
  22. wget -qO- http://host/repo/apt/reponame/pubkey | apt-key add - && \
  23. echo "deb http://host/repo/apt/reponame bionic main" | tee -a /etc/apt/sources.list && \
  24. apt-get update
  25. ```
  26. CLI
  27. ---
  28. Building on the rest endpoints above:
  29. Apt:
  30. * `rpcli -s http://localhost:8080 upload -y apt -f extpython-python3.6_3.6.7_amd64.deb_trusty -r reponame -p extpython-python3.6 -i 3.6.7 -a dist=trusty`
  31. Python:
  32. * `rpcli -s http://localhost:8080 upload -y pypi -f tensorflow-2.0.0a0-cp37-cp37m-manylinux1_x86_64.whl -r reponame -p tensorflow -i 2.0.0a0`
  33. Notes
  34. -----
  35. * Repos are created automatically when a package is added to them.
  36. * Repo URLs are structured as: `/repo/<provider>/<name>`. URLs at and below this level are handled directly by
  37. the provider.
  38. * In the apt provider, only binary-amd64 packages are supported. No source, binary-i386 or other groups
  39. * In the apt provider, every repo has only one component, named "main"
  40. * The apt provider will generate a gpg key per repo upon repo creation
  41. * The repo contents can be browsed on the web
  42. * This uses my fork of python-dpkg, from [here](https://git.davepedu.com/dave/python-dpkg), which is not automatically
  43. installed via `setup.py` due to pip limitations.
  44. * The apt provider includes a convenience shell script:
  45. ```
  46. apt-get update && \
  47. apt-get install -y wget gnupg && \
  48. wget -qO- http://host/repo/apt/reponame/dists/trusty/install | bash -x /dev/stdin
  49. ```
  50. Todo
  51. ----
  52. * Auth
  53. * Delete packages
  54. * Support using existing GPG keys
  55. * Nicer UI