{"id":18792953,"url":"https://github.com/blacksmith-community/postgresql-forge-boshrelease","last_synced_at":"2025-04-13T14:31:38.957Z","repository":{"id":45631095,"uuid":"60879185","full_name":"blacksmith-community/postgresql-forge-boshrelease","owner":"blacksmith-community","description":"A Blacksmith Forge for deploying dedicated standalone and clustered PostgreSQL instances","archived":false,"fork":false,"pushed_at":"2022-03-13T23:52:13.000Z","size":102,"stargazers_count":0,"open_issues_count":3,"forks_count":6,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-04-17T20:13:11.112Z","etag":null,"topics":["bosh","forge","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blacksmith-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-10T21:56:43.000Z","updated_at":"2021-12-04T01:13:27.000Z","dependencies_parsed_at":"2022-09-05T01:40:42.669Z","dependency_job_id":null,"html_url":"https://github.com/blacksmith-community/postgresql-forge-boshrelease","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmith-community%2Fpostgresql-forge-boshrelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmith-community%2Fpostgresql-forge-boshrelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmith-community%2Fpostgresql-forge-boshrelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blacksmith-community%2Fpostgresql-forge-boshrelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blacksmith-community","download_url":"https://codeload.github.com/blacksmith-community/postgresql-forge-boshrelease/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223590175,"owners_count":17170094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bosh","forge","postgres","postgresql"],"created_at":"2024-11-07T21:22:29.532Z","updated_at":"2024-11-07T21:22:30.514Z","avatar_url":"https://github.com/blacksmith-community.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blacksmith PostgreSQL Forge\n\nThis Blacksmith Forge teaches a [Blacksmith Broker][broker] how to\ndeploy standalone and clustered [PostgreSQL][postgresql] service\ndeployments, which are useful for all things database.\n\n## Deploying\n\nTo deploy this forge, you will need to add it to your existing\nBlacksmith Broker manifest deployment, co-locating the\n`postgresql-blacksmith-plans` job on the Blacksmith instance group.\n\nHere's an example to get you started (clipped for brevity):\n\n```yaml\nreleases:\n  - name:    postgresql-forge\n    version: latest\n\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name:    postgresql-blacksmith-plans\n        release: postgresql-forge\n        properties:\n          plans:\n            # your plans here\n            # (see below)\n```\n\nThe PostgreSQL Forge deploys postgresql using the `postgres` BOSH\nrelease available from the [Cloud Foundry Community][pg-bosh].\nThe Forge itself specifes the correct URL and version of the\nupstream BOSH release, in the deployment manifests, so unless you\nlack access to the internet, you should be ok.\n\nOn the other hand, if you do need to upload the release,\nBlacksmith is more than happy to upload it to the BOSH director on\nyour behalf.\n\nFor the Spruce users out there:\n\n```\n---\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name: blacksmith\n        properties:\n          releases:\n            - (( append ))\n            - name:    postgres\n              version: latest\n```\n\nFinally, you'll need to define plans for Blacksmith to deploy.\nThe following sections discuss those in great detail.\n\n## Standalone Topology\n\nThe `standalone` topology is as straightforward as they come: a\nsinge dedicated VM that runs postgresql bound on all interfaces, to\nport 5432.\n\nHere's a diagram to clear things up:\n\n![Standalone Topology Diagram](docs/diag/topology-standalone.png)\n\n### Configuration Options\n\n- *vm_type* - The name of a BOSH `vm_type` from your cloud-config.\n  You can use this to size your PostgreSQL appropriate to your workload\n  requirements, in terms of RAM and CPU.  Increasing the disk size\n  via the VM type is not going to net you much of a gain (see\n  the `disk_size` and `persist` options instead.\n\n- *az* - A single BOSH availability zone name (per cloud-config),\n  for your standalone node placement.  By default, the node will be\n  put in `z1`.\n\n- *network* - The name of the network to deply these instances to.\n  This network should be defined in your cloud-config, and should\n  be large enough to handle your anticipated service footprint.\n  It does not need any static IP addresses.\n\n  By default, VMs will be deployed into a network named\n  `postgresql-service`.\n\n- *disk* - The size of the persistent disk where PostgreSQL will\n  store its data files.  By default, you get a 4G disk.  If, for\n  whatever reason, you don't _want_ a persistent disk, you can set\n  this to `0`.\n\n### Example Configuration\n\nA single standalone plan, persistent, with 4G of disk:\n\n```\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name:    postgresql-blacksmith-plans\n        release: postgresql-forge\n        properties:\n          plans:\n            smalldb:\n              type: standalone\n              disk: 4_096\n```\n\nHere's a configuration that provides two different sizes of\npersistent standalone, each in their own networks:\n\n```\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name:    postgresql-blacksmith-plans\n        release: postgresql-forge\n        properties:\n          plans:\n            small:\n              type: standalone\n              net:  a-side\n              disk: 4_096\n\n            large:\n              type: standalone\n              net:  b-side\n              disk: 16_384\n```\n\n## Clustered Topology\n\nThe `cluster` topology leverages PostgreSQL's native WAL\nreplication, and mixes in PGPoolII for query routing.  All nodes\nin the cluster participate in replication.  Postgres itself runs\non the nonstandard port 6432, and PGPool assumes the canonical\n5432 port.\n\nHere's a diagram:\n\n![Cluster Topology Diagram](docs/diag/topology-cluster.png)\n\n### Configuration Options\n\n- *vm_type* - The name of a BOSH `vm_type` from your cloud-config.\n  You can use this to size your PostgreSQL appropriate to your workload\n  requirements, in terms of RAM and CPU.\n\n- *azs* - A list of BOSH availability zone names (per\n  cloud-config), across which to stripe the nodes.  By default,\n  nodes will be put in `z1` and `z2`.\n\n- *network* - The name of the network to deply these instances to.\n  This network should be defined in your cloud-config, and should\n  be large enough to handle your anticipated service footprint.\n  It does not need any static IP addresses.\n\n  By default, VMs will be deployed into a network named\n  `postgresql-service`.\n\n- *instances* - How many PostgreSQL instances to spin.  Must be at\n  least 2, and defaults to 3.\n\n\n## Example Configuration\n\nHere's the configuration for the 3-node cluster pictured in the\ntopology digram above:\n\n```\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name:    postgresql-blacksmith-plans\n        release: postgresql-forge\n        properties:\n          plans:\n            clustered:\n              type:      cluster\n              instances: 3\n```\n\nHere, we provide two different clustered configurations, varied\nbased on size.\n\n```\ninstance_groups:\n  - name: blacksmith\n    jobs:\n      - name:    postgresql-blacksmith-plans\n        release: postgresql-forge\n        properties:\n          plans:\n            medium:\n              type:      cluster\n              vm_type:   medium\n              instances: 3\n\n            large:\n              type:      cluster\n              vm_type:   large\n              instances: 7\n```\n\n## Contributing\n\nIf you find a bug, please raise a [Github Issue][1] first,\nbefore submitting a PR.\n\n\n\n\n[1]: https://github.com/blacksmith-community/postgresql-forge-boshrelease/issues\n[broker]: https://github.com/cloudfoundry-community/blacksmith\n[postgresql]:  https://postgresql.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksmith-community%2Fpostgresql-forge-boshrelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblacksmith-community%2Fpostgresql-forge-boshrelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblacksmith-community%2Fpostgresql-forge-boshrelease/lists"}