Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of foreman-installer PR #1208

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wbclark
Copy link
Contributor

@wbclark wbclark commented Sep 16, 2020

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 wbclark force-pushed the installer_pr branch 4 times, most recently from 236be57 to dd91ebd Compare September 16, 2020 16:42
@wbclark
Copy link
Contributor Author

wbclark commented Sep 16, 2020

@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
Copy link
Contributor Author

wbclark commented Sep 16, 2020

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
Copy link
Contributor Author

wbclark commented Sep 17, 2020

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
Copy link
Contributor Author

wbclark commented Sep 17, 2020

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
Copy link
Contributor Author

wbclark commented Sep 17, 2020

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

@wbclark
Copy link
Contributor Author

wbclark commented Sep 18, 2020

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.

- name: "build installer from source when installer PR is specified"
set_fact:
foreman_installer_from_source: True
when: foreman_installer_git_pr_number is defined and foreman_installer_git_pr_number
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ehelms This should provide the functionality you requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants