From Fedora Project Wiki
(Created page with "= How to Build a Module in our Staging Infrastructure = TODO - threebean will fill this out with some rudimentary instructions shortly.")
 
No edit summary
Line 1: Line 1:
= How to Build a Module in our Staging Infrastructure =
= How to Build a Module in our Staging Infrastructure =


TODO - threebean will fill this out with some rudimentary instructions shortly.
The purpose of this document is to introduce you to messing around with the prototype tools the [https://fedoraproject.org/wiki/Modularity modularity working group] has built.
 
This doc doesn't contain much explanation.. more of a step-by-step set of instructions to get you going.  Read the other modularity pages for some insight on to what is going on and why.  Ask in <code>#fedora-modularity</code>.
 
== If you're a provenpackager... ==
 
Then proceed to the next step.  If you're not a provenpackager, then ask in <code>#fedora-modularity</code> for someone (threebean) to add you to the group in *staging* only.
This is because you need rights to the dist-git repo for individual modules, but that's too difficult to maintain while we do all of this development.  It is just easier to add people to stg provenpackagers for the time being.
 
== Copy your 'fedpkg' config to your homedir, for editing. ==
 
    $ cp /etc/rpkg/fedpkg.conf ~/fedpkg-stg.conf
 
== Customize that staging configuration file. ==
 
Repoint urls in that config to the staging environment.
 
    $ sed -i 's/pkgs.fedoraproject/pkgs.stg.fedoraproject/' ~/fedpkg-stg.conf
 
And add the following line to the end of the file
 
    ridaurl = http://modularity.fedorainfracloud.org:5000/rida
 
== Get our patched copy of pyrpkg so fedpkg knows about modules. ==
 
See https://pagure.io/rpkg/pull-request/75
 
    $ git clone https://pagure.io/forks/karsten/rpkg.git
    $ cd rpkg
    $ git checkout modularity_new
 
And modify your <code>$PYTHONPATH</code> to use this new location.
 
    $ export PYTHONPATH=$(pwd)/src/.:$PYTHONPATH
 
== Go and clone a test module... ==
 
    $ fedpkg -C ~/fedpkg-stg.conf modules/testmodule
    $ cd testmodule
 
== Try and build it ==
 
    $ fedpkg -C ~/fedpkg-stg.conf module-build
 
This should fail, because the module has already been built.
 
Try bumping the release in the yaml file, committing, pushing, and building again.
 
== Look for the results ==
 
Look for your module in the rida API (not very interesting yet)
 
    $ sudo dnf install httpie
    $ http get https://modularity.fedorainfracloud.org:5000/rida/module-builds/ --verify no
 
Look for your module in the BPO at http://modularity.fedorainfracloud.org/modules/testmodule/
 
Look for your module in staging koji at http://koji.stg.fedoraproject.org
 
If anything goes wrong which it invariably will, look for logs at http://modularity.fedorainfracloud.org/modularity/logs/

Revision as of 20:46, 30 August 2016

How to Build a Module in our Staging Infrastructure

The purpose of this document is to introduce you to messing around with the prototype tools the modularity working group has built.

This doc doesn't contain much explanation.. more of a step-by-step set of instructions to get you going. Read the other modularity pages for some insight on to what is going on and why. Ask in #fedora-modularity.

If you're a provenpackager...

Then proceed to the next step. If you're not a provenpackager, then ask in #fedora-modularity for someone (threebean) to add you to the group in *staging* only. This is because you need rights to the dist-git repo for individual modules, but that's too difficult to maintain while we do all of this development. It is just easier to add people to stg provenpackagers for the time being.

Copy your 'fedpkg' config to your homedir, for editing.

   $ cp /etc/rpkg/fedpkg.conf ~/fedpkg-stg.conf

Customize that staging configuration file.

Repoint urls in that config to the staging environment.

   $ sed -i 's/pkgs.fedoraproject/pkgs.stg.fedoraproject/' ~/fedpkg-stg.conf

And add the following line to the end of the file

   ridaurl = http://modularity.fedorainfracloud.org:5000/rida

Get our patched copy of pyrpkg so fedpkg knows about modules.

See https://pagure.io/rpkg/pull-request/75

   $ git clone https://pagure.io/forks/karsten/rpkg.git
   $ cd rpkg
   $ git checkout modularity_new

And modify your $PYTHONPATH to use this new location.

   $ export PYTHONPATH=$(pwd)/src/.:$PYTHONPATH

Go and clone a test module...

   $ fedpkg -C ~/fedpkg-stg.conf modules/testmodule
   $ cd testmodule

Try and build it

   $ fedpkg -C ~/fedpkg-stg.conf module-build

This should fail, because the module has already been built.

Try bumping the release in the yaml file, committing, pushing, and building again.

Look for the results

Look for your module in the rida API (not very interesting yet)

   $ sudo dnf install httpie
   $ http get https://modularity.fedorainfracloud.org:5000/rida/module-builds/ --verify no

Look for your module in the BPO at http://modularity.fedorainfracloud.org/modules/testmodule/

Look for your module in staging koji at http://koji.stg.fedoraproject.org

If anything goes wrong which it invariably will, look for logs at http://modularity.fedorainfracloud.org/modularity/logs/