Skip to content

Instantly share code, notes, and snippets.

@daviddavis
Last active December 18, 2015 11:29
Show Gist options
  • Select an option

  • Save daviddavis/5776321 to your computer and use it in GitHub Desktop.

Select an option

Save daviddavis/5776321 to your computer and use it in GitHub Desktop.

Katello Development Primer

Operating System

We generally recommend either the latest version of RHEL6 or Fedora. Fedora tends to have the newest tools for development while RHEL is more stable (Hint: everyone except Mike uses Fedora).

If you don't want to install Fedora on your desktop (boo!) then you can use your favorite VM solution to run katello. We even have some solutions to help you out with that like kvizer.

Generating a key

First, you should generate an ssh key. This will be used for a few different things. To generate a key, open a termianl and run the following.

ssh-keygen

We recommend using the default location, etc. For a passphrase, it's up to you.

Github

  • First go to github.com and create an account if you don't have one.
  • Now go to a prompt and output your new public key:
cat ~/.ssh/id_rsa.pub
  • Copy the entire string including ssh-rsa and your username@box.
  • Go to https://github.com/settings/ssh and create a new key called "Work" (or whatever you want to name it) and copy in your key.

Creating your katello forks

In order to develop katello, you're going to need a fork. The main two repositories you'll need are katello and katello-cli. Once you're logged into Github, visit the following links and select "Fork". If you see multiple options like @yourname and @Katello, select @yourname.

Setting up your local repo

First you should change into a folder that you want to keep your local copy of katello in.

rvm

Ruby version manager (or rvm) is a tool for managing ruby versions and gems. It's not strictly essential but we find that it makes developing much easier. To install rvm, go to https://rvm.io/ and find the install line (it should start with curl) and paste it into a terminal. Here's that line although it may not be up-to-date:

\curl -L https://get.rvm.io | bash -s stable

tig

One thing that helps with working in vim is being able to visualize commits, code changes, etc. For this, there is a great command line tool called tig. To install it, open a terminal and type in:

sudo yum install tig

Then to run it, simply run tig.

KVM

VMs are essential for developing Katello. If you are using Fedora on your desktop, then you can use the awesome virtualization solution, KVM.

To install KVM and other virtualization packages, install the virtualization package group.

sudo yum install @virtualization

Now you can create VMs by selecting the Virtual Machine Manager program from the main menu or you can start it from the terminal with sudo virt-manager.

IDE

Everyone on Katello has their own favorite IDE (and their opinions which is best) but some of the most popular options are below.

  • RubyMine - GUI editor based on Eclipse. Has a nice intuitive graphical interface. Very easy to learn. We have licenses which are available upon request.
  • vim - a non-graphical text editor. Has a very tough learning curve but can be much more powerful than GUI editors once mastered. It is highly customizable and has a variety of plugins that give you all the features that all other modern text editors have. It also supports a variety of languages including Ruby, Python, etc.
  • Emacs - much like vim, Emacs is a non-graphical text editor. It is also powerful and has a tough learning curve. It also uses Elisp which is handy for people who know Lisp. Like vim, Emacs supports a variety of languages.
  • Sublime Text 2 - a GUI editor that supports a variety of languages like Ruby, Python, etc. It's highly customizable and has a lot of plugins. It's not free but it does has a never-ending evaluation period.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment