ops_manager_cli 0.7.6 → 0.7.8

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
  SHA1:
3
- metadata.gz: 9ec7bfea49668d843eb2f5519458611f50d9f15b
4
- data.tar.gz: 6c97e25bc6fdbd920211707f7616d93073f3ee87
3
+ metadata.gz: 34376cc125132c7c304f583cb341a316ddde53c6
4
+ data.tar.gz: 3aa65df1ead7aef097e6ba7184b0e8e7debedf04
5
5
  SHA512:
6
- metadata.gz: 2b2c5ad35553858b37bf1589a9370e5b9ec01daa9bf66ee892a1352eb3041b364236ec748edae8d730232a00f538cfaee3b5fd54d8a0069747c97de43ff6a9e6
7
- data.tar.gz: 91f1862c59af627398b69fd6a0cad1ed0cb289bb05c681da67ba2dc3055b5d073ce5858e04b98515410b05eceaf066ad300e20da92c451e7045cd6b2fa2dce8e
6
+ metadata.gz: 310e025728f3261129f5ae57010d411447f40c2df612cfdbf1e8faf4a2a58ce642bff057c8bb4470af05a857985343630b41f6b41eb5159af09986ba07331659
7
+ data.tar.gz: 7e94ebc6b7f5a316cf11fc01a2d64c1cf20fa7e676f636f0caaf4072023ca456e3fb15a618d855859a5f38c8db7c866b44148b3f935845c60fdb0d7158ff0b72
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.7.8]://github.com/compozed/ops_manager_cli/tree/v0.7.8) (2018-06-18)
4
+ [Full Changelog](https://github.com/compozed/ops_manager_cli/compare/v0.7.6...v0.7.8)
5
+
6
+ - `ops_manager` now supports single-product deployments via the `deploy_products` key in the
7
+ Ops Manager API (requires Ops Manager 2.2+). Just add `single_tile_deploy: true` to the deploy
8
+ config file.
9
+
10
+ ## [v0.7.6](https://github.com/compozed/ops_manager_cli/tree/v0.7.6) (2018-06-18)
11
+ [Full Changelog](https://github.com/compozed/ops_manager_cli/compare/v0.7.5...v0.7.6)
12
+
13
+ **Closed issues:**
14
+
15
+ - Upgrading Product Issue - The enabled\_errands parameter is no longer supported [\#35](https://github.com/compozed/ops_manager_cli/issues/35)
16
+ - Ops Manager cannot deploy appliance when there is no Ops Manager appliance deployed [\#31](https://github.com/compozed/ops_manager_cli/issues/31)
17
+ - OpsMAnagerCli should check if there are pending changes in the current installation before performing an opsman upgrade [\#30](https://github.com/compozed/ops_manager_cli/issues/30)
18
+ - director generator does not remove fixed stemcell versions [\#18](https://github.com/compozed/ops_manager_cli/issues/18)
19
+ - Remove ovftools dependency and use rbvmomi instead to deploy appliance [\#14](https://github.com/compozed/ops_manager_cli/issues/14)
20
+
21
+ **Merged pull requests:**
22
+
23
+ - Make it work with ruby other than 2.4 [\#38](https://github.com/compozed/ops_manager_cli/pull/38) ([teancom](https://github.com/teancom))
24
+ - Remove pem values from product templates [\#37](https://github.com/compozed/ops_manager_cli/pull/37) ([suppalapati13](https://github.com/suppalapati13))
25
+
26
+ ## [v0.7.5](https://github.com/compozed/ops_manager_cli/tree/v0.7.5) (2018-01-18)
27
+ [Full Changelog](https://github.com/compozed/ops_manager_cli/compare/v0.7.4...v0.7.5)
28
+
29
+ ## [v0.7.4](https://github.com/compozed/ops_manager_cli/tree/v0.7.4) (2017-11-22)
30
+ [Full Changelog](https://github.com/compozed/ops_manager_cli/compare/v0.7.2...v0.7.4)
31
+
3
32
  ## [v0.7.2](https://github.com/compozed/ops_manager_cli/tree/v0.7.2) (2017-11-03)
4
33
  [Full Changelog](https://github.com/compozed/ops_manager_cli/compare/v0.7.1...v0.7.2)
5
34
 
@@ -99,4 +128,4 @@
99
128
  ## [v0.1.1](https://github.com/compozed/ops_manager_cli/tree/v0.1.1) (2016-05-06)
100
129
 
101
130
 
102
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
131
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
data/Dockerfile CHANGED
@@ -1,32 +1,34 @@
1
1
  FROM ruby:2.4.1
2
2
 
3
3
  ENV GEM_NAME ops_manager_cli
4
- ENV GEM_VERSION 0.7.6
4
+ ENV GEM_VERSION 0.7.8
5
+ ENV SPRUCE_VERSION 1.17.0
6
+ ENV JQ_VERSION 1.5
5
7
  ENV OVFTOOL_VERSION 4.1.0-2459827
6
8
  ENV OVFTOOL_INSTALLER VMware-ovftool-${OVFTOOL_VERSION}-lin.x86_64.bundle
7
9
  ARG DOWNLOAD_URL
8
10
 
9
11
  # ================== Installs sshpass ===============
10
- RUN echo "deb http://httpredir.debian.org/debian jessie utils" >> sources.list
11
- RUN apt-get update
12
- RUN apt-get install -y sshpass unzip
12
+ #RUN echo "deb http://httpredir.debian.org/debian jessie utils" >> sources.list
13
+ RUN apt-get update \
14
+ && apt-get install -y sshpass unzip \
15
+ && rm -rf /var/lib/apt/lists/*
13
16
 
14
17
  # ================== Installs OVF tools ==============
15
- RUN echo $DOWNLOAD_URL
16
- RUN wget -v ${DOWNLOAD_URL} \
17
- && sh ${OVFTOOL_INSTALLER} -p /usr/local --eulas-agreed --required \
18
- && rm -f ${OVFTOOL_INSTALLER}*
18
+ RUN wget -q --no-check-certificate ${DOWNLOAD_URL} \
19
+ && sh ${OVFTOOL_INSTALLER} -p /usr/local --eulas-agreed --required \
20
+ && rm -f ${OVFTOOL_INSTALLER}*
19
21
 
20
22
  # ================== Installs Spruce ==============
21
- RUN wget -v --no-check-certificate https://github.com/geofffranks/spruce/releases/download/v1.13.1/spruce-linux-amd64 \
22
- && chmod +x spruce-linux-amd64 \
23
- && ln -s /spruce-linux-amd64 /usr/bin/spruce
23
+ RUN wget -q -O /usr/local/bin/spruce --no-check-certificate https://github.com/geofffranks/spruce/releases/download/v${SPRUCE_VERSION}/spruce-linux-amd64 \
24
+ && chmod +x /usr/local/bin/spruce
24
25
 
25
26
  # ================== Installs JQ ==============
26
- RUN wget -v -O /usr/local/bin/jq --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
27
- RUN chmod +x /usr/local/bin/jq
27
+ RUN wget -q -O /usr/local/bin/jq --no-check-certificate https://github.com/stedolan/jq/releases/download/jq-${JQ_VERSION}/jq-linux64 \
28
+ && chmod +x /usr/local/bin/jq
28
29
 
29
30
  # ================== Installs ops_manager_cli gem ==============
30
31
  COPY pkg/${GEM_NAME}-${GEM_VERSION}.gem /tmp/
32
+ RUN echo ':ssl_verify_mode: 0' > ~/.gemrc
31
33
  RUN gem install /tmp/${GEM_NAME}-${GEM_VERSION}.gem
32
34
 
data/Rakefile CHANGED
@@ -4,7 +4,9 @@ require 'github_changelog_generator/task'
4
4
 
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
- GitHubChangelogGenerator::RakeTask.new(:changelog)
7
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
8
+ config.max_issues = 50
9
+ end
8
10
 
9
11
  task :default => :spec
10
12
  task :release => :changelog
@@ -38,7 +38,11 @@ class OpsManager::ApplianceDeployment
38
38
  when current_version == desired_version then
39
39
  if pending_changes?
40
40
  puts "OpsManager at #{config[:ip]} version has pending changes. Applying changes...".green
41
- OpsManager::InstallationRunner.trigger!.wait_for_result
41
+ if config[:single_tile_deploy]
42
+ OpsManager::InstallationRunner.trigger!("none").wait_for_result
43
+ else
44
+ OpsManager::InstallationRunner.trigger!.wait_for_result
45
+ end
42
46
  else
43
47
  puts "OpsManager at #{config[:ip]} version is already #{config[:desired_version]}. Skiping ...".green
44
48
  end
@@ -75,7 +79,11 @@ class OpsManager::ApplianceDeployment
75
79
  upload_installation_assets
76
80
  wait_for_uaa
77
81
  provision_stemcells
78
- OpsManager::InstallationRunner.trigger!.wait_for_result
82
+ if config[:single_tile_deploy]
83
+ OpsManager::InstallationRunner.trigger!("none").wait_for_result
84
+ else
85
+ OpsManager::InstallationRunner.trigger!.wait_for_result
86
+ end
79
87
  end
80
88
 
81
89
  def list_current_stemcells
@@ -5,14 +5,14 @@ class OpsManager
5
5
  :get_staged_products, :get_staged_products_errands
6
6
  attr_reader :id
7
7
 
8
- def trigger!
9
- res = trigger_installation( :headers => {"Content-Type"=>"application/json"}, :body => body )
8
+ def trigger!(products = "all")
9
+ res = trigger_installation( :headers => {"Content-Type"=>"application/json"}, :body => body(products))
10
10
  @id = JSON.parse(res.body).fetch('install').fetch('id').to_i
11
11
  self
12
12
  end
13
13
 
14
- def self.trigger!
15
- new.trigger!
14
+ def self.trigger!(products = "all")
15
+ new.trigger!(products)
16
16
  end
17
17
 
18
18
  def wait_for_result
@@ -24,16 +24,28 @@ class OpsManager
24
24
  end
25
25
 
26
26
  private
27
- def body
28
- @body ||= {'errands' => errands, 'ignore_warnings' => true }.to_json
27
+ def body(products)
28
+ b = {'errands' => errands(products), 'ignore_warnings' => true }
29
+ if products != "all"
30
+ b["deploy_products"] = products
31
+ end
32
+ @body ||= b.to_json
29
33
  end
30
34
  def opsman_api
31
35
  @opsman_api ||= OpsManager::Api::Opsman.new
32
36
  end
33
37
 
34
- def errands
38
+ def errands(products)
35
39
  res = { }
36
- staged_products_guids.each do |product_guid|
40
+
41
+ if products == "none"
42
+ return res
43
+ end
44
+
45
+ if products == "all"
46
+ products = staged_products_guids
47
+ end
48
+ products.each do |product_guid|
37
49
  errands = errands_for(product_guid).keep_if { |an_errand| an_errand['post_deploy'] }
38
50
  errands.each { |e| res[product_guid] = {'run_post_deploy' => { e['name'] => true}}}
39
51
  end
@@ -61,7 +61,11 @@ class OpsManager
61
61
  upload
62
62
  upgrade_product_installation(installation.guid, config[:desired_version])
63
63
  merge_product_installation_settings
64
- OpsManager::InstallationRunner.trigger!.wait_for_result
64
+ if config[:single_tile_deploy]
65
+ OpsManager::InstallationRunner.trigger!([installation.guid]).wait_for_result
66
+ else
67
+ OpsManager::InstallationRunner.trigger!.wait_for_result
68
+ end
65
69
 
66
70
  puts "====> Finish!".green
67
71
  end
@@ -77,7 +81,12 @@ class OpsManager
77
81
  upload
78
82
  add_to_installation
79
83
  merge_product_installation_settings
80
- OpsManager::InstallationRunner.trigger!.wait_for_result
84
+ if config[:single_tile_deploy]
85
+ OpsManager::InstallationRunner.trigger!([installation.guid]).wait_for_result
86
+ else
87
+ OpsManager::InstallationRunner.trigger!.wait_for_result
88
+ end
89
+
81
90
 
82
91
  puts "====> Finish!".green
83
92
  end
@@ -1,3 +1,3 @@
1
1
  class OpsManager
2
- VERSION = "0.7.6"
2
+ VERSION = "0.7.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_manager_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - CompoZed
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-18 00:00:00.000000000 Z
11
+ date: 2018-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler