Skip to content

Next-gen CLI tool for Katello (Katello-specific commands)

License

Notifications You must be signed in to change notification settings

pmoravec/hammer-cli-katello

 
 

Repository files navigation

hammer-cli-katello Travis # Status

Next-gen CLI tool for Katello (Katello-specific commands)

hammer-cli development docs for help

Development setup

With this guide, you'll be able to set up hammer-cli-katello, hammer-cli, katello_api, and hammer-cli-foreman for development.

###Requirements for this setup

These are the requirements for this setup. Note that some may not be needed at all depending on your setup.

  • git
  • ruby
  • rvm
  • katello

###Steps

First, cd into the directory where you typically keep your projects and where hammer-cli-katello and its projects will live. Then clone everything.

git clone https://github.com/Katello/hammer-cli-katello.git
git clone https://github.com/theforeman/hammer-cli.git
git clone https://github.com/theforeman/hammer-cli-foreman.git
git clone https://github.com/theforeman/hammer-cli-foreman-tasks.git

Now let's setup our rvm environment files for the project.

cd hammer-cli-katello
echo "1.9.3" > .ruby-version
echo "hammer" > .ruby-gemset
cd ..; cd -

Before we bundle, we need to setup our local Gemfile. Edit Gemfile.local in your hammer-cli-katello directory to point to the local projects instead of using the gems. Enter the following:

# vim:ft=ruby
gem 'hammer_cli', :path => '../hammer-cli'
gem 'hammer_cli_foreman', :path => '../hammer-cli-foreman'
gem 'hammer_cli_foreman_tasks', :path => '../hammer-cli-foreman-tasks'

Now run bundler inside your hammer-cli-katello directory:

bundle install

Now, let's create the directories we need for configuration.

mkdir -p ~/.hammer/cli.modules.d

Edit ~/.hammer/cli_config.yml and enter any hammer-cli config values you want.

Next edit ~/.hammer/cli.modules.d/foreman.yml and enter the following:

:foreman:
  :enable_module: true
  :host: 'http://localhost:3000/'
  :username: 'admin'
  :password: 'changeme'

Edit ~/.hammer/cli.modules.d/katello.yml and enter in the following:

:katello:
  :enable_module: true

And then finally test out your installation:

bundle exec hammer -vh

Look for any errors. If you see none, you should be good to go.

About

Next-gen CLI tool for Katello (Katello-specific commands)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.2%
  • Makefile 1.8%