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
static_resources: | |
listeners: | |
- name: listener_8000 | |
address: | |
socket_address: | |
address: 0.0.0.0 | |
port_value: 8000 | |
filter_chains: | |
- filters: | |
- name: envoy.filters.network.tcp_proxy |
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
from src.configer import generate | |
from src.configer import Sources, Files | |
from src.configer import env | |
from src.configer import Include | |
sources = Sources({ | |
"vars": "vars.yml", | |
"other": "other_vars.yml" | |
}) |
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
resources: | |
- name: config-repo | |
type: git | |
source: | |
uri: https://corp.domain.int/gitrepo/project/config-repo.git | |
branch: master | |
paths: | |
- config-repo/orgs/ | |
username: '' | |
password: '' |
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
import inspect | |
import os | |
import sys | |
import yaml | |
from yaml.parser import ParserError | |
def env(env_variable): | |
var = os.getenv(env_variable) | |
return var if var else "" |
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
"jobs": [ | |
{ | |
"name": "create-orgs", | |
"plan": [ | |
Resource.get("config-repo"), | |
Resource.get("time-trigger"), | |
Task.cf_mgmt("create-orgs") | |
] | |
}, | |
{ |
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
class Resource(object): | |
@staticmethod | |
def get(name, passed=[], trigger=True): | |
return { | |
"get": name, | |
} | Include.when(passed, { | |
"passed": passed | |
}) | Include.when(trigger, { | |
"trigger": True | |
}) |
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
{ | |
"name": "create-security-groups", | |
"plan": [ | |
{ | |
"get": "config-repo", | |
"trigger": True | |
}, | |
{ | |
"get": "time-trigger", | |
"trigger": True |
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
class Task(object): | |
@staticmethod | |
def cf_mgmt(command): | |
return { | |
"task": command, | |
"image": "cf-mgmt", | |
"config": { | |
"platform": "linux", | |
"inputs": [ | |
{"name": "config-repo"} |
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
... | |
- name: create-spaces | |
plan: | |
- get: config-repo | |
trigger: true | |
passed: | |
- create-orgs | |
- update-org-users | |
- get: cf-mgmt | |
- task: create-spaces |
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
"jobs": [ | |
{ | |
"name": cf_mgmt_command, | |
"plan": prune_empty([ | |
{ | |
"get": "config-repo", | |
"trigger": True, | |
} | |
# |
NewerOlder