From Fedora Project Wiki
Line 5: Line 5:
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>.
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... ==
== Prepare your environment ==
These steps are here just to make your workstation talk to our development environment. They are not part of the workflow.
 
=== 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.
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.
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. ==
=== Copy your 'fedpkg' config to your homedir, for editing. ===


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


== Customize that staging configuration file. ==
=== Customize that staging configuration file. ===


Repoint urls in that config to the staging environment.
Repoint urls in that config to the staging environment.
Line 24: Line 27:
     ridaurl = https://modularity.fedorainfracloud.org:5000/rida
     ridaurl = https://modularity.fedorainfracloud.org:5000/rida


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


See https://pagure.io/rpkg/pull-request/75
See https://pagure.io/rpkg/pull-request/75
Line 36: Line 39:
     $ export PYTHONPATH=$(pwd)/src/.:$PYTHONPATH
     $ export PYTHONPATH=$(pwd)/src/.:$PYTHONPATH


== Go and clone a test module... ==
== Build a module ==
This is the actual workflow.
 
=== Go and clone a test module... ===


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


== Try and build it ==
=== Try and build it ===


     $ fedpkg -C ~/fedpkg-stg.conf module-build
     $ fedpkg -C ~/fedpkg-stg.conf module-build
Line 49: Line 55:
Try bumping the release in the yaml file, committing, pushing, and building again.
Try bumping the release in the yaml file, committing, pushing, and building again.


== Look for the results ==
=== Look for the results ===


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

Revision as of 11:02, 1 September 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.

Prepare your environment

These steps are here just to make your workstation talk to our development environment. They are not part of the workflow.

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 = https://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

Build a module

This is the actual workflow.

Go and clone a test module...

   $ fedpkg -C ~/fedpkg-stg.conf co 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/

Take a look at the other modules

We created repos for a number of them at http://pkgs.stg.fedoraproject.org/cgit/modules

Some have been worked on but others we haven't gotten around to fleshing out yet. Still lots to do!