FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
stackmate/lib/stackmate/stackpi.rb at master · stackmate/stackmate · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Oct 6, 2020. It is now read-only.
stackmate
/
stackmate
Public archive
Notifications
You must be signed in to change notification settings
Fork
12
Star
21
Code
Issues
2
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
stackmate
/
lib
/
stackmate
/
stackpi.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (37 loc) · 1.24 KB
Breadcrumbs
stackmate
/
lib
/
stackmate
/
stackpi.rb
Copy path
File metadata and controls
41 lines (37 loc) · 1.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require
'stackmate'
#API for creating stack
#TODO clean up repeated code
module
StackMate
module
StackPi
#class Create
#include Logging
def
self
.
create_stack
(
file
,
stack_name
,
params
,
wait_conditions
)
# Thread.new do
# StackMate::WaitConditionServer.run!
# end
engine
=
Ruote
::
Dashboard
.
new
(
Ruote
::
Worker
.
new
(
Ruote
::
HashStorage
.
new
)
)
engine
.
noisy
=
ENV
[
'NOISY'
]
==
'true'
engine
.
configure
(
'wait_logger_timeout'
,
600
)
# engine.on_error = Ruote.process_definition do
# p("Error : StackPi create stack for #{stack_name} failed!")
# end
unknown
=
nil
unresolved
=
catch
(
:unresolved
)
do
unknown
=
catch
(
:unknown
)
do
api_opts
=
{
:APIKEY
=>
"
#{
ENV
[
'APIKEY'
]
}
"
,
:SECKEY
=>
"
#{
ENV
[
'SECKEY'
]
}
"
,
:URL
=>
"
#{
ENV
[
'URL'
]
}
"
}
p
=
StackMate
::
StackExecutor
.
new
(
file
,
stack_name
,
params
,
engine
,
wait_conditions
,
api_opts
)
p
.
launch
(
)
nil
end
nil
end
puts
'Failed to resolve parameters '
+
unresolved
.
to_s
if
unresolved
print
"Sorry, I don't know how to create resources of type: "
,
unknown
,
"
\n
"
if
unknown
end
def
self
.
delete_stack
(
file
,
stack_name
,
params
,
wait_conditions
)
end
#end
end
end
Back
|
FazBrowse Home
|
New Git URL