NAME
Net::Cloudflare::DNS::Teal - Makes your Blue/Green deployments in Cloudflare easy!
This module is intended to be used for managing Blue/Green deployments in Cloudflare DNS.
It's compatible with Cloudflare Pages, but can be used for wider range of use cases. (but then think about using a Cloudflare Load Balancer)
Typical use of this module is:
First retrieve dormant to deploy new version of a website/service.
Second, do your tests and/or some canary testing.
Third, replace live version using teal()
.
This module comes with small scripts for ease of command line use (e.g. in CircleCI or GitHub Actions)
When used with Cloudflare Pages, don't use custom domains as blue and green values (but directly the *.pages.dev, e.g. blue.example.pages.dev) as pointing custom domains to another custom domains is not possible.
As of today, this module is NOT production ready.
VERSION
Version 0.05
SYNOPSIS
Net::Cloudflare::DNS::Teal makes your Blue/Green deployments in Cloudflare easy!
Demo
my $teal = Net::Cloudflare::DNS::Teal->new(zone_id => $ENV{CLOUDFLARE_ZONE_ID},
api_token => $ENV{CLOUDFLARE_API_TOKEN},
teal => $ENV{CLOUDFLARE_TEAL},
blue => $ENV{CLOUDFLARE_BLUE},
green => $ENV{CLOUDFLARE_GREEN}
);
# OR
my $teal = Net::Cloudflare::DNS::Teal->new_from_env(); # Will use environment variables
my $live = $teal->get_live();
my $live_color = $teal->get_live_color();
my $dormant = $teal->get_dormant();
my $dormant_color = $teal->get_dormant_color();
$teal->teal();
...
AUTHOR
Thibault DUPONCHELLE, <thibault.duponchelle at gmail.com>
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
This software is Copyright (c) 2023 by Thibault DUPONCHELLE.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)