appfront 1.1.8 → 1.1.9

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: cfdcf55e6a2668a562b0bf1d29894f4013b9908c
4
- data.tar.gz: 283bc6f6ab8d5e8ea87187899ca93ac78bb4e377
3
+ metadata.gz: b7d47a75bc3788b64909e5a6fa96cdf9b92d5ac9
4
+ data.tar.gz: 22f1b5b0da373c03651bf96c905aa4b043441c82
5
5
  SHA512:
6
- metadata.gz: 2cbbc96d90e7fed26a042f8dd8818669dbfac2ae542baf2d0b3b63b63850a9e1600f8027ba12af728b04a7033a4046af81ff889414bf6ea3a7b06c7f6a611dca
7
- data.tar.gz: 8fd97cb97aacb9627a8aa1b1c8a26dd82477b64013d61d0d4097be125005f023fd8b83111197e7127f8fea138a7fbc31017e738144b849565d638f5b3ceda92f
6
+ metadata.gz: 203beebb2afa7322c213534b5348f15a53dda40146f0f5ba34da02350cc3423db2dea6f26e9bac157ffff9bc73671dca2ce2318a2fef1d52cd2bc00c8da8ba65
7
+ data.tar.gz: c6bffaab349d3d6f4d393aa4b4ee3866a9bb881d72a770b05f2186acb972e77c023e233c5c65cb210fb3e2eea96f54ca204de03b0bd97a733292d483d64a8bdc
@@ -62,6 +62,18 @@
62
62
  begin
63
63
  if path != '/flow.yaml'
64
64
  resource.send method, (args.first || {})
65
+ elsif path == '/flow2.yaml'
66
+ file = args.first[:file]
67
+ request = RestClient::Request.new(
68
+ :method => method.to_sym,
69
+ :url => "http://dev:8082/v1#{path}",
70
+ :user => @pass,
71
+ :password => 'x',
72
+ :payload => {
73
+ :multipart => true,
74
+ :file => File.new(file, 'rb')
75
+ })
76
+ response = request.execute
65
77
  else
66
78
  file = args.first[:file]
67
79
  request = RestClient::Request.new(
@@ -91,6 +91,21 @@ class Appfront::Command::Clusters < Appfront::Command::Base
91
91
  system("clear")
92
92
  end
93
93
 
94
+ def self.deploys(args, opts)
95
+ exit 1 unless args[0]
96
+ uuid = args[0]
97
+
98
+ c = api.get "/cluster/#{uuid}/deploys"
99
+ if c.count != 0
100
+ puts "=== Cluster #{uuid} deploys: \n"
101
+ c.each do |d|
102
+ puts "\t === Deploy: #{d['deploy']} uuid: #{d['uuid']}\n"
103
+ end
104
+ end
105
+
106
+ puts "\n"
107
+ end
108
+
94
109
  def self.info(args, opts)
95
110
  exit 1 unless args[0]
96
111
  uuid = args[0]
@@ -25,6 +25,14 @@ class Appfront::Command::Deploys < Appfront::Command::Base
25
25
  puts "\n"
26
26
  end
27
27
 
28
+ def self.test(args, opts)
29
+ spinner "Uploading Deploy YAML configuration to Jarvis..." do
30
+ api.post "/flow2.yaml", file: args[0]
31
+ end
32
+ puts "\n"
33
+ end
34
+
35
+
28
36
  def self.update(args, opts)
29
37
  spinner "Updating Deploy YAML configuration to Jarvis..." do
30
38
  api.put "/flow.yaml", file: args[0]
@@ -90,7 +98,7 @@ class Appfront::Command::Deploys < Appfront::Command::Base
90
98
  def self.ls
91
99
  deploys = api.get "/flows"
92
100
  unless deploys.count == 0
93
- puts '=== Tasks:'
101
+ puts '=== Batches:'
94
102
  puts
95
103
  deploys.each do |deploy|
96
104
  next if deploy['execution'] == 'persistent'
@@ -105,7 +113,7 @@ class Appfront::Command::Deploys < Appfront::Command::Base
105
113
 
106
114
  end
107
115
  puts
108
- puts '=== Deploys:'
116
+ puts '=== Services:'
109
117
  puts
110
118
  deploys.each do |deploy|
111
119
  next if deploy['execution'] == 'volatile'
@@ -32,9 +32,9 @@ Deploys commands:
32
32
  Clusters commands:
33
33
 
34
34
  clusters:create -p [provider] [NAME] [type] [region] # create a new cluster
35
- clusters:rm [cluster uuid] # permanently destroy a cluster
36
- clusters:info [cluster uuid] # show detailed cluster information
37
- clusters:list [cluster uuid] # show clusters list
35
+ clusters:rm -p [provider] [cluster uuid] # permanently destroy a cluster
36
+ clusters:info [cluster uuid|name] # show detailed cluster information
37
+ clusters:list [cluster uuid|name] # show clusters list
38
38
  HELP
39
39
  end
40
40
 
@@ -78,21 +78,16 @@ class Appfront::Command::Ps < Appfront::Command::Base
78
78
  def self.run(settings, opts)
79
79
  find_deploy! opts
80
80
 
81
- count, mode = nil
82
- settings.each do |s|
83
- p, v = s.split('=',2)
84
- count = v if p == 'instances'
85
- mode = nil
86
- end
87
-
81
+ count = 1
82
+
88
83
  unless count
89
- puts 'Usage: appfront ps:run instances=N'
84
+ puts 'Usage: appfront ps:run'
90
85
  exit 1
91
86
  end
92
87
 
93
88
  api.put "/flow/#{@deploy}/scale", instances: count
94
89
 
95
- spinner "Running deploy instances..." do
90
+ spinner "Running deploy instance..." do
96
91
  loop do
97
92
  sleep 3
98
93
  info = api.get "/flow/#{@deploy}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appfront
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Appfront
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: netrc