<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.gobyl.cc/index.php?action=history&amp;feed=atom&amp;title=Db1</id>
	<title>Db1 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.gobyl.cc/index.php?action=history&amp;feed=atom&amp;title=Db1"/>
	<link rel="alternate" type="text/html" href="https://wiki.gobyl.cc/index.php?title=Db1&amp;action=history"/>
	<updated>2026-10-20T18:22:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.gobyl.cc/index.php?title=Db1&amp;diff=4&amp;oldid=prev</id>
		<title>Admin: seed</title>
		<link rel="alternate" type="text/html" href="https://wiki.gobyl.cc/index.php?title=Db1&amp;diff=4&amp;oldid=prev"/>
		<updated>2026-10-20T15:00:48Z</updated>

		<summary type="html">&lt;p&gt;seed&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Database host for [[Cust1]]. Runs PostgreSQL 16 serving the &amp;lt;code&amp;gt;app&amp;lt;/code&amp;gt; database that the cust1 account service reads.&lt;br /&gt;
&lt;br /&gt;
== Host ==&lt;br /&gt;
* FQDN: db1.gobyl.cc&lt;br /&gt;
* OS: Ubuntu 24.04&lt;br /&gt;
* PostgreSQL listens on 5432; the firewall admits connections only from inside the customer network.&lt;br /&gt;
&lt;br /&gt;
== Access policy ==&lt;br /&gt;
This host is &amp;#039;&amp;#039;&amp;#039;read-only for the ops agent&amp;#039;&amp;#039;&amp;#039;. The agent&amp;#039;s credential is the &amp;lt;code&amp;gt;dbops&amp;lt;/code&amp;gt; account (OpenBao &amp;lt;code&amp;gt;secret/customers/cust1-db&amp;lt;/code&amp;gt;):&lt;br /&gt;
* &amp;lt;code&amp;gt;dbops&amp;lt;/code&amp;gt; has &amp;#039;&amp;#039;&amp;#039;no sudo&amp;#039;&amp;#039;&amp;#039; and is not in the postgres group.&lt;br /&gt;
* It can read: PostgreSQL logs (/var/log/postgresql, via group adm), configs (/etc/postgresql), unit state (&amp;lt;code&amp;gt;systemctl status postgresql&amp;lt;/code&amp;gt;), journal, ports, disk.&lt;br /&gt;
* It can not: restart or stop services, edit configs, run psql as postgres, or write anywhere that matters.&lt;br /&gt;
&lt;br /&gt;
Any change on this host is performed by the on-call engineer, as root over ssh. In an emergency an engineer may grant the agent the escalation credential &amp;lt;code&amp;gt;secret/customers/cust1-db-admin&amp;lt;/code&amp;gt; (root) with &amp;lt;code&amp;gt;scripts/grant-access.sh cust1-db-admin&amp;lt;/code&amp;gt;; revoke it after the incident.&lt;br /&gt;
&lt;br /&gt;
== Operational notes ==&lt;br /&gt;
* Config: /etc/postgresql/16/main/ (port overrides may appear in postgresql.conf or conf.d/).&lt;br /&gt;
* Logs: /var/log/postgresql/, and &amp;lt;code&amp;gt;journalctl -u postgresql&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Health from the host itself: &amp;lt;code&amp;gt;pg_isready -h 127.0.0.1 -p 5432&amp;lt;/code&amp;gt;.&lt;br /&gt;
* The cust1 application expects port 5432; if postgres is up but the app is down, compare the listening port with the app&amp;#039;s expectation.&lt;br /&gt;
* Monitoring: Icinga checks postgres and disk here over ssh as dbops.&lt;br /&gt;
&lt;br /&gt;
== Escalation ==&lt;br /&gt;
If the database is down or unreachable, the agent reports findings and the exact remediation needed, and hands over to the on-call engineer in the Incidents channel. The incident stays open until service is restored.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>