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

Move devel installation to playbook and role #279

Merged
merged 1 commit into from
Nov 10, 2016

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Sep 1, 2016

No description provided.

@ekohl
Copy link
Member

ekohl commented Sep 2, 2016

Why do you only do this for centos7-devel and not centos6-devel?

@stbenjam
Copy link
Member

stbenjam commented Sep 2, 2016

CentOS 6 is dead for foreman nightly. Even if it's resurrected, maybe it's time to drop el6 as a dev box option anyway?

@ehelms
Copy link
Member Author

ehelms commented Sep 2, 2016

See #281 for removal

@ehelms
Copy link
Member Author

ehelms commented Oct 13, 2016

This has been rebased

ansible:
group: 'server'
playbook: 'playbooks/katello_devel.yml'
group: 'devel'
Copy link
Member

Choose a reason for hiding this comment

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

How about adding this?

   variables:
       katello_devel_username: stbenjam

And removing it from the playbook

Copy link
Member

Choose a reason for hiding this comment

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

Also maybe more obvious with github in the variable name, to match the installer flag


- name: 'Run devel installer'
command: >
foreman-installer
Copy link
Member

Choose a reason for hiding this comment

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

Needs --disable-system-checks

@ehelms ehelms force-pushed the devel-playbook branch 2 times, most recently from 494af11 to f8d429e Compare October 13, 2016 17:45
@ehelms
Copy link
Member Author

ehelms commented Oct 13, 2016

Updated

@stbenjam
Copy link
Member

Looks ok, building a box now

@stbenjam
Copy link
Member

@ehelms

TASK [katello_devel : Run devel installer] *************************************
Thursday 13 October 2016  13:59:28 -0400 (0:01:14.356)       0:12:04.932 ****** 
fatal: [ansible-devel]: FAILED! => {"failed": true, "msg": "The conditional check 'skip_installer == False' failed. The error was: error while evaluating conditional (skip_installer == False): 'skip_installer' is undefined\n\nThe error appears to have been in '/home/stbenjam/git/forklift/playbooks/roles/katello_devel/tasks/main.yml': line 12, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: 'Run devel installer'\n  ^ here\n"}

I think you can gate the check with skip_installer is defined && ...

- "--katello-devel-github-username {{ katello_devel_github_username }}"
foreman_installer_additional_packages:
- foreman-installer-katello-devel
roles:
Copy link
Member

Choose a reason for hiding this comment

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

I think puppet_repositories could be a useful addition as well, allowing users to install puppet 4.

foreman_installer_additional_packages:
- foreman-installer-katello-devel
roles:
- etc_hosts
Copy link
Contributor

Choose a reason for hiding this comment

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

Need these two:

    • epel_repositories
    • puppet_repositories

@thomasmckay
Copy link
Contributor

I don't know if it's applicable here or should just be a RTFM action but not being able to just pop into ~/foreman and run bin/rails s -b 0.0.0.0 (or whatever the foreman command is) is not ideal. I had to yum install npm, npm install, rake webpack:compile. I could not hit the server at https only http:3000.

Also, I think only the katello dir had my remote added? Should be added to foreman too.

Maybe echo out "go here for finishing instructions for running a development server".

@ekohl
Copy link
Member

ekohl commented Oct 24, 2016

I think that's something that was also lacking with setup.rb and something that needs to be added to puppet-katello_devel

@ehelms
Copy link
Member Author

ehelms commented Oct 24, 2016

@ekohl @thomasmckay @stbenjam updates made across the board from comments

@thomasmckay
Copy link
Contributor

ack

@ehelms
Copy link
Member Author

ehelms commented Nov 10, 2016

@stbenjam please have a look when you get a chance

@stbenjam
Copy link
Member

stbenjam commented Nov 10, 2016

From an ansible perspective it seems to be fine, as it does everything up to and including running the devel installer, although the install itself fails but that's happening with the old dev setup too I guess:

[ WARN 2016-11-10 10:13:15 verbose]  /Stage[main]/Katello_devel::Setup/Exec[rails server]/returns: => Run `rails server -h` for more startup options
[ WARN 2016-11-10 10:13:15 verbose]  /Stage[main]/Katello_devel::Setup/Exec[rails server]/returns: A server is already running. Check /home/vagrant/foreman/tmp/pids/server.pid.
[ERROR 2016-11-10 10:13:15 verbose]  /Stage[main]/Katello_devel::Setup/Exec[rails server]: Failed to call refresh: sudo su vagrant -c '/bin/bash --login -c "rvm use 2.2.4 && bundle exec rails s -d"' returned 1 instead of one of [0]
[ERROR 2016-11-10 10:13:15 verbose]  /Stage[main]/Katello_devel::Setup/Exec[rails server]: sudo su vagrant -c '/bin/bash --login -c "rvm use 2.2.4 && bundle exec rails s -d"' returned 1 instead of one of [0]
[ERROR 2016-11-10 10:13:15 verbose] /usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
[ERROR 2016-11-10 10:13:15 verbose] /usr/share/ruby/vendor_ruby/puppet/type/exec.rb:160:in `sync'
[ERROR 2016-11-10 10:13:15 verbose] /usr/share/ruby/vendor_ruby/puppet/type/exec.rb:583:in `refresh'

@ehelms ehelms merged commit a940088 into theforeman:master Nov 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants