[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Pulp-list] pulp role to manage rpm repositories




On 25/06/19 21:57, Mike DePaulo wrote:

On Thu, Jun 6, 2019 at 5:32 AM Juan Cabrera <juan cabrera unamur be> wrote:

Hi,

I published the role I made to create and manage the rpm repositories for pulp3.

https://github.com/juan-cabrera/pulp_rpm_repos

I hope this can be helpful.

Regards

Juan

--

Juan CABRERA
Correspondant informatique
Département de Mathématiques

T. 081724919
juan cabrera unamur be
http://staff.unamur.be/jbcabrer

Université de Namur ASBL
Rue de Bruxelles 61 - 5000 Namur
Belgique

Let’s respect the environment together.
Only print this message if necessary!


Wow, this is very cool.

I'm curious, do you write & use this to manage multiple separate Pulp3 servers?

Or did you write and use it because you prefer this Ansible interface over the original REST API?

Hi Mike,

I have update the role to add/remove package.

https://github.com/juan-cabrera/pulp_rpm_repos

https://galaxy.ansible.com/juan_cabrera/pulp_rpm_repos

In principle we will have one server but I suppose it is not a problem to have multiple servers.

One example of variable files I use is:

$ cat /home/jcabrera/repos.yml

---

pulp_admin_user: admin
pulp_default_admin_password: password
pulp_api_server: http://10.0.148.220:24817
__pkg_dir: /home/jcabrera/mnt/pkg

pulp_sync_repos:
  - repo: foo
    repo_version: latest
    remote: bar
    remote_url: https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/
    policy: immediate
    base_path: arch/foo
    distribution: bar
    sync: y
    state: absent

pulp_local_repos:
  - repo: RedHat-7_6_45_7_None_2018b
    repo_version: latest
    add_packages:
      - GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm
      - GCCcore-7.3.0-eb_3.9.0-1.x86_64.rpm
      - OpenMPI-3.1.1-GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm
    remove_packages:
      - OpenBLAS-0.3.1-GCC-7.3.0-2.30-eb_3.9.0-1.x86_64.rpm
      - OpenBLAS-0.3.1-GCC-7.3.0-2.30-eb_3.9.1-2.x86_64.rpm
    pkg_dir: "{{ __pkg_dir }}"
    base_path: RedHat-7_6_45_7_None/easybuild/2018b
    distribution: RedHat-7_6_45_7_None_2018b
    state: absent
# repo with big packages
  - repo: RedHat-7_6_45_7_None_sticky
    repo_version: latest
    add_packages:
      - Schrodinger-2018-1_Linux-x86_64-eb_3.5.1-1.x86_64.rpm
      - TURBOMOLE-7.2.1-eb_3.6.0-1.x86_64.rpm
    remove_packages: []
    pkg_dir: "{{ __pkg_dir }}"
    base_path: RedHat-7_6_45_7_None/easybuild/sticky
    distribution: RedHat-7_6_45_7_None_sticky
    state: present

We will run this from the build server. In the workflow, we compile the applications, build the packages, update the repos.yml file and run the playbook:

ansible-playbook  -c local --extra-vars "@/home/jcabrera/repos.yml" playbooks/pulp_api.yml

The playbook is just

- hosts: localhost
     roles:
       - { role: pulp_rpm_repos }

To use another Pulp server, we just need to change the IP in the pulp_api_server variable

pulp_api_server: http://10.0.148.220:24817

If you have some suggestions they are welcome.

Juan


--

Mike DePaulo

He / Him / His

Service Reliability Engineer, Pulp

Red Hat

IM: mikedep333

GPG: 51745404

--

Juan CABRERA
Correspondant informatique
Département de Mathématiques

T. 081724919
juan cabrera unamur be
http://staff.unamur.be/jbcabrer

Université de Namur ASBL
Rue de Bruxelles 61 - 5000 Namur
Belgique

Let’s respect the environment together.
Only print this message if necessary!


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]