deploy_rubygem 0.60.35 → 0.60.36

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: 1e8d1c027afad887f44cbb329a277a5fd2c95c9e867b467d5d013bc97e94e0d9
4
+ data.tar.gz: ba09c15aa65aeb5fa5af7395854ddf584b668ec723aca3de35b34f3b3d866c3b
5
5
  SHA512:
6
- metadata.gz: 02db2e27ef0d8a059d14a3faa127cf3572c768675d418e65b288887df40c35ac38a0147a26ef7d64c44220b86e63cbb3a7bd83bc43556c6955fabaff9b562bcf
7
- data.tar.gz: 13b46eeabcf1a2d1dc7c9af1f475803ec5a3fd4021e789392b3c59f7f17ce42ca09cb979e496b2a3b67c8c43fa6059cf13590ab64d277209ac818257199df00f
6
+ metadata.gz: 7671a35cdefcc5e5efa5b35cb8ac0ee3e0e98795418dfee7d6a6d4de72ac4c773dc01a080636a93575fce5ae3be877807ef574091142c9ed36c894c9434e7c7e
7
+ data.tar.gz: 8a47f864e8ff1f4999d41a5ec0084c0315011d5446dca7ee0a08c8ba81e8135c908a1b6cb8a6c2eb19e32ab721f0e06c5b8b1402f02f651a309c1f87269a94ea
checksums.yaml.gz.sig CHANGED
@@ -1,4 +1,4 @@
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�>��Kqq��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
+ ,%���s�z�;��r���z��*��/6ԉ�P�+"'�+�P�������M��G��c��G����o JO}^��4$t ��y�۩[$P
2
+ p� ^}�tEZ�Y{�lf��<�0�dq�'e�z��� ቶ�t8��)SJ^,�Z��E�V����#rم��^
3
+ ����a���&�_���!�# c���u�1�?c����� g���EYb��'�O����>}�����H @�tD�d�c��ԲU����
4
+ ׸���v�����G����h������{\�!����]��Z�����Wq�.vr��~��E���� �j�I9z
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)
@@ -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.36'
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::ChefNode.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.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Provencher
@@ -33,88 +33,14 @@ 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
37
- dependencies:
38
- - !ruby/object:Gem::Dependency
39
- name: rspec
40
- requirement: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - "~>"
43
- - !ruby/object:Gem::Version
44
- version: 3.11.0
45
- type: :runtime
46
- prerelease: false
47
- version_requirements: !ruby/object:Gem::Requirement
48
- requirements:
49
- - - "~>"
50
- - !ruby/object:Gem::Version
51
- version: 3.11.0
52
- - !ruby/object:Gem::Dependency
53
- name: rspec-core
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "~>"
57
- - !ruby/object:Gem::Version
58
- version: 3.11.0
59
- type: :runtime
60
- prerelease: false
61
- version_requirements: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - "~>"
64
- - !ruby/object:Gem::Version
65
- version: 3.11.0
66
- - !ruby/object:Gem::Dependency
67
- name: rspec-support
68
- requirement: !ruby/object:Gem::Requirement
69
- requirements:
70
- - - "~>"
71
- - !ruby/object:Gem::Version
72
- version: 3.11.0
73
- type: :runtime
74
- prerelease: false
75
- version_requirements: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - "~>"
78
- - !ruby/object:Gem::Version
79
- version: 3.11.0
80
- - !ruby/object:Gem::Dependency
81
- name: rubocop-rake
82
- requirement: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- type: :runtime
88
- prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: rubocop-rspec
96
- requirement: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: '0'
101
- type: :runtime
102
- prerelease: false
103
- version_requirements: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: '0'
36
+ date: 2024-06-17 00:00:00.000000000 Z
37
+ dependencies: []
108
38
  description: Using Chef cookbook style and force any script using it to switch to
109
39
  chef even if it is not install. It will install it tho ;)
110
40
  email:
111
41
  - jimbo_dragon@hotmail.com
112
42
  executables:
113
- - install_chef_workstation
114
- - bootstrap_chef_workstation
115
- - install_local
116
- - install_chef_and_bundle
117
- - init_deploy
43
+ - deploy_rubygem
118
44
  extensions: []
119
45
  extra_rdoc_files:
120
46
  - README.md
@@ -129,14 +55,9 @@ files:
129
55
  - LICENSE.txt
130
56
  - README.md
131
57
  - Rakefile
132
- - exe/bootstrap_chef_workstation
133
58
  - exe/deploy_rubygem
134
- - exe/init_deploy
135
- - exe/install_chef_and_bundle
136
- - exe/install_chef_workstation
137
- - exe/install_local
138
59
  - lib/deploy_rubygem.rb
139
- - lib/deploy_rubygem/chef_node.rb
60
+ - lib/deploy_rubygem/chef_admin.rb
140
61
  - lib/deploy_rubygem/cookbook.rb
141
62
  - lib/deploy_rubygem/inspec_result.rb
142
63
  - 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