-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
atmos validate stacks
command (#611)
* updates * updates * updates * updates * updates * updates * updates * updates
- Loading branch information
Showing
7 changed files
with
163 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Stack Validation | ||
sidebar_position: 2 | ||
sidebar_label: Validation | ||
description: Validate all Stack configurations and YAML syntax. | ||
id: validation | ||
--- | ||
|
||
import Terminal from '@site/src/components/Terminal' | ||
|
||
To validate all Stack configurations and YAML syntax, execute the `validate stacks` command: | ||
|
||
```shell | ||
atmos validate stacks | ||
``` | ||
|
||
<br/> | ||
|
||
The command checks and validates the following: | ||
|
||
- All YAML manifest files for YAML errors and inconsistencies | ||
|
||
- All imports: if they are configured correctly, have valid data types, and point to existing manifest files | ||
|
||
- Schema: if all sections in all YAML manifest files are correctly configured and have valid data types | ||
|
||
- Misconfiguration and duplication of components in stacks. If the same Atmos component in the same Atmos stack is | ||
defined in more than one stack manifest file, and the component configurations are different, an error message will | ||
be displayed similar to the following: | ||
|
||
<Terminal title="atmos validate stacks"> | ||
```console | ||
The Atmos component 'vpc' in the stack 'plat-ue2-dev' is defined in more than one | ||
top-level stack manifest file: orgs/acme/plat/dev/us-east-2-extras, orgs/acme/plat/dev/us-east-2. | ||
The component configurations in the stack manifests are different. | ||
To check and compare the component configurations in the stack manifests, run the following commands: | ||
- atmos describe component vpc -s orgs/acme/plat/dev/us-east-2-extras | ||
- atmos describe component vpc -s orgs/acme/plat/dev/us-east-2 | ||
You can use the '--file' flag to write the results of the above commands to files | ||
(refer to https://atmos.tools/cli/commands/describe/component). | ||
You can then use the Linux 'diff' command to compare the files line by line and show the differences | ||
(refer to https://man7.org/linux/man-pages/man1/diff.1.html) | ||
When searching for the component 'vpc' in the stack 'plat-ue2-dev', Atmos can't decide which | ||
stack manifest file to use to get configuration for the component. This is a stack misconfiguration. | ||
Consider the following solutions to fix the issue: | ||
|
||
- Ensure that the same instance of the Atmos 'vpc' component in the stack 'plat-ue2-dev' | ||
is only defined once (in one YAML stack manifest file) | ||
|
||
- When defining multiple instances of the same component in the stack, | ||
ensure each has a unique name | ||
|
||
- Use multiple-inheritance to combine multiple configurations together | ||
(refer to https://atmos.tools/core-concepts/components/inheritance) | ||
``` | ||
</Terminal> | ||
|
||
<br/> | ||
|
||
:::tip | ||
For more details, refer to [`atmos validate stacks`](/cli/commands/validate/stacks) CLI command | ||
::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters