canzea 0.1.55 → 0.1.56
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/lib/canzea/version.rb +1 -1
- data/lib/canzea.rb +7 -0
- data/lib/commands/prepare-plan.rb +33 -0
- data/lib/commands/remote-bootstrap.rb +0 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4552872d9584dc1d8455e4907a0b02145a5c207
|
4
|
+
data.tar.gz: 6f0790140e14aaeeebf7cb3b0da898ab861b7493
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f50fd3d5e353eb8b5f60fe7261560e584839e95f9ebfa72228efd63ec21f0f7aa7a8d9c2d9915775d3084cdecdc9bc4c7d7c7f8bd9644b2abeb6f53e0036613e
|
7
|
+
data.tar.gz: 60ddae33921b4d0dc3bd56ee1709b3fbe3cae6a1c085e5bf47dce0c881345fe6fe2d2de96c81a5bab0ad0ce742a99df39f8d8175126f2d21fc8cd5e203294971
|
data/lib/canzea/version.rb
CHANGED
data/lib/canzea.rb
CHANGED
@@ -17,6 +17,7 @@ require "commands/gen-user"
|
|
17
17
|
require "commands/update-config"
|
18
18
|
require "commands/apply-config"
|
19
19
|
require "commands/add-env"
|
20
|
+
require "commands/prepare-plan"
|
20
21
|
|
21
22
|
module Canzea
|
22
23
|
command = Cri::Command.define do
|
@@ -57,6 +58,8 @@ module Canzea
|
|
57
58
|
option nil, :solution, 'Solution', argument: :required
|
58
59
|
option nil, :task, 'Task', argument: :required
|
59
60
|
option nil, :step, 'Step', argument: :required
|
61
|
+
option nil, :blueprint, 'Blueprint', argument: :required
|
62
|
+
option nil, :segment, 'Segment', argument: :required
|
60
63
|
option nil, :status, 'Result will be put into the status message', argument: :required
|
61
64
|
option nil, :serverBase, 'Server Base', argument: :required
|
62
65
|
option nil, :serverNumber, 'Server Number', argument: :required
|
@@ -110,6 +113,10 @@ module Canzea
|
|
110
113
|
r = Registry.new
|
111
114
|
puts r.getKeyValue (args[0])
|
112
115
|
end
|
116
|
+
if (util == "prepare-plan")
|
117
|
+
ac = PreparePlan.new
|
118
|
+
ac.do opts[:blueprint], opts[:segment]
|
119
|
+
end
|
113
120
|
if (util == "apply-config")
|
114
121
|
gitRoot = opts.fetch(:gitRoot, Canzea::config[:git_repo])
|
115
122
|
ac = ApplyConfig.new
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'commands/add-env'
|
3
|
+
require 'plan-step-class'
|
4
|
+
require 'yaml'
|
5
|
+
require 'canzea/config'
|
6
|
+
|
7
|
+
class PreparePlan
|
8
|
+
def initialize ()
|
9
|
+
@basePath = "#{Pathname.new(Canzea::config[:catalog_location]).realpath}/catalog"
|
10
|
+
end
|
11
|
+
|
12
|
+
# Read the blueprint instructions and prepare plan for a particular segment
|
13
|
+
def do (blueprint, segment)
|
14
|
+
planStep = PlanStep.new
|
15
|
+
|
16
|
+
puts "Processing configure.json for #{segment} in #{blueprint}"
|
17
|
+
|
18
|
+
instructions = YAML.load_file("#{@basePath}/blueprints/#{blueprint}/instruction.yml")
|
19
|
+
segment = instructions['instructions']['segments'][segment]
|
20
|
+
|
21
|
+
puts segment['abbreviation']
|
22
|
+
|
23
|
+
segment['image'].each { |item|
|
24
|
+
if item.start_with?("step:")
|
25
|
+
puts item
|
26
|
+
parts = item.split(':')
|
27
|
+
|
28
|
+
planStep.runPhaseInstall parts[1], parts[2], true, 1
|
29
|
+
end
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canzea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Canzea Technologies
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- lib/commands/config-git-commit.rb
|
171
171
|
- lib/commands/gen-user.rb
|
172
172
|
- lib/commands/get-catalog.rb
|
173
|
+
- lib/commands/prepare-plan.rb
|
173
174
|
- lib/commands/remote-bootstrap.rb
|
174
175
|
- lib/commands/remote-run.rb
|
175
176
|
- lib/commands/update-config.rb
|