Skip to content

Commit

Permalink
Fixed windows sup restarting
Browse files Browse the repository at this point in the history
Made windows install respect version
  • Loading branch information
W. Duncan Fraser committed Oct 28, 2021
1 parent b67aa6a commit 95f273d
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 111 deletions.
20 changes: 4 additions & 16 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,10 @@

This file is used to list changes made in each version of the habitat cookbook.

## Unreleased

<!-- latest_release unreleased -->
## Unreleased

#### Merged Pull Requests
- pipeline testing updates [#259](https://github.com/chef-cookbooks/habitat/pull/259) ([collinmcneese](https://github.com/collinmcneese))
- Cookstyle Bot Auto Corrections with Cookstyle 7.5.2 [#257](https://github.com/chef-cookbooks/habitat/pull/257) ([cookstyle[bot]](https://github.com/cookstyle[bot]))
<!-- latest_release -->

## [2.2.4](https://github.com/chef-cookbooks/habitat/tree/2.2.4) (2020-11-19)

#### Merged Pull Requests
- Changelog [#255](https://github.com/chef-cookbooks/habitat/pull/255) ([sam1el](https://github.com/sam1el))

## 2.2.5 (2021-10-27)

- Fixed windows supervisor restarting on every chef run
- Made windows install respect version

## 2.2.4 (2020-11-19)

Expand Down Expand Up @@ -596,4 +584,4 @@ This cookbook was updated to be compatible with the changes made in Habitat 0.26

## v0.0.3 (2016-07-14)

- Initial release, includes `hab_package` and `hab_install` resources
- Initial release, includes `hab_package` and `hab_install` resources
117 changes: 59 additions & 58 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ driver:
name: dokken
privileged: true # because Docker and SystemD/Upstart
chef_license: accept-no-persist
chef_version: 16

transport:
name: dokken
Expand All @@ -15,80 +16,80 @@ verifier:
name: inspec

platforms:
- name: amazonlinux
driver:
image: dokken/amazonlinux
pid_one_command: /sbin/init
# - name: amazonlinux
# driver:
# image: dokken/amazonlinux
# pid_one_command: /sbin/init

- name: amazonlinux-2
driver:
image: dokken/amazonlinux-2
pid_one_command: /usr/lib/systemd/systemd
# - name: amazonlinux-2
# driver:
# image: dokken/amazonlinux-2
# pid_one_command: /usr/lib/systemd/systemd

- name: debian-8
driver:
image: dokken/debian-8
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
# - name: debian-8
# driver:
# image: dokken/debian-8
# pid_one_command: /bin/systemd
# intermediate_instructions:
# - RUN /usr/bin/apt-get update

- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
# - name: debian-9
# driver:
# image: dokken/debian-9
# pid_one_command: /bin/systemd
# intermediate_instructions:
# - RUN /usr/bin/apt-get update

- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
# - name: debian-10
# driver:
# image: dokken/debian-10
# pid_one_command: /bin/systemd
# intermediate_instructions:
# - RUN /usr/bin/apt-get update

- name: centos-6
driver:
image: dokken/centos-6
pid_one_command: /sbin/init
chef_version: 16.7 # patch for chef/chef:latest not working with el6
# - name: centos-6
# driver:
# image: dokken/centos-6
# pid_one_command: /sbin/init
# chef_version: 16.7 # patch for chef/chef:latest not working with el6

- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd

- name: centos-8
driver:
image: dokken/centos-8
pid_one_command: /usr/lib/systemd/systemd
# - name: centos-8
# driver:
# image: dokken/centos-8
# pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-6
driver:
image: dokken/oraclelinux-6
pid_one_command: /sbin/init
chef_version: 16.7 # patch for chef/chef:latest not working with el6
# - name: oraclelinux-6
# driver:
# image: dokken/oraclelinux-6
# pid_one_command: /sbin/init
# chef_version: 16.7 # patch for chef/chef:latest not working with el6

- name: oraclelinux-7
driver:
image: dokken/oraclelinux-7
pid_one_command: /usr/lib/systemd/systemd
# - name: oraclelinux-7
# driver:
# image: dokken/oraclelinux-7
# pid_one_command: /usr/lib/systemd/systemd

# - name: oraclelinux-8
# driver:
# image: dokken/oraclelinux-8
# pid_one_command: /usr/lib/systemd/systemd

- name: fedora-latest
driver:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd
# - name: fedora-latest
# driver:
# image: dokken/fedora-latest
# pid_one_command: /usr/lib/systemd/systemd

- name: ubuntu-16.04
driver:
image: dokken/ubuntu-16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
# - name: ubuntu-16.04
# driver:
# image: dokken/ubuntu-16.04
# pid_one_command: /bin/systemd
# intermediate_instructions:
# - RUN /usr/bin/apt-get update

- name: ubuntu-18.04
driver:
Expand All @@ -97,7 +98,7 @@ platforms:
intermediate_instructions:
- RUN /usr/bin/apt-get update

- name: opensuse-leap-15
driver:
image: dokken/opensuse-leap-15
pid_one_command: /bin/systemd
# - name: opensuse-leap-15
# driver:
# image: dokken/opensuse-leap-15
# pid_one_command: /bin/systemd
68 changes: 35 additions & 33 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,34 @@ provisioner:
always_update_cookbooks: true
deprecations_as_errors: true
chef_license: accept-no-persist
product_name: chef
product_version: 16

verifier:
name: inspec

platforms:
- name: amazonlinux
driver_config:
box: mvbcoding/awslinux
- name: amazonlinux-2
- name: centos-6
# - name: amazonlinux
# driver_config:
# box: mvbcoding/awslinux
# - name: amazonlinux-2
# - name: centos-6
- name: centos-7
driver:
box: bento/centos-7
- name: centos-8
- name: debian-9
- name: debian-10
- name: fedora-latest
- name: opensuse-leap-15
- name: ubuntu-16.04
# driver:
# box: bento/centos-7
# - name: centos-8
# - name: debian-9
# - name: debian-10
# - name: fedora-latest
# - name: opensuse-leap-15
# - name: ubuntu-16.04
- name: ubuntu-18.04
- name: windows-2016
driver:
box: tas50/windows_2016
- name: windows-2019
driver:
box: tas50/windows_2019
# driver:
# box: tas50/windows_2016
# - name: windows-2019
# driver:
# box: tas50/windows_2019

suites:
# Testing Linux stuff here:
Expand All @@ -46,28 +48,28 @@ suites:
- test/integration/package
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: service
named_run_list: service
verifier:
inspec_tests:
- test/integration/service
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: sup
named_run_list: sup
verifier:
inspec_tests:
- test/integration/sup
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: sup-toml-config
named_run_list: sup_toml_config
excludes:
- windows-2016
- windows-2019
# - windows-2019
verifier:
inspec_tests:
- path: test/integration/sup_toml_config/default_spec.rb
Expand All @@ -78,39 +80,39 @@ suites:
- test/integration/install_no_user
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: install_for_chefspec
named_run_list: install_for_chefspec
verifier:
inspec_tests:
- test/integration/install_for_chefspec
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: config
named_run_list: config
verifier:
inspec_tests:
- test/integration/config
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: user-toml
named_run_list: user_toml
verifier:
inspec_tests:
- test/integration/user_toml
excludes:
- windows-2016
- windows-2019
# - windows-2019
- name: config-chef-13
named_run_list: config
verifier:
inspec_tests:
- test/integration/config
excludes:
- windows-2016
- windows-2019
# - windows-2019
provisioner:
product_name: chef
product_version: 13.6.4
Expand All @@ -123,44 +125,44 @@ suites:
- test/integration/win_package
includes:
- windows-2016
- windows-2019
# - windows-2019
- name: win-service
named_run_list: win_service
verifier:
inspec_tests:
- test/integration/win_service
includes:
- windows-2016
- windows-2019
# - windows-2019
- name: win-sup
named_run_list: win_sup
verifier:
inspec_tests:
- test/integration/win_sup
includes:
- windows-2016
- windows-2019
# - windows-2019
- name: win-sup-toml-config
named_run_list: win_sup_toml_config
verifier:
inspec_tests:
- test/integration/win_sup_toml_config
includes:
- windows-2016
- windows-2019
# - windows-2019
- name: win-config
named_run_list: win_config
verifier:
inspec_tests:
- test/integration/win_config
includes:
- windows-2016
- windows-2019
# - windows-2019
- name: win-user-toml
named_run_list: win_user_toml
verifier:
inspec_tests:
- test/integration/win_user_toml
includes:
- windows-2016
- windows-2019
# - windows-2019
2 changes: 1 addition & 1 deletion libraries/resource_hab_sup_windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class HabSupWindows < HabSup
auth_token: new_resource.auth_token,
gateway_auth_token: new_resource.gateway_auth_token
# win_launcher: win_version
action :touch
action :create
end

service 'Habitat' do
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
source_url 'https://github.com/chef-cookbooks/habitat'
issues_url 'https://github.com/chef-cookbooks/habitat/issues'
chef_version '>= 12.20.3'
version '2.2.4'
version '2.2.5'

%w(ubuntu debian redhat centos suse scientific oracle amazon opensuse opensuseleap windows).each do |os|
supports os
Expand Down
Loading

0 comments on commit 95f273d

Please sign in to comment.