deploy_rubygem 0.60.35 → 0.60.37

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 272f1912c9321b5c99d8f3c69bee52c20ffdf8591e6e49ef82fe39f9d6e63197
4
- data.tar.gz: c3e46c51ea5046e6a86b9b60d3a99d2c34ed577fa8e67349a8a9433f75b4569c
3
+ metadata.gz: 7d7b7ddd45122fc2dd5f7344990aaa13a123e469146f2d1612be29196742e83b
4
+ data.tar.gz: dde2749c7504646d51ba67978dbbe8bc4ea683698f775929fa67038403994f12
5
5
  SHA512:
6
- metadata.gz: 02db2e27ef0d8a059d14a3faa127cf3572c768675d418e65b288887df40c35ac38a0147a26ef7d64c44220b86e63cbb3a7bd83bc43556c6955fabaff9b562bcf
7
- data.tar.gz: 13b46eeabcf1a2d1dc7c9af1f475803ec5a3fd4021e789392b3c59f7f17ce42ca09cb979e496b2a3b67c8c43fa6059cf13590ab64d277209ac818257199df00f
6
+ metadata.gz: c94be7a2c5ee004317e5b508c32cf80d62e9f5b7699a69d3b6c27c89a978751bdb2624018011405f92f6185d00b7c7b446464f1318d63cbe7b1f50cd6ed2c08d
7
+ data.tar.gz: b09c8856baaedab3184c3ff95e6cb6a7a1d220d18c0310e9a18a1f9a3b029b05332f30e27b50d79a40fc3eaa2fdf12c56a9a683cb942dac3aec45c997bc127f9
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,2 @@
1
- ڌ����{v& ���ŦK\ _j%��;��`��kÆ�ɵڙ��8��%#$
2
- =FiŴ��ވ�eN���v����w;>}X��w���c@T:`Au��H~
3
- 3/o � �͝����`�Z��H?�.m��u�9��6�>��K�qq��u39z�#"����$��d�I���U{��I��$y�;��=ڈ�.�bGS$�߰��V�!��2[��Q9V#b�;\C�1,u�2��5;���X
4
- �Џ��;Z��E�����Y[�ufW�b8y�2u��U3�nr�j�gҨT�Q17�Y�xK@��Y-��; �VF�b�6��sY�����H�cB�/r���s�k\{��2擽�ψb׺
1
+ " +�Ihup,3I���("���/�C
2
+ ��rX��r4����0���[ Je���h�]��;�ȴ`/��;#�D�|/=)��Qa�(�J�ʙ?s��{�#&�o �[�]���o��q��U�/���[�߇4b��P�@*��;Z��
data/exe/deploy_rubygem CHANGED
@@ -1,3 +1,12 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'deploy_rubygem'
4
+
5
+ case ARGV[0]
6
+ when 'install'
7
+ DeployRubygem.deployer.install_chef_workstation
8
+ when 'bootstrap_chef_workstation'
9
+ DeployRubygem.deployer.bootstrap_chef_workstation(ARGV[0])
10
+ else
11
+ puts DeployRubygem.deployer.no_option_txt
12
+ end
@@ -6,7 +6,7 @@ require 'fileutils'
6
6
  # Containing a class
7
7
  module DeployRubygem
8
8
  # Using Project to deploy and manage Project
9
- class ChefNode
9
+ class ChefAdmin
10
10
  attr_reader :chef_server_url, :nodename, :policyname, :policygroup, :knife_name, :chef_client_key
11
11
 
12
12
  def initialize(options)
@@ -8,6 +8,7 @@ require_relative 'workstation'
8
8
  module DeployRubygem
9
9
  # Using Project to deploy and manage Project
10
10
  class Project
11
+ include DeployRubygem
11
12
  include RSpecTesting
12
13
 
13
14
  attr_reader :project_options, :cookbooks, :compliance_profile
@@ -31,7 +31,7 @@ module DeployRubygem
31
31
  default
32
32
  cycle
33
33
  test_version
34
- test_check_local
34
+ check_local
35
35
  compliance
36
36
  develop
37
37
  push
@@ -57,7 +57,7 @@ module DeployRubygem
57
57
  task test_version: %i[install compliance]
58
58
  end
59
59
 
60
- def test_check_local # :nodoc:
60
+ def check_local # :nodoc:
61
61
  desc "@desc with #{__method__}"
62
62
  task check_local: %i[rubocop spec]
63
63
  end
@@ -3,5 +3,5 @@
3
3
  # Set version for DeployRubygem
4
4
  module DeployRubygem
5
5
  # VERSION = new_deploy_rubygem.gvb_version.short_version
6
- VERSION = '0.60.35'
6
+ VERSION = '0.60.37'
7
7
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'fileutils'
4
- require_relative 'chef_node'
4
+ require_relative 'chef_admin'
5
5
 
6
6
  # DeployRubygem - deploy a gem using rake
7
7
  # Containing a class
@@ -1,10 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'json'
4
+
3
5
  require_relative 'deploy_rubygem/version'
4
6
  require_relative 'deploy_rubygem/rubygem'
5
7
 
6
8
  # DeployRubygem module helper for rubygem
7
9
  module DeployRubygem
10
+ def no_option_txt
11
+ 'Use "deploy_rubygem install" to install Chef dependencies'
12
+ end
13
+
8
14
  def rubygem_test
9
15
  DeployRubygem.deployer
10
16
  end
@@ -39,4 +45,34 @@ module DeployRubygem
39
45
  }
