ops_manager_cli 0.7.6 → 0.7.8
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 +4 -4
- data/CHANGELOG.md +30 -1
- data/Dockerfile +15 -13
- data/Rakefile +3 -1
- data/lib/ops_manager/appliance_deployment.rb +10 -2
- data/lib/ops_manager/installation_runner.rb +20 -8
- data/lib/ops_manager/product_deployment.rb +11 -2
- data/lib/ops_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 34376cc125132c7c304f583cb341a316ddde53c6
|
|
4
|
+
data.tar.gz: 3aa65df1ead7aef097e6ba7184b0e8e7debedf04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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
|
-
|
|
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
|
|
16
|
-
|
|
17
|
-
|
|
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 -
|
|
22
|
-
|
|
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 -
|
|
27
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
data/lib/ops_manager/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|