Class: ActivePostgres::Components::SSL

Inherits:
Base
  • Object
show all
Defined in:
lib/active_postgres/components/ssl.rb

Instance Attribute Summary

Attributes inherited from Base

#config, #secrets, #ssh_executor

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ActivePostgres::Components::Base

Instance Method Details

#installObject



4
5
6
7
8
9
10
# File 'lib/active_postgres/components/ssl.rb', line 4

def install
  puts 'Installing SSL/TLS encryption...'

  config.all_hosts.each do |host|
    install_on_host(host)
  end
end

#install_on_standby(standby_host) ⇒ Object



24
25
26
27
# File 'lib/active_postgres/components/ssl.rb', line 24

def install_on_standby(standby_host)
  puts "Installing SSL on standby #{standby_host}..."
  install_on_host(standby_host)
end

#restartObject



16
17
18
19
20
21
22
# File 'lib/active_postgres/components/ssl.rb', line 16

def restart
  ssh_executor.restart_postgres(config.primary_host)

  config.standby_hosts.each do |host|
    ssh_executor.restart_postgres(host)
  end
end

#uninstallObject



12
13
14
# File 'lib/active_postgres/components/ssl.rb', line 12

def uninstall
  puts 'SSL certificates remain (harmless to leave configured)'
end