40
46
  @deployer ||= DeployRubygem::Project.new(project_options)
41
47
  end
48
+
49
+ def install_chef_workstation
50
+ workstation_options = {
51
+ user_folder: '/root',
52
+ node_name: ENV.fetch('NODENAME'),
53
+ knife_name: ENV.fetch('KNIFE_NAME'),
54
+ policyname: ENV.fetch('POLICYNAME'),
55
+ policygroup: ENV.fetch('POLICYGROUP'),
56
+ chef_server_url: ENV.fetch('CHEF_SERVER_URL'),
57
+ chef_client_key: ENV.fetch('CHEF_CLIENT_KEY'),
58
+ chef_knife_key: ENV.fetch('CHEF_KNIFE_KEY')
59
+ }
60
+
61
+ File.write('node_options', JSON.generate(workstation_options))
62
+ system('sudo deploy_rubygem bootstrap node_options')
63
+
64
+ workstation_options[:user_folder] = Dir.home
65
+ File.write('workstation_options', JSON.generate(workstation_options))
66
+ system('deploy_rubygem bootstrap workstation_options')
67
+ end
68
+
69
+ def bootstrap_chef_workstation(option_file)
70
+ workstation_options = JSON.parse(File.read(option_file))
71
+
72
+ if workstation_options['user_folder'] == '/root'
73
+ DeployRubygem::ChefAdmin.new(workstation_options).boostrap
74
+ else
75
+ DeployRubygem::Workstation.new(workstation_options).boostrap_workstation
76
+ end
77
+ end
42
78
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deploy_rubygem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.35
4
+ version: 0.60.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -33,50 +33,50 @@ cert_chain:
33
33
  n6Pwa3EckU/5n8N6gUJTAmGyu6Ncu1pbsZtH450+BJ2z82JNXomdFYlnG8+1XNlj
34
34
  3M1sBFUHvqrBg2hQkQcLHokmQYrYsRK5A7HrxwKcmwM=
35
35
  -----END CERTIFICATE-----
36
- date: 2024-06-16 00:00:00.000000000 Z
36
+ date: 2024-06-17 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rspec
40
40
  requirement: !ruby/object:Gem::Requirement
41
41
  requirements:
42
- - - "~>"
42
+ - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: 3.11.0
44
+ version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - "~>"
49
+ - - ">="
50
50
  - !ruby/object:Gem::Version
51
- version: 3.11.0
51
+ version: '0'
52
52
  - !ruby/object:Gem::Dependency
