Announcing Atlas v0.12: Cloud State Management
It has been two months since we announced the Community Preview Plan for Atlas Cloud, and today I am thrilled to announce the next batch of features that we are releasing to open-source and to Atlas Cloud:
In summary, version v0.12 includes a few major features that are explained in detail below:
- We have added support for importing and running migration linting on GitHub PRs for external migration formats, such as Flyway and golang-migrate.
- Atlas now supports reading your migration directory directly from your Atlas Cloud account. This eliminates the need for users to build their Docker images with the directory content and makes running schema migrations in production much easier.
- By connecting Atlas CLI to Atlas Cloud, migration runs will be recorded in the cloud account, making it easier to monitor and troubleshoot executed migrations.
- A new Slack integration is now available for Community Plan accounts. Organizations that connect their migration directories to the cloud can receive notifications to Slack channels when the schemas are updated or deployed, among other events.
The Community Plan mentioned in this post has been discontinued. Atlas now offers a 30-day free trial of Atlas Pro. For current pricing information, please visit the Atlas Pricing page.
- A new look has been given to the CI report page. It will be enhanced with additional features in the next version.
Remote Directory State
One of the most common complaints we received from our users is that setting up migration deployments for real-world environments is time-consuming. For each service, users are required to build a Docker image that includes the content of the migration directory, which ensures it is available when Atlas is executed. After this, the built image must be pushed to a registry, and finally, the deployment process needs to be configured to use this newly created image.
Not only does this process add complexity to the setup, but it is also repetitive for each migration directory and involves setting up a CI/CD pipeline for each service, adding another layer of complexity.
Atlas supports the concept of Data Sources, which enables users to retrieve
information stored in an external service or database. In this release, we are introducing a new data source called
remote_dir. This feature allows users to configure Atlas to read
the content of the migration directory directly from their cloud account, thereby eliminating the need to build Docker
images with the directory content.
Here is an example of how to configure the remote_dir data source:
variable "cloud_token" {
type = string
}
atlas {
cloud {
token = var.cloud_token
}
}
data "remote_dir" "migrations" {
// The name of the migration directory in Atlas Cloud.
// In this example, the directory is named "graph".
name = "graph"
}
env {
// Set environment name dynamically based on --env value.
name = atlas.env
migration {
dir = data.remote_dir.migrations.url
}
}
atlas migrate apply \
--url "<DATABASE_URL>" \
--config file://path/to/atlas.hcl \
--env prod \
--var cloud_token="<ATLAS_TOKEN>"