Skip to content

Commit d423199

Browse files
author
Derek Smart
committed
delphix yaml docs
Signed-off-by: Derek Smart <derek.smart@delphix.com>
1 parent 22ea370 commit d423199

File tree

1 file changed

+162
-0
lines changed

1 file changed

+162
-0
lines changed

configure-delphix-yaml.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Configure delphix.yaml
2+
3+
At the center of the Delphix Automation Framework is the `delphix.yaml` file. It defines the datasources for your application environments and what actions Delphix should take during CI/CD automation. As with other 'configuration as code' and project files, the `delphix.yaml` file is versioned in your repository.
4+
5+
If you are not familiar with the YAML file format, there are a few things to keep in mind such as you must indent with spaces and not tabs. More information is available [here](http://yaml.org/).
6+
7+
## Key Concepts
8+
9+
The `delphix.yaml` file defines a one to one relationship between an application and a Delphix Self-Service Template.
10+
11+
* Templates are created by the Delphix administrator and consist of the data sources that users need in order to manage their data playground and their testing and/or development environments.
12+
* Templates serve as the parent for a set of data containers that the administrator assigns to users.
13+
* Templates enforce the boundaries for how data is shared.
14+
15+
Each application environment should have a corresponding definition in the environments collection
16+
17+
* Environments can have multiple Actions
18+
* Environments must use a GIT branch to relate to the application environment
19+
20+
### Given -> When -> Then
21+
22+
Actions for environments are defined using the Given -> When -> Then convention. For example, given the `staging` environment is being built, when the event that triggered the build is a GIT `push`, then `refresh` the datapod for the `staging` environment.
23+
24+
```
25+
environments:
26+
- given:
27+
when:
28+
- event: then
29+
- staging:
30+
when:
31+
- push: refresh
32+
```
33+
34+
## Keywords
35+
|Keyword|Description
36+
|---|---
37+
|[template](#template)|The name of the Delphix Self-Service template for this project.
38+
|[api-key](#api-key)|Orbital API Key for the account connected to your Delphix Engine.
39+
|[connectors](#connectors)|A collection of database connector references.
40+
|[data-sources](#data-sources)|A collection of data sources used to create the template and any specifics that can be overwritten.
41+
|[environments](#environments)|A collection of application environments, their datapods, and the actions to take during the CI/CD pipeline.
42+
|[ami](#ami)|ID of AMI to be used for target hosts.
43+
|[host](#host)|Reference for the application host in KMS.
44+
|[port](#port)|Reference for the application port in KMS.
45+
|[database](#database)|Reference for the application database in KMS.
46+
|[username](#username)|Reference for the application username in KMS.
47+
|[password](#password)|Reference for the application password in KMS.
48+
|[branch](#branch)|The source GIT branch for a specific Application Environment.
49+
|[datapod](#datapod)|The Delphix Datapod for a specific Application Environment.
50+
|[when](#when)|The collection of Actions for a specific Application Environment.
51+
52+
53+
### <a id="template"></a>template
54+
55+
The name of the Delphix Self-Service template.
56+
57+
### <a id="api-key"></a>api-key
58+
59+
The Orbital API Key for the automation user.
60+
61+
### <a id="connectors"></a>connectors
62+
63+
The collection of database connector key references for each data source. Do not commit any connector values to your version control. These are only key references, not values. E.g. database_name vs dbName.
64+
65+
### <a id="data-sources"></a>data-sources
66+
67+
The collection of data-sources used to create the template. This is optional and only used if an specific EC2 AMI is used for the creation of target hosts. The name of each data-source should correspond to the data-source names that are in the Delphix Self-Service template.
68+
69+
### <a id="environments"></a>environments
70+
71+
The collection of application environments, their GIT branches, the datapod used as the database, and the collection of Actions to be executed during the CI/CD build phase. The names of the collections are arbitrary and only used for developer identification.
72+
73+
### <a id="ami"></a>ami
74+
75+
Optional. A preconfigured AMI to be used as a target host.
76+
77+
### <a id="host"></a>host
78+
79+
Application database configuration for the host name. This is the name of the configuration, not the value. In the case of `spring.datasource.url=jdbc:postgresql://localhost/questionmarks`, `spring.datasource.url` is the host alias that should be stored.
80+
81+
### <a id="port"></a>port
82+
83+
Application database configuration for the port name.
84+
85+
### <a id="database"></a>database
86+
87+
Application database configuration for the host name.
88+
89+
### <a id="username"></a>username
90+
91+
Application database configuration for the username. This is the name of the configuration, not the value. In the case of `spring.datasource.username=postgres`, `spring.datasource.username` is the username alias that should be stored.
92+
93+
### <a id="password"></a>password
94+
95+
Application database configuration for the password. This is the name of the configuration, not the value. In the case of `spring.datasource.password=mysecretpassword`, `spring.datasource.password` is the password alias that should be stored.
96+
97+
### <a id="branch"></a>branch
98+
99+
The GIT branch from which the environment will be built. E.g. The `production` environment is built from the `master` branch.
100+
101+
### <a id="datapod"></a>datapod
102+
103+
The name of the datapod used for the database of the environment. Must have been created from the template for the project.
104+
105+
### <a id="when"></a>when
106+
107+
The collection of Actions for an environment based on the Given -> When -> Then format described above.
108+
109+
## Overwrites
110+
111+
Each environment has the ability to overwrite individual values for connectors or data-sources. A specific environment might need to use a different AMI or have different database connector keys.
112+
113+
```
114+
environments:
115+
- staging:
116+
branch: staging
117+
datapod: staging-pod
118+
data-sources:
119+
- postgres:
120+
ami: ami-different-id
121+
connectors:
122+
- postgres:
123+
database: differentDbName
124+
when:
125+
- push: refresh
126+
127+
```
128+
129+
## Sample
130+
131+
```
132+
template: Sample Template
133+
api_key: abf7746cff392
134+
data-sources:
135+
- postgres:
136+
ami: ami-0dfffed98347ecd
137+
connectors:
138+
- postgres:
139+
host: hostname
140+
port: port
141+
database: dbName
142+
username: username
143+
password: password
144+
environments:
145+
- staging:
146+
branch: staging
147+
datapod: staging-pod
148+
when:
149+
- push: refresh
150+
- uat:
151+
branch: testing
152+
datapod: user-testing-pod
153+
when:
154+
- push: refresh
155+
- pull-request-create: create
156+
- pull-request-closed: delete
157+
- develop:
158+
branch: develop
159+
datapod: develop-pod
160+
when:
161+
- push: refresh
162+
```

0 commit comments

Comments
 (0)