Class: SmartMachine::Commands::GridCommands::Terminal
- Inherits:
-
SubThor
- Object
- Thor
- SubThor
- SmartMachine::Commands::GridCommands::Terminal
show all
- Includes:
- Utilities
- Defined in:
- lib/smart_machine/commands/grid_commands/terminal.rb
Instance Method Summary
collapse
Methods inherited from SubThor
banner, subcommand_prefix
Instance Method Details
#down ⇒ Object
45
46
47
48
49
50
51
52
53
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 45
def down
inside_machine_dir do
with_docker_running do
machine = SmartMachine::Machine.new
name_option = options[:name] ? " --name=#{options[:name]}" : ""
machine.run_on_machine commands: "smartengine grid terminal downer#{name_option}"
end
end
end
|
#downer ⇒ Object
91
92
93
94
95
96
97
98
99
100
101
102
103
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 91
def downer
inside_engine_machine_dir do
if options[:name]
terminal = SmartMachine::Grids::Terminal.new(name: options[:name])
terminal.downer
else
SmartMachine.config.grids.terminal.each do |name, config|
terminal = SmartMachine::Grids::Terminal.new(name: name.to_s)
terminal.downer
end
end
end
end
|
#install ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 8
def install
inside_machine_dir do
with_docker_running do
puts "-----> Installing Terminal"
machine = SmartMachine::Machine.new
machine.run_on_machine commands: "smartengine grid terminal installer"
puts "-----> Terminal Installation Complete"
end
end
end
|
#installer ⇒ Object
56
57
58
59
60
61
62
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 56
def installer
inside_engine_machine_dir do
name, config = SmartMachine.config.grids.terminal.first
terminal = SmartMachine::Grids::Terminal.new(name: name.to_s)
terminal.installer
end
end
|
#uninstall ⇒ Object
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 20
def uninstall
inside_machine_dir do
with_docker_running do
puts "-----> Uninstalling Terminal"
machine = SmartMachine::Machine.new
machine.run_on_machine commands: "smartengine grid terminal uninstaller"
puts "-----> Terminal Uninstallation Complete"
end
end
end
|
#uninstaller ⇒ Object
65
66
67
68
69
70
71
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 65
def uninstaller
inside_engine_machine_dir do
name, config = SmartMachine.config.grids.terminal.first
terminal = SmartMachine::Grids::Terminal.new(name: name.to_s)
terminal.uninstaller
end
end
|
#up ⇒ Object
33
34
35
36
37
38
39
40
41
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 33
def up
inside_machine_dir do
with_docker_running do
machine = SmartMachine::Machine.new
name_option = options[:name] ? " --name=#{options[:name]}" : ""
machine.run_on_machine commands: "smartengine grid terminal uper#{name_option}"
end
end
end
|
#uper ⇒ Object
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/smart_machine/commands/grid_commands/terminal.rb', line 75
def uper
inside_engine_machine_dir do
if options[:name]
terminal = SmartMachine::Grids::Terminal.new(name: options[:name])
terminal.uper
else
SmartMachine.config.grids.terminal.each do |name, config|
terminal = SmartMachine::Grids::Terminal.new(name: name.to_s)
terminal.uper
end
end
end
end
|