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

Upgrading a chef-server install #140

Open
eugeneromero opened this issue Apr 28, 2017 · 4 comments
Open

Upgrading a chef-server install #140

eugeneromero opened this issue Apr 28, 2017 · 4 comments
Labels
Type: Enhancement Adds new functionality.

Comments

@eugeneromero
Copy link

eugeneromero commented Apr 28, 2017

Cookbook version

5.4.0

Chef-client version

12.19.36

Platform Details

Ubuntu 14.04

Scenario:

Testing cookbook's upgrade capabilities

Steps to Reproduce:

  1. Set ['chef-server']['version'] to, say, 12.10.0. Run chef-server::default recipe. Version 12.10.0 installs.

  2. Change ['chef-server']['version'] to 12.11.0. Run chef-server::default recipe again.

Expected Result:

Expected chef-server to upgrade to version 12.11.0.

Actual Result:

Cookbook downloads the new package, however apt_package skips with (up to date). Looking at cookbook source, it seems chef_ingredient's action is hardcoded to install. chef_ingredient however, provides more actions (such as upgrade) both in the newest version and the version currently pinned by this cookbook.

Relevant lines from the (second) chef-client run:


       Recipe: chef-server::default
         * ruby_block[ensure node can resolve API FQDN] action run[2017-04-28T19:17:48+00:00] INFO: Processing ruby_block[ensure node can resolve API FQDN] action run (chef-server::default line 22)
        (skipped due to not_if)
         * chef_ingredient[chef-server] action install[2017-04-28T19:17:48+00:00] INFO: Processing chef_ingredient[chef-server] action install (chef-server::default line 29)

         Recipe: <Dynamically Defined Resource>
           * chef_gem[mixlib-install] action install[2017-04-28T19:17:48+00:00] INFO: Processing chef_gem[mixlib-install] action install (dynamically defined)
        (up to date)
           * ruby_block[stop chef run] action nothing[2017-04-28T19:17:50+00:00] INFO: Processing ruby_block[stop chef run] action nothing (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/helpers.rb line 263)
        (skipped due to action :nothing)
           * remote_file[/tmp/kitchen/cache/chef-server-core_12.11.0-1_amd64.deb] action create[2017-04-28T19:17:50+00:00] INFO: Processing remote_file[/tmp/kitchen/cache/chef-server-core_12.11.0-1_amd64.deb] action create (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 106)
        (up to date)
           * apt_package[chef-server] action install[2017-04-28T19:17:53+00:00] INFO: Processing apt_package[chef-server] action install (/tmp/kitchen/cache/cookbooks/chef-ingredient/libraries/default_handler.rb line 52)
        (up to date)
            (up to date)

Am I missing something, or is there no way of upgrading a current install to a newer version?

This of course can be triggered by modifying the resource in my wrapper cookbook:

include_recipe 'chef-server'
resources(chef_ingredient: 'chef-server').action(:upgrade)

But then I also need to take care of running the reconfigure, upgrade and cleanup steps.

In case the functionality does exist, could some info about it be added to the README?

Thank you!

@tas50
Copy link
Contributor

tas50 commented May 2, 2017

@papa-gene Unfortunetly that's not a supported scenario right now. We're currently working on expanding chef-ingredient in a way that will allow this kind of scenario

@eugeneromero
Copy link
Author

@tas50 good to know! Look forward to seeing this working in the future. Thanks in advance!

@jonattta
Copy link

jonattta commented May 3, 2017

@tas50 @papa-gene +1 really looking forward to have the upgrade process described here https://docs.chef.io/upgrade_server.html#standalone handled by chef-ingredient.

@jonattta
Copy link

@tas50 any news?

@tas50 tas50 added Type: Enhancement Adds new functionality. and removed Type: Feature Request labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Adds new functionality.
Projects
None yet
Development

No branches or pull requests

3 participants