Skip to content

Commit e677685

Browse files
jsilvelagbartolini
authored andcommitted
chore: add a section on devops
Signed-off-by: Jaime Silvela <[email protected]>
1 parent 4bea4cd commit e677685

File tree

1 file changed

+31
-1
lines changed
  • content/blog/migrations-with-atlas-and-cloudnativepg

1 file changed

+31
-1
lines changed

content/blog/migrations-with-atlas-and-cloudnativepg/index.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ In addition to the `cluster-example-app` Secret, the CloudNativePG operator
9898
creates Services for Postgres. In particular, we will want to use the ReadWrite
9999
service called `cluster-example-rw` for the migrations.
100100

101-
We're going to use the `credentials` stanza of the AtlasSchema CRD referencing
101+
We're going to use the [`credentials` object](https://atlasgo.io/integrations/kubernetes/declarative#credentials-object)
102+
from the AtlasSchema CRD referencing
102103
the password and the service. Following along the Atlas Operator Quickstart, we
103104
create a migration defining a table called `t1`. Save the following to a file
104105
named `atlas-schema.yaml`.
@@ -165,5 +166,34 @@ As suggested in the Atlas Quickstart, we can modify the schema in the
165166
`kubectl apply -f atlas-schema.yaml`, and the Atlas operator will again
166167
reconcile the database to the desired state.
167168

169+
## What's the point? DevOps
170+
171+
Let's say you have an application that uses a database. In production, the
172+
database may hold your customers's data, purchase history, financial
173+
transactions, perhaps maps using PostGIS, etc.
174+
175+
Application developers will regularly need to add functionality, and often
176+
that will involve creating new tables, schemas, procedures, indexes, perhaps
177+
doing some INSERT statements to populate static data, etc.
178+
The developers will be using a development database, possibly locally.
179+
There might be another database for the purpose of automated testing, and
180+
of course there's the production database, where the changes will need to be
181+
applied in the end. These different databases have different data in them,
182+
and different loads.
183+
Add time and other developers, and you have a lot of databases on your hands,
184+
and a big chance for "it works on my machine" snafus.
185+
186+
Database migration tools manage this, bringing DevOps to this area of data.
187+
Atlas, by operating as a Kubernetes operator, makes the dev/prod transition even
188+
smoother.
189+
190+
Using CloudNativePG, with its credentials secrets and services created out of
191+
the box, together with Atlas, will enable the developers to create migrations
192+
in their local Kubernetes clusters, update the YAML
193+
files for Atlas in version control, and apply the same files in the testing
194+
cluster, and then in the production cluster, with no changes.
195+
196+
---
197+
168198
This intro was just to whet your appetite. There is plenty more to learn with
169199
Atlas.

0 commit comments

Comments
 (0)