Fedora Hubs provides a consistent contributor experience across all Fedora teams and will serve as an “intranet” page for the Fedora Project. There are many different projects in Fedora with different processes and workflows. Hubs will serve as a single place for contributors to learn about and contribute to them in a standardized format. Hubs will also be a social network for Fedora contributors. It is designed as one place to go to keep up with everything and everybody across the project in ways that aren’t currently possible.
- Want to hack on Hubs? The latest source code is on the open source git-based forge Pagure.
- Want to learn more about the history behind Hubs? Máirín wrote a few blog posts on the progress of hubs.
This article will help you set up a Fedora Hubs development environment on your local machine.
Tips for new contributors
New contributors willing to contribute to Hubs typically set it up locally as a first step, but often face issues during the setup process. We decided to write this post to provide you with tips to help you hack your way into the project! We’ll talk about getting through some common pitfalls, provide a glossary of Hubs-related terms, and give you a walk-through of what to expect once you’ve got Hubs set up locally – all to help you get on your way contributing to Hubs!
Common pitfalls setting up Hubs locally
Note: The Hubs team regularly updates our project README file. You’ll want to have a copy of this open to refer to while you set Hubs up locally.
Here’s a list of Hubs local setup pitfalls with some background information and hints.
Certificate validation error
After having installed all the dependencies and cloned the project, you need to configure the project to authenticate against Ipsilon, Fedora’s multi-protocol identity provider service.
$ oidc-register --debug https://iddev.fedorainfracloud.org/ http://localhost:5000
If you get an error regarding certificate verification, the following command will replace httplib2’s CA certificate file. Without it, you won’t be able to authenticate since you don’t have the HTTP setting.
$ cp /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ~/.virtualenvs/hubs/lib/python2.7/site-packages/httplib2/cacerts.txt
500 errors / database issues after a
Sometimes the database schema changes as a result of development efforts. When your database is out of date and you pull down new code requiring a schema change, the application might fail when you try to run it. You can try repopulating the database.
$ python populate.py
This might fail for various reasons with a traceback. The easiest way forward is to just wipe out your old database and generate a new one with the new schema. This one-liner will do that as well as restart the Hubs app:
$ rm /var/tmp/hubs.db; rm /var/tmp/fedora-hubs-cache.db; python populate.py; python runserver.py -c config
Login won’t work! I’m stuck in Ipsilon!
Make sure you’re passing in the config file when you run Hubs from your machine. Run the server like this.
python runserver.py -c config
Glossary of Hubs terminology
- A hub can be associated with a page displaying the info that concerns the hub’s topic (whether that topic is a Fedora contributor (i.e. FAS user) or a team (i.e. FAS group) within Fedora). Hubs consist of a feed / stream of notifications (typically on the left / main side of the screen) as well as customizable widgets (typically on the right sidebar).
- The various-sized rectangular cards on a hub page are called widgets. One can find the various widgets under the widgets/ directory in the source code. Every widget has a respective HTML file under the widgets/templates directory.
- User Hub page:
- The hub page of a FAS (Fedora Account System) user. User hubs are configurable and list the widgets each user has configured and wishes to display on their page. While hacking on the project, you might want to navigate to
localhost:5000/fas_usernameto view the widgets on a user hub page.
- Group Hub page:
- A hub page for one of the various Fedora teams such as the Infrastructure team, Design team, CommOps, Marketing, i18n, etc. While hacking on a widget relevant to groups, you need to navigate to
localhost:5000/group_nameto view the respective widget on the group hub page. Note that group hubs are associated with FAS groups.
What to expect after local setup
Now, let’s talk about what you can expect to see once you’ve got Hubs up and running on your system.
Once you’ve successfully completed the setup of Hubs locally on your system, you might see something similar to this on your localhost.
This is a group hub—in this case, the Infrastructure team hub—listing a feed for the Infrastructure team as well as their configured widgets. The widgets are listed in the same order as they were added with their index values, in the populate.py file under the Infrastructure team.
When hacking on a new widget, according to the hub page you wish to display, one might want to add it either to the
hubs/defaults.py file or to the
populate.py file. One can look into it under the “Stubbing out a new widget” section of the README file.)
This is an example of a user hub.
These are the hub pages for Ralph (FAS username: ralph) and Máirín (FAS username: duffy). It lists the widgets configured for the respective user in the hubs/defaults.py file. Each user can configure their user hub (or profile) as they wish in order to appeal to visitors.
This is a good place to get to know and interact with the rest of the Fedora Hubs team. It is a global communication tool, so asynchronous chat happens often. You can drop in and/or lurk in #fedora-hubs on irc.freenode.net. We have weekly meetings every Tuesday at 14:00 UTC.
Never used IRC before or a little bit intimidated? Check out this IRC Beginner’s Guide here on Fedora Magazine for more help getting started.
When you’ve got questions, want to have a discussion, get feedback, and/or catch up with what people are doing on the team, our mailing list is the place to be. A mailing list is a subscription-based tool. You have to subscribe to the list where you want to post to. Fedora Hubs has a mailing list that you need to subscribe to here.
After you hit the Login button, you need to authenticate with your FAS account. To subscribe to the list, you can use any email address you prefer. Just drop us an introduction mail on the list and we’ll reply back.
Hope to see you soon! Happy hacking on Hubs!