Class: BoringServices::Services::Redis
- Inherits:
-
Base
- Object
- Base
- BoringServices::Services::Redis
show all
- Defined in:
- lib/boring_services/services/redis.rb
Instance Attribute Summary
Attributes inherited from Base
#config, #service_config, #ssh_executor
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#install ⇒ Object
4
5
6
7
8
9
10
11
12
|
# File 'lib/boring_services/services/redis.rb', line 4
def install
execute_on_host do
puts " Installing Redis on #{label || host}..."
ssh_executor.install_package('redis-server')
configure_redis
ssh_executor.systemd_enable('redis-server')
ssh_executor.systemd_restart('redis-server')
end
end
|
30
31
32
33
34
35
36
|
# File 'lib/boring_services/services/redis.rb', line 30
def reconfigure
execute_on_host do
puts " Reconfiguring Redis on #{label || host}..."
configure_redis
ssh_executor.systemd_restart('redis-server')
end
end
|
#restart ⇒ Object
23
24
25
26
27
28
|
# File 'lib/boring_services/services/redis.rb', line 23
def restart
execute_on_host do
puts " Restarting Redis on #{label || host}..."
ssh_executor.systemd_restart('redis-server')
end
end
|
#uninstall ⇒ Object
14
15
16
17
18
19
20
21
|
# File 'lib/boring_services/services/redis.rb', line 14
def uninstall
execute_on_host do
puts " Uninstalling Redis from #{label || host}..."
ssh_executor.systemd_stop('redis-server')
ssh_executor.systemd_disable('redis-server')
ssh_executor.uninstall_package('redis-server')
end
end
|