App-FargateStack

 view release on metacpan or  search on metacpan

lib/App/FargateStack/Pod.pm  view on Meta::CPAN


This command is the essential final step in the deployment process.

=over 4

=item * If the service is running, this command will trigger a rolling
deployment to replace the existing tasks with new ones based on the
new task definition.

=item * If the service is stopped, this command updates its
configuration. The next time you run start-service, it will launch
tasks using the new task definition.

=back

B<When to use C<update-service> vs. C<redeploy>>

While both commands can result in a new deployment, they serve
different purposes:

Use C<update-service> when you have made any change to your
configuration file that affect the task definition. This is the
correct command for deploying a new image, adding environment
variables, injecting secrets, changing CPU/memory, or adding EFS mount
points. The workflow is:

Update your configuration file.

Run C<app-FargateStack register-task-definition task-name>

Run C<app-FargateStack update-service task-name>

Use C<redeploy> as a shortcut only when you have pushed a new image using
the same tag (e.g., :latest) and have made no other configuration
changes. redeploy forces a new deployment using the existing task
definition, which is simpler but will not apply any other updates.

The status command can help you detect drift by showing if the running
task definition is out of sync with your latest configuration.

=head3 update-target

 update-target task-name

Updates an EventBridge rule and rule target. For tasks of type "task"
(typically scheduled jobs) when you change the schedule the rule must
be deleted, re-created and associated with the target task. This
command will detect the drift in your configuration and apply the
changes if not in C<--dryrun> mode.

=head3 version              

Outputs the current version of C<App::FargateStack>.

=head2 Notes on Deletion of Resources

=over 4

=item *

You will be prompted to confirm the operation before any task is
deleted.

=item *

If the specified task is the only one defined in your configuration
file, its configuration will not be fully removed. Instead, the task's
provisioned resource ARNs and names will be deleted, leaving behind a
minimal configuration skeleton. This allows you to re-provision the
task later by running C<plan> against the skeleton, avoiding the need
to recreate it from scratch.

=item *

C<App::FargateStack> does not delete ECR images associated with tasks.

=item *

ACM certificates provisioned by C<App::FargateStack> will not be
deleted.

=back

=head1 DEPLOYMENT WORKFLOW GUIDE

One of the most common questions when managing a stack is, "I changed
X, what command(s) do I need to run now?" This guide provides a
quick-reference matrix to help you choose the correct workflow for the
most common changes.

=head2 How to Use This Matrix

Find the change you made in the "Change Description" column and follow
the row across to see which commands are required. Commands should be
run in order from left to right.

 +---------------------------------------------+---------+---------+----------+----------+
 | Change Description                          | apply   | register| update-  | redeploy |
 |                                             |         | -task   | service  |          |
 +---------------------------------------------+---------+---------+----------+----------+
 | Updated container image (new tag/digest)    |         |    X    |    X     |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Updated container image (same :latest tag)  |         |         |          |    X     |
 |---------------------------------------------+---------+---------+----------+----------|
 | Added/changed environment variables         |         |    X    |    X     |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Added/changed secrets                       |    X    |    X    |    X     |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Added/changed CPU, memory, or size          |         |    X    |    X     |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Changed a scheduled task's cron/rate        |    X    |         |          |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Added a new S3 bucket or SQS queue          |    X    |    X    |    X     |          |
 |---------------------------------------------+---------+---------+----------+----------|
 | Added or changed an EFS mount point         |    X    |    X    |    X     |          |
 +---------------------------------------------+---------+---------+----------+----------+

=head2 Notes on the Workflow

=over 4



( run in 0.522 second using v1.01-cache-2.11-cpan-0b5f733616e )