53
53
  name: rspec-core
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - "~>"
56
+ - - ">="
57
57
  - !ruby/object:Gem::Version
58
- version: 3.11.0
58
+ version: '0'
59
59
  type: :runtime
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
- - - "~>"
63
+ - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 3.11.0
65
+ version: '0'
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: rspec-support
68
68
  requirement: !ruby/object:Gem::Requirement
69
69
  requirements:
70
- - - "~>"
70
+ - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 3.11.0
72
+ version: '0'
73
73
  type: :runtime
74
74
  prerelease: false
75
75
  version_requirements: !ruby/object:Gem::Requirement
76
76
  requirements:
77
- - - "~>"
77
+ - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 3.11.0
79
+ version: '0'
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rubocop-rake
82
82
  requirement: !ruby/object:Gem::Requirement
@@ -110,11 +110,7 @@ description: Using Chef cookbook style and force any script using it to switch t
110
110
  email:
111
111
  - jimbo_dragon@hotmail.com
112
112
  executables:
113
- - install_chef_workstation
114
- - bootstrap_chef_workstation
115
- - install_local
116
- - install_chef_and_bundle
117
- - init_deploy
113
+ - deploy_rubygem
118
114
  extensions: []
119
115
  extra_rdoc_files:
120
116
  - README.md
@@ -129,14 +125,9 @@ files:
129
125
  - LICENSE.txt
130
126
  - README.md
131
127
  - Rakefile
132
- - exe/bootstrap_chef_workstation
133
128
  - exe/deploy_rubygem
134
- - exe/init_deploy
135
- - exe/install_chef_and_bundle
136
- - exe/install_chef_workstation
137
- - exe/install_local
138
129
  - lib/deploy_rubygem.rb
139
- - lib/deploy_rubygem/chef_node.rb
130
+ - lib/deploy_rubygem/chef_admin.rb
140
131
  - lib/deploy_rubygem/cookbook.rb
141
132
  - lib/deploy_rubygem/inspec_result.rb
142
133
  - lib/deploy_rubygem/inspectestor.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,13 +0,0 @@
1
- #!/opt/chef-workstation/embedded/bin/ruby
2
- # Signal.trap('INT') { exit 1 }
3
-
4
- require 'rubygems' unless defined?(Gem)
5
- require 'deploy_rubygem'
6
-
7
- workstation_options = JSON.parse(File.read(ARGV[0]))
8
-
9
- if workstation_options['user_folder'] == '/root'
10
- DeployRubygem::ChefNode.new(workstation_options).boostrap
11
- else
12
- DeployRubygem::Workstation.new(workstation_options).boostrap_workstation
13
- end
data/exe/init_deploy DELETED
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- install_local
7
- install_chef_and_bundle
8
-
9
- install_chef_workstation
10
- # Do any other automated setup that you need to do here
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bash install.sh -P chef-workstation
7
- bundle install
8
- rake install:local
9
- # Do any other automated setup that you need to do here
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'json'
4
-
5
- workstation_options = {
6
- user_folder: '/root',
7
- node_name: ENV.fetch('NODENAME'),
8
- knife_name: ENV.fetch('KNIFE_NAME'),
9
- policyname: ENV.fetch('POLICYNAME'),
10
- policygroup: ENV.fetch('POLICYGROUP'),
11
- chef_server_url: ENV.fetch('CHEF_SERVER_URL'),
12
- chef_client_key: ENV.fetch('CHEF_CLIENT_KEY'),
13
- chef_knife_key: ENV.fetch('CHEF_KNIFE_KEY')
14
- }
15
-
16
- File.write('node_options', JSON.generate(workstation_options))
17
- system('sudo bootstrap_chef_workstation node_options')
18
-
19
- workstation_options[:user_folder] = Dir.home
20
- File.write('workstation_options', JSON.generate(workstation_options))
21
- system('bootstrap_chef_workstation workstation_options')
data/exe/install_local DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
- rake build
8
- rake install:local
9
- curl -L https://omnitruck.chef.io/install.sh > install.sh