Katello devel environment is broken (with workaround)

Hey all,

Seems like there are multiple issues with the Katello development environment. I wasn’t able to spin one up from staging repos or normally with centos7-katello-devel. Luckily, we have the stable box, but even that needs some tweaking to play nice with all the updates when you git pull (it was published 9 days ago before rails 6 updates).

Here is the only way I can figure out to get a working Katello environment:

  1. vagrant box update centos7-katello-devel-stable is needed if you previously spun up a stable box
  2. In forklift vagrant up centos7-katello-devel-stable
  3. ssh into box and pull latest katello and foreman
  4. update all the things: cd ~/foreman; rm Gemfile.lock && bundle install && bundle exec rake db:migrate && npm install
  5. add config.hosts.clear to ~/foreman/config/environments/development.rb (see https://www.fngtps.com/2019/rails6-blocked-host/)
  6. Add to ~/foreman/config/settings.plugins.d/katello.yaml
:event_daemon:
  :enabled: false

(see Breaking changes coming to the Katello dev environment)

Can we use this thread to track any updates and discuss blockers? Its seems there is a permanent solution needed for the authorized hosts Rails 6 issue and my understanding is the nightly pipeline contains some fixes that are blocked. Please share any more information or updates as they develop, thanks!

For what it’s worth, I suspect we’ll also run into this in production mode and something the installer should fix for a proper secure env. Since we configure Apache to set a server name + aliases, we have the values for config.hosts but need a SETTING in settings.yaml to configure this.

Unless there is a PR about to be merged, I think we should make this change to the development environment: https://github.com/theforeman/foreman/pull/7619

It seems like this change is what will unblock spinning up a development environment for the koji repos and perhaps some other blockages. The better production fix can be applied to development environment when it is ready.

1 Like

With https://github.com/theforeman/foreman/pull/7619 merged, a katello devel box from staging spins up fine. You can spin one up with a box definition like this:

centos7-katello-devel-staging:
  primary: true
  box: centos7
  ansible:
    playbook: 'playbooks/katello_devel.yml'
    group: 'devel'
    variables:
      katello_devel_github_username: <REPLACEME>
      foreman_repositories_environment: staging
      katello_repositories_environment: staging

I’ll see if I can get a stable box published from the staging repo box as well so that will be available

I published the katello dev environment created with staging repos as a v2020.0430.1800 to vagrant cloud.

This can be used as the centos7-katello-devel-stable box, be sure to vagrant box update centos7-katello-devel-stable before spinning up a new one so you have the latest version.