Skip to main content

Senza template for automatic deployment of PostgreSQL instances

This package provides an external template for the stups-senza tool (https://github.com/zalando-stups/senza), allowing rapid deployment of PostgreSQL nodes on AWS. It’s designed to work together with an external tool that runs senza with all necessary parameters and deploy DB instances automatically, therefore, the template is a non-interactive one. Compared to the PostgresApp template (included with senza) it adds the following actions:

  • NAT gateways are detected based on the customer DNS zone.

  • Correct Etcd endpoints in the current account are detected for a specific region.

  • Non-interactive mode is the default one, all parameters can be supplied with environment variables (-v option during senza init).

  • pg_hba.conf is configured by default to reject non-SSL connections.

  • Standby and superuser passwords are automatically generated.

  • All passwords and scalyr keys are encrypted.

  • zmon2 group is automatically picked from the current account.

  • EBS is always used.

Installation

$ sudo pip3 install --upgrade senza.templates.acid

Usage

$ senza init -t base [-v param=name] deployment.yaml

Below is the list of parameters supported by the template:

  • team_name: the name of the team to deploy the template (used as part of the DNS name for the resulting instance).

  • team_region: AWS region of the team to deploy the template (by default, eu-west-1 and eu-central-1 are supported).

  • team_gateway_zone: the DNS zone the application runs at, to look for the NAT gateways.

  • add_replica_loadbalancer: whether to add a separate load-balancer to serve requests for the replica (default: false).

  • instance_type: AWS EC2 instance type to deploy the DB on (default: t2.medium).

  • volume_size: initial size of the DB EBS volume in GBs (default: 10).

  • volume_type: AWS type of the EBS volume (default: gp2).

  • volume_iops: number of the IO operations per second for the provision IO EBS volumes.

  • snapshot_id: ID of the existing EBS snapshot to initialize the new database from.

  • scalyr_account_key: Key to the scalyr account to log the database activity.

  • pgpassword_admin: password to the admin account.

  • postgresql_conf: a JSON dictionary of the key-value parameters for the PostgreSQL.

Examples

Initialization:

$ senza init -t base -v team_name=foo -v 'team_region=eu-west-1' -v 'team_gateway_zone=foo.example.com' -v 'hosted_zone=db.example.com' -v instance_type=m3.medium' -v 'postgresql_conf='{shared_buffers: 1GB}' deploy.yaml

Deployment:

$ senza create deploy.yaml bar

The steps above result in the deployment of the new PostgreSQL cluster consisting of 3 t2.medium instances, available under the name of bar.db.example.com and accessible to the application running in the account associated with the DNS zone foo.example.com. They only work in the AWS environment configured for STUPS and senza.

Senza it a powerful tool developed by Zalando to deploy applications on AWS. If you are not familiar with senza-based deployments, please, refer to the STUPS documentation: http://stups.readthedocs.io/en/latest/.

License

Apache 2.0

Releasing

$ ./release.sh <NEW_VERSION>

Metadata

Release files for acid.senza.templates 1.103

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for acid.senza.templates 1.103
File Size Uploaded Provenance
acid.senza.templates-1.103.tar.gz 12.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for acid.senza.templates 1.103
File Interpreter ABI Platform
acid.senza.templates-1.103-py3-none-any.whl Python 3 none any Details

Total release size: 26.6 kB

Release files / acid.senza.templates-1.103.tar.gz

Download URL acid.senza.templates-1.103.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
01efc13dbce5593de18234bbbcffecb30db5ff660ee2f3411264590d74f03f75
BLAKE2b-256 checksum
How to use checksums
d20792f0238a29b79c0fe17f475be403daf009aa06d27217c9228349509face6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release files / acid.senza.templates-1.103-py3-none-any.whl

Download URL acid.senza.templates-1.103-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0279edd4f907fb7b8d07f1cb7a23b39b08e8ce98528aabaf60ea1ea11e43f5f
BLAKE2b-256 checksum
How to use checksums
4fa0b2a6217def2d5709e6566046e99923107c1bf9ce189db95e857a0b8d2d93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for acid.senza.templates 1.103

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page