Skip to content

pombredanne/juicer-1

 
 

Repository files navigation

image

image

image

Juicer

Juicer is a command-line interface to the Pulp REST API which provides a shopping cart style approach to uploading and promoting groups of packages or docker images through multiple environments.

Documentation

The main documentation lives at http://juicer.readthedocs.org/en/latest/.

Usage

usage: juicer [-h] [-v] [-V] {cart,rpm,repo,role,user,hello} ...

manage pulp and release carts

optional arguments:
-h, --help            show this help message and exit
-v, --verbose         show verbose output
-V, --version         show program's version number and exit

commands:
'juicer COMMAND -h' for individual help topics

{cart,rpm,repo,role,user,hello}
cart                cart operations
rpm                 rpm operations
repo                repo operations
role                role operations
user                user operations
hello               test your connection to the pulp server

Create a repository

Creating a repository without specifying --in will automatically create the repository in every configured environment.

juicer repo create my-repository

Or, a repository can be created in specific environments.

juicer repo create my-repository --in devel

Note

Repositories created by juicer have a relative path which includes the environments they were created in. If a repository was created in devel, it would be available at https://<pulp-host>/pulp/repos/devel/.

The Pulp repo_id of a repository created by juicer will be display_name-environment. A repository named test-repo created in the devel environment would have a repo_id of test-repo-devel.

This was done so that multiple environments can co-exist on a single Pulp node.

Create a cart

A cart is composed of repositories and packages.

juicer cart create my-cart -r my-repository ~/rpmbuild/RPMS/noarch/*.rpm

Multiple packages and repositories can be specified.

juicer cart create my-cart -r my-repository ~/rpmbuild/RPMS/noarch/*.rpm \
                           -r my-other-repository ./awesome.rpm /tmp/woah.rpm

Packages don't have to be local.

juicer cart create my-cart -r my-repository http://dang.com/rpms/omg.rpm

Push a cart to an environment

juicer cart push my-cart --in qa

A cart can be saved remotely once it has been pushed. This can be useful if the release engineer needs to swap mid-release. Add cart_seeds (insecure mongo endpoint) to juicer configuration to enable remote saves. Remote carts can be pulled with juicer cart pull.

juicer cart delete my-cart
juicer cart pull my-cart
juicer cart show my-cart

Configuration

Juicer is configured through a ~/.config/juicer/config file. The config is broken into sections by environment and may also contain an optional DEFAULT section, from which the defaults for all following sections are supplied.

The standard flow of this sample infrastructure goes from devel to prod; meaning that we upload our packages to devel and test them accordingly in our development environment before we promote them to prod.

[DEFAULT]
username: admin
password: admin
port: 443
verify_ssl: True
ca_path: /etc/pki/pulp/ca.crt
cert_filename: /etc/pki/pulp/pulp.crt
start_in: devel
cart_seeds: localhost:27017

[devel]
hostname: localhost
promotes_to: qa

[qa]
hostname: localhost
promotes_to: stage

[stage]
hostname: localhost
promotes_to: prod

[prod]
hostname: localhost

Installation

Juicer was built to work with Pulp version 2.6.0. We assume that you have a server up and running which Juicer can talk to. Installation instructions for Pulp are available here.

RPM Install

RPM packages are available for RHEL/Centos 7 and Fedora 21 & 22.

dnf copr enable abutcher/juicer
dnf install -y juicer

Source Install

sudo python ./setup.py install

Running locally

Run make ci to install dependencies within your local checkout. This will create an isolated Python virtualenv. The ci Makefile target also runs our tests and checks PEP8 style formatting.

make ci

. juicerenv/bin/activate

juicer -h

About

This is a fork of the Juicer project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 85.0%
  • Roff 8.6%
  • Makefile 6.4%