sambot 0.1.94 → 0.1.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6e11c44dab3910bbc5bb69d5cc9b2e54f9d5eb8
4
- data.tar.gz: 33bb51b191685ad6bcac94fe16c84ffaa4ba03b8
3
+ metadata.gz: 98fb16c2ae75f97227ec2853cdd7226b7adb04c3
4
+ data.tar.gz: 43264443d106d2e042051418d6da019af346d8bf
5
5
  SHA512:
6
- metadata.gz: 73ce805f93debb791cb76ed4e9c7dae7f7fa4071695bc4b75f3a00ee6d97752c2a240c3482a954551fdb7300b19aa36774a20b8ecacd812e3c94a979f8a2f8be
7
- data.tar.gz: 69a7beda710d2e1fc7009a3c983fc82c26b59b16c5b31506e017672c8f70b7e2937a26c22d49a011480023009886fbf1b39989d4e14b2e9786dba741f1db1b99
6
+ metadata.gz: a7637e3004a7d6894747064802c12ff4ececbaac444b9f66cf51a4431a8204472334e9c3031d5558ba10d20af0054813b40ab4b0389a82233a10a0eb2860d3ea
7
+ data.tar.gz: 9bc4b4e8d4f144e2f7975a273dfe8f38fdbf4175243f7655359321df97e9e57c8122c401cccd5376a6f8bf09116f701a5b0d70a5e8ba948d2762a53d7d5af36f
@@ -18,6 +18,7 @@ module Sambot
18
18
  UI.info('Removing all generated files from this cookbook.')
19
19
  delete_file('metadata.rb')
20
20
  delete_file('winrm_config')
21
+ delete_file('Berksfile.lock')
21
22
  delete_file('packer.json')
22
23
  generated_files.each { |file| delete_file(file) }
23
24
  Dir.glob('\.kitchen*\.yml').each do |file|
data/lib/sambot/cli.rb CHANGED
@@ -31,9 +31,6 @@ module Sambot
31
31
  desc 'session', 'Manage sessions'
32
32
  subcommand 'session', Sambot::Commands::Session
33
33
 
34
- desc 'packer', 'Manage Hashicorp Packer'
35
- subcommand 'packer', Sambot::Commands::Packer
36
-
37
34
  desc 'workstation', 'Manage engineer workstations'
38
35
  subcommand 'workstation', Sambot::Commands::Workstation
39
36
 
@@ -75,7 +75,7 @@ module Sambot
75
75
  long_desc GUIDE[:version][:LONG_DESC]
76
76
  def version()
77
77
  Runtime.ensure_latest
78
- result = Config.read
78
+ result = Config.new.read
79
79
  puts "##teamcity[buildNumber '#{result['version'].to_s}']"
80
80
  rescue ApplicationError => e
81
81
  error(e.message)
@@ -9,6 +9,14 @@ module Sambot
9
9
  update_environment_variables()
10
10
  UI.debug("Updating your hosts file.")
11
11
  DNS.update_hosts()
12
+ system('brew cask install virtualbox')
13
+ system('brew cask install vagrant')
14
+ system('brew cask install vagrant-manager')
15
+ system('brew install git')
16
+ system('xcode-select --install')
17
+ system('brew update')
18
+ system('brew install golang')
19
+ system('brew cask install chefdk')
12
20
  UI.info("Your workstation is now ready for use. Please close this shell and open up a new one to start making use of your new environment.")
13
21
  end
14
22
 
@@ -14,7 +14,12 @@ platforms:
14
14
  - name: "centos-7.2"
15
15
  <% end %>
16
16
  <% if @platforms.include?('windows') %>
17
- - name: "windows"
17
+ - name: windows-2012R2
18
+ driver_config:
19
+ box: mwrock/Windows2012R2
20
+ transport:
21
+ name: winrm
22
+ elevated: true
18
23
  <% end %>
19
24
 
20
25
  verifier:
@@ -1,3 +1,3 @@
1
1
  module Sambot
2
- VERSION = '0.1.94'.freeze
2
+ VERSION = '0.1.95'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sambot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.94
4
+ version: 0.1.95
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Kouame
@@ -292,7 +292,6 @@ files:
292
292
  - lib/sambot/chef/metadata.rb
293
293
  - lib/sambot/cli.rb
294
294
  - lib/sambot/commands/cookbook.rb
295
- - lib/sambot/commands/packer.rb
296
295
  - lib/sambot/commands/report.rb
297
296
  - lib/sambot/commands/session.rb
298
297
  - lib/sambot/commands/workstation.rb
@@ -304,7 +303,6 @@ files:
304
303
  - lib/sambot/developer_workflow/workstation.rb
