Skip to content

Commit f39701f

Browse files
author
Derek Smart
committed
Merge branch 'develop'
2 parents bb30e26 + 745211b commit f39701f

File tree

7 files changed

+15
-48
lines changed

7 files changed

+15
-48
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Delphix Automation Framework
22

3-
Always include a project title with the largest heading. A project logo may replace the project title, if one has been designed. Project badges are common for OSS projects. They show quick information like Build Status, Download Count, etc... If there are any relevant badges, include them below the project title in MD format. In the paragraph immediately following the project title and badges, include information about the project and/or an overview that explains **what** the project is.
3+
The Delphix Automation Framework (DAF) allows automating data management via APIs at scale. Easily automate Delphix Self Service actions in CI/CD Pipelines without being tied to any specific CI Software.
44

55
#### Table of Contents
66
1. [Description](#description)
77
2. [Installation](#installation)
8+
* [The delphix.yaml file](#delphix-yaml)
89
3. [Usage](#usage)
910
4. [Links](#links)
1011
5. [Contribute](#contribute)
@@ -17,14 +18,18 @@ Always include a project title with the largest heading. A project logo may repl
1718

1819
## <a id="description"></a>Description
1920

21+
DAF combines environment variables commonly available during CI/CD and data management as code in the `delphix.yaml` file to automate API calls to the Delphix Dynamic Data Platform. This allows for chain-able API calls that can be triggered during different stages of the CI/CD pipeline. The data state for different non-production environments is now visible through code configuration and that configuration is under version control.
2022

2123
## <a id="installation"></a>Installation
2224

25+
The tools and executable for DAF have been containerized with docker for convenience. Use the latest version by pulling the container below.
26+
2327
```bash
2428
docker pull delphix/daf
2529
```
30+
### <a id="delphix-yaml"></a>The delphix.yaml file
2631

27-
Create a `delphix.yaml` file based on this guide: [Configure Delphix YAML](./configure-delphix-yaml.md)
32+
The `delphix.yaml` file is the configuration file that defines the data management as code strategy for the project. Create a `delphix.yaml` file based on this guide: [Configure Delphix YAML](./configure-delphix-yaml.md)
2833

2934
## <a id="usage"></a>Usage
3035

configure-delphix-yaml.md

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,8 @@ environments:
3535
|Keyword|Description
3636
|---|---
3737
|[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.
3938
|[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.
4139
|[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.
4340
|[host](#host)|Reference for the application host in KMS.
4441
|[port](#port)|Reference for the application port in KMS.
4542
|[database](#database)|Reference for the application database in KMS.
@@ -48,31 +45,21 @@ environments:
4845
|[branch](#branch)|The source GIT branch for a specific Application Environment.
4946
|[datapod](#datapod)|The Delphix Datapod for a specific Application Environment.
5047
|[when](#when)|The collection of Actions for a specific Application Environment.
48+
|[then](#then)|The Delphix Self Service action executed for this `when` trigger.
5149

5250

5351
### <a id="template"></a>template
5452

5553
The name of the Delphix Self-Service template.
5654

57-
### <a id="api-key"></a>api-key
58-
59-
The Orbital API Key for the automation user.
60-
6155
### <a id="connectors"></a>connectors
6256

6357
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.
6458

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-
6959
### <a id="environments"></a>environments
7060

7161
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.
7262

73-
### <a id="ami"></a>ami
74-
75-
Optional. A preconfigured AMI to be used as a target host.
7663

7764
### <a id="host"></a>host
7865

@@ -106,6 +93,10 @@ The name of the datapod used for the database of the environment. Must have been
10693

10794
The collection of Actions for an environment based on the Given -> When -> Then format described above.
10895

96+
### <a id="then"></a>then
97+
98+
The specific Self Service API call to be executed during this Action. Acceptable values: `datapod.refresh`, `datapod.create`, `datapod.delete`, `bookmark.share`, `bookmark.create`, `datapod.undo`, and `bookmark.delete`.
99+
109100
## Overwrites
110101

111102
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.
@@ -115,9 +106,6 @@ environments:
115106
- staging:
116107
branch: staging
117108
datapod: staging-pod
118-
data-sources:
119-
- postgres:
120-
ami: ami-different-id
121109
connectors:
122110
- postgres:
123111
database: differentDbName
@@ -130,17 +118,7 @@ environments:
130118

131119
```
132120
template: Sample Template
133-
api_key: abf7746cff392
134121
parent: dSource Name
135-
config:
136-
notes: description *optional*
137-
data-sources:
138-
- postgres:
139-
notes: Here are notes
140-
replica: Default
141-
source: dbdhcp3
142-
start-order: 1
143-
ami: ami-0dfffed98347ecd
144122
connectors:
145123
- postgres:
146124
host: host_ref_in_kms

delphix.yaml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
template: DAF
22
parent: dms-source
3-
api_key: app_key_token in KMS
4-
config:
5-
notes: description *optional*
6-
data-sources:
7-
- postgres:
8-
notes: Here are notes
9-
replica: Default
10-
source: dbdhcp3
11-
start-order: 1
12-
ami: ami-0dfffed98347ecd
133
connectors:
144
- postgres:
155
host: host_ref_in_kms
@@ -40,5 +30,5 @@ environments:
4030
branch: origin/feature/unit-tests
4131
datapod: Develop
4232
when:
43-
- custom: datapod.refresh
33+
- push: datapod.refresh
4434
- build-failure: datapod.undo

src/main/kotlin/com/delphix/yamlparser/Mapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Mapper {
6666
return Yaml(
6767
contents.get("template").asText(),
6868
contents.get("parent").asText(),
69-
contents.get("api_key").asText(),
69+
//contents.get("api_key").asText(),
7070
mappedConfig,
7171
mappedConnector,
7272
mapEnvironments(contents["environments"])

src/main/kotlin/com/delphix/yamlparser/Validator.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class Validator(val contents: JsonNode) {
8585
fun validate() {
8686
field(contents, "template")
8787
field(contents, "parent")
88-
field(contents, "api_key")
8988
node(contents, "environments")
9089
environments(contents["environments"])
9190

src/main/kotlin/com/delphix/yamlparser/Yaml.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package com.delphix.yamlparser
33
data class Yaml(
44
val template: String,
55
val parent: String,
6-
val api_key: String,
76
val config: Config? = null,
87
val connectors: List<Connector>? = null,
98
val environments: List<Environment>

src/test/kotlin/com/delphix/yamlparser/YamlTest.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ class YamlTest {
1616
private val connector = Connector("name", "host", "port", "database", "username", "password")
1717
private val action = Action("event", "action")
1818
private val environment = Environment("develop", "branch", "datapod", listOf(action))
19-
private val yaml = Yaml("template", "parent", "api_key", config, listOf(connector), listOf(environment));
19+
private val yaml = Yaml("template", "parent", config, listOf(connector), listOf(environment));
2020

2121
@Test fun `can get template`() : Unit {
2222
assertEquals("template", yaml.template)
2323
}
2424

25-
@Test fun `can get api_key`() : Unit {
26-
assertEquals("api_key", yaml.api_key)
27-
}
28-
2925
@Test fun `can get environment`() : Unit {
3026
assertEquals("branch", yaml.environments.get(0).branch);
3127
}

0 commit comments

Comments
 (0)