forklift icon indicating copy to clipboard operation
forklift copied to clipboard

Allow use of foreman-installer PR

Open wbclark opened this issue 5 years ago • 6 comments

This is a very rough draft of an idea to use a foreman-installer PR with forklift

Actually currently it allows any fork and branch to be used, but could be updated to specify a PR number instead

The RPM is still installed but we are doing git checkout -f over it which is kind of hackish but I need to figure out a strategy to deal with the modules/ subdirectory.

wbclark avatar Sep 16 '20 01:09 wbclark

@ekohl I updated this to truly skip RPM installation and install foreman-installer and all puppet modules from source using librarian-puppet.

Any idea how I could properly handle the SCL ruby version?

wbclark avatar Sep 16 '20 16:09 wbclark

I also need to figure out what is different w.r.t. answers files vs. RPM installation and ensure the right executable gets called.

wbclark avatar Sep 16 '20 17:09 wbclark

With my latest work on this, I have it working to build the installer from source (haven't fully implemented using a PR number yet) and running the installer which fails due to:

TASK [foreman_installer : Run installer] *****************************************************************************
fatal: [centos7-foreman-nightly]: FAILED! => changed=true 
  cmd: |-
    scl enable rh-ruby25 -- bundle exec bin/foreman-installer -v --no-colors  --scenario foreman  --foreman-initial-admin-password changeme
  delta: '0:00:12.248301'
  end: '2020-09-17 16:35:46.142440'
  msg: non-zero return code
  rc: 1
  start: '2020-09-17 16:35:33.894139'
  stderr: |-
    Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/foreman-installer/custom-hiera.yaml

wbclark avatar Sep 17 '20 16:09 wbclark

Now getting through all hooks up to puppet apply, where it fails due to:

[ERROR 2020-09-17T17:01:29 verbose] Evaluation Error: Error while evaluating a Resource Statement, Unknown resource type: 'augeas' (file: /usr/share/foreman-installer/_build/modules/redis/manifests/ulimit.pp, line: 45, column: 5) on node centos7-foreman-nightly.mercury.example.com

wbclark avatar Sep 17 '20 17:09 wbclark

Installing puppet-agent fixed the issue: Unknown resource type: 'augeas'

wbclark avatar Sep 17 '20 17:09 wbclark

Pushed another update. I'm sticking with SCLs but had to apply a few workarounds.

I'm setting up the puppetserver ca before running the installer (because it doesn't work when the installer tries to do it in the SCL context)

I had to edit the Gemfile as well to install some additional dependencies.

There is still an issue getting rh-redis5-redis.service to start. Looks like a permissions issue with /var/log/redis/redis.log but the obvious change didn't resolve it in my test environment. I will investigate that more later.

wbclark avatar Sep 18 '20 22:09 wbclark