305
304
  - lib/sambot/file_management/file_checker.rb
306
305
  - lib/sambot/file_management/template_provider.rb
307
- - lib/sambot/image_pipeline/packer.rb
308
306
  - lib/sambot/reports/consistency_report.rb
309
307
  - lib/sambot/runtime.rb
310
308
  - lib/sambot/ssh/config_file.rb
@@ -318,8 +316,6 @@ files:
318
316
  - lib/sambot/templates/Berksfile
319
317
  - lib/sambot/templates/chefignore
320
318
  - lib/sambot/templates/metadata.rb.erb
321
- - lib/sambot/templates/packer.linux.json
322
- - lib/sambot/templates/packer.windows.json
323
319
  - lib/sambot/templates/pre-push
324
320
  - lib/sambot/templates/startup-script.ps1
325
321
  - lib/sambot/templates/teamcity.sh.erb
@@ -1,19 +0,0 @@
1
- module Sambot
2
- module Commands
3
-
4
- class Packer < Thor
5
-
6
- namespace 'packer'
7
-
8
- desc "prepare", "Sets up a Packer configuration"
9
- def prepare
10
- Runtime.ensure_latest
11
- config = Config.new.read
12
- ImagePipeline::Packer.prepare(config)
13
- rescue ApplicationError => e
14
- error(e.message)
15
- end
16
-
17
- end
18
- end
19
- end
@@ -1,27 +0,0 @@
1
- require 'yaml'
2
-
3
- module Sambot
4
- module ImagePipeline
5
- class Packer
6
-
7
- TemplateProvider = FileManagement::TemplateProvider
8
-
9
- def self.prepare(config)
10
- cookbook_name = config['name']
11
- target_platform = ENV['TARGET_IMAGE_PLATFORM']
12
- raise ApplicationError.new("No target image platform provided i.e. TARGET_IMAGE_PLATFORM environment variable.") unless target_platform
13
- is_valid_platform = target_platform == 'windows' || target_platform == 'linux'
14
- raise ApplicationError.new("The target image platform must be either 'windows' or 'linux'.") unless is_valid_platform
15
- generate_config(cookbook_name, target_platform)
16
- end
17
-
18
- def self.generate_config(cookbook_name, target_platform)
19
- filename = TemplateProvider.get_path("packer.#{target_platform}.json")
20
- contents = File.read(filename).gsub(/@@cookbook_name@@/, cookbook_name)
21
- File.write("packer.json", contents)
22
- UI.debug("The configuration file for Packer has been added.")
23
- end
24
-
25
- end
26
- end
27
- end
@@ -1,22 +0,0 @@
1
- {
2
- "variables": {
3
- "as_project_id": "{{env `GCP_PROJECT`}}",
4
- "as_source_image_family": "{{env `GCP_CENTOS_IMAGE_FAMILY`}}",
5
- "as_zone": "{{env `GCP_REGION`}}",
6
- "as_cookbook_name": "{{env `COOKBOOK_NAME`}}",
7
- "as_account_file": "{{env `GOOGLE_APPLICATION_CREDENTIALS`}}",
8
- "as_source_image_project_id": "{{env `GCP_CENTOS_IMAGE_PROJECT`}}",
9
- },
10
- "builders": [
11
- {
12
- "type": "googlecompute",
13
- "account_file": "{{user `as_account_file`}}",
14
- "image_family": "{{user `as_cookbook_name`}}",
15
- "image_name": "{{env `COOKBOOK_NAME`}}-@@cookbook_name@@",
16
- "project_id": "{{user `as_project_id`}}",
17
- "source_image_family": "{{user `as_source_image_family`}}",
18
- "source_image_project_id": "{{user `as_source_image_project_id`}}",
19
- "zone": "{{user `as_zone`}}"
20
- }
21
- ]
22
- }
@@ -1,18 +0,0 @@
1
- {
2
- "builders": [{
3
- "type": "googlecompute",
4
- "account_file": "account.json",
5
- "project_id": "my project",
6
- "source_image": "windows-server-2016-dc-v20170227",
7
- "disk_size": "50",
8
- "machine_type": "n1-standard-1",
9
- "communicator": "winrm",
10
- "winrm_username": "packer_user",
11
- "winrm_insecure": true,
12
- "winrm_use_ssl": true,
13
- "metadata": {
14
- "windows-startup-script-cmd": "winrm quickconfig -quiet & net user /add packer_user & net localgroup administrators packer_user /add & winrm set winrm/config/service/auth @{Basic=\"true\"}"
15
- },
16
- "zone": "us-central1-a"
17
- }]
18
- }