Merge pull request 'Switch postgresql primary, deploy new replica' (#546) from switch_postgres_primary into master
Reviewed-on: #546
This commit is contained in:
commit
5139f242a4
@ -1,4 +0,0 @@
|
||||
{
|
||||
"name": "postgres-4",
|
||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu6fPxOZeKloF/EgYvU0k\nOwv8bJjsCQcWaMTPle5//mRTszA6PM2z9RI+Mfr45qxTlsL9pQY8WJOWF6QOK31x\nszuqcr7oOjtAhrLI8f/oNDEDjcx325FqG9gNKQEAD7d4zodh+PhDe6x7GIyIS7lG\nIcD5Zre9iDwv8FGLR+5GLqS8SJOPL/wJkQ8w+N0f8YDFw81kiTta5NLhAx3fMDs0\n2kmoNlbmKlNZTtLjCfCV+/pa9oY6wycjck3GvobiFE/4cWaNkeGlPc+uAwlfmrOv\nHy0tq1XBX/BCvE5kMXmhnMT23JXjm2s2PgCLgEVGAXilXk/T597KDm+z4oBpAQma\nnQIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
}
|
4
clients/postgres-6.json
Normal file
4
clients/postgres-6.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"name": "postgres-6",
|
||||
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtVzM0fwlimmq11jTGTko\nK87LRYSar61tNF3qVWp9axNSMa6BSxVark9eYOqY4eLh/5vJVDqXDFq30/IUWg40\nH8hHWaOEvQrP2dm/XFw1RmunfbfN9gN07TuhaT3xFD5t+jFBuOSoJ4cPnFIABuVt\nFLrjgtYYjtZe5hGE9ZPmS7o2ATM5EU9mxeQ+TkgDbr8StvSPGdZ1ykhagf1pegGU\nRIfZ+4ZKzyDUAq+fYNhIbmlm5h2gP+XdtakPy43j7n0iN1vwDgBqJ2pdaVs/GcFf\nvaztoltguoknI2NPSez1N217asTTLuth0nHxVXiKCVXnqwDjxgWmuP6X2B7VYjyc\nxQIDAQAB\n-----END PUBLIC KEY-----\n"
|
||||
}
|
@ -65,8 +65,9 @@
|
||||
"backup": {
|
||||
"nodes_excluded": [
|
||||
"garage-",
|
||||
"lq-",
|
||||
"rsk-",
|
||||
"postgres-5"
|
||||
"postgres-6"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -13,12 +13,20 @@
|
||||
"ipaddress": "192.168.122.211",
|
||||
"roles": [
|
||||
"base",
|
||||
"kvm_guest"
|
||||
"kvm_guest",
|
||||
"postgresql_primary"
|
||||
],
|
||||
"recipes": [
|
||||
"kosmos-base",
|
||||
"kosmos-base::default",
|
||||
"kosmos_kvm::guest",
|
||||
"kosmos_postgresql::primary",
|
||||
"kosmos_postgresql::firewall",
|
||||
"kosmos-bitcoin::lndhub-go_pg_db",
|
||||
"kosmos-bitcoin::nbxplorer_pg_db",
|
||||
"kosmos_drone::pg_db",
|
||||
"kosmos_gitea::pg_db",
|
||||
"kosmos-mastodon::pg_db",
|
||||
"apt::default",
|
||||
"timezone_iii::default",
|
||||
"timezone_iii::debian",
|
||||
@ -52,6 +60,6 @@
|
||||
"run_list": [
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[postgresql_replica]"
|
||||
"role[postgresql_primary]"
|
||||
]
|
||||
}
|
||||
|
@ -1,32 +1,24 @@
|
||||
{
|
||||
"name": "postgres-4",
|
||||
"name": "postgres-6",
|
||||
"normal": {
|
||||
"knife_zero": {
|
||||
"host": "10.1.1.107"
|
||||
"host": "10.1.1.196"
|
||||
}
|
||||
},
|
||||
"automatic": {
|
||||
"fqdn": "postgres-4",
|
||||
"fqdn": "postgres-6",
|
||||
"os": "linux",
|
||||
"os_version": "5.4.0-122-generic",
|
||||
"hostname": "postgres-4",
|
||||
"ipaddress": "192.168.122.3",
|
||||
"os_version": "5.4.0-173-generic",
|
||||
"hostname": "postgres-6",
|
||||
"ipaddress": "192.168.122.60",
|
||||
"roles": [
|
||||
"base",
|
||||
"kvm_guest",
|
||||
"postgresql_primary"
|
||||
"kvm_guest"
|
||||
],
|
||||
"recipes": [
|
||||
"kosmos-base",
|
||||
"kosmos-base::default",
|
||||
"kosmos_kvm::guest",
|
||||
"kosmos_postgresql::primary",
|
||||
"kosmos_postgresql::firewall",
|
||||
"kosmos-bitcoin::lndhub-go_pg_db",
|
||||
"kosmos-bitcoin::nbxplorer_pg_db",
|
||||
"kosmos_drone::pg_db",
|
||||
"kosmos_gitea::pg_db",
|
||||
"kosmos-mastodon::pg_db",
|
||||
"apt::default",
|
||||
"timezone_iii::default",
|
||||
"timezone_iii::debian",
|
||||
@ -47,19 +39,19 @@
|
||||
"cloud": null,
|
||||
"chef_packages": {
|
||||
"chef": {
|
||||
"version": "18.3.0",
|
||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.3.0/lib",
|
||||
"version": "18.4.2",
|
||||
"chef_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/chef-18.4.2/lib",
|
||||
"chef_effortless": null
|
||||
},
|
||||
"ohai": {
|
||||
"version": "18.1.4",
|
||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.4/lib/ohai"
|
||||
"version": "18.1.11",
|
||||
"ohai_root": "/opt/chef/embedded/lib/ruby/gems/3.1.0/gems/ohai-18.1.11/lib/ohai"
|
||||
}
|
||||
}
|
||||
},
|
||||
"run_list": [
|
||||
"role[base]",
|
||||
"role[kvm_guest]",
|
||||
"role[postgresql_primary]"
|
||||
"role[postgresql_replica]"
|
||||
]
|
||||
}
|
||||
}
|
@ -21,3 +21,4 @@ bundle exec knife ssh roles:postgresql_client -a knife_zero.host "sudo sed -r \"
|
||||
# TODO
|
||||
# 1. Change roles in node configs
|
||||
# 2. Converge new primary
|
||||
echo "You need to update the role in the '$new_primary_hostname' node config to 'postgres_primary' and converge it now."
|
||||
|
Loading…
x
Reference in New Issue
Block a user