Skip to content

Commit a4fb4c4

Browse files
committed
[nc] org rename
Signed-off-by: Nic Cheneweth <[email protected]>
1 parent 2fbbf73 commit a4fb4c4

17 files changed

+93
-62
lines changed

.circleci/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ orbs:
88
99

1010
globals:
11-
- &context empc-lab
12-
- &executor-image twdps/circleci-infra-aws:alpine-7.9.0
11+
- &context platform
12+
- &executor-image twdps/circleci-infra-aws:alpine-7.9.1
1313

1414
on-push-main: &on-push-main
1515
branches:
@@ -58,7 +58,7 @@ commands:
5858
- run:
5959
name: run default gateway integration tests
6060
command: bats test/default_gateway_support_status.bats
61-
61+
6262
gateway-functional-tests:
6363
parameters:
6464
cluster:
@@ -83,7 +83,7 @@ jobs:
8383
- set-environment:
8484
account: << parameters.cluster >>
8585
- kube/op-config:
86-
op-value: empc-lab/psk-aws-<< parameters.cluster >>/kubeconfig-base64
86+
op-value: platform/<< parameters.cluster >>/kubeconfig-base64
8787
- run:
8888
name: install external-dns
8989
command: bash scripts/install_external_dns.sh << parameters.cluster >>
@@ -108,7 +108,7 @@ jobs:
108108
- set-environment:
109109
account: << parameters.cluster >>
110110
- kube/op-config:
111-
op-value: empc-lab/psk-aws-<< parameters.cluster >>/kubeconfig-base64
111+
op-value: platform/psk-aws-<< parameters.cluster >>/kubeconfig-base64
112112
- run:
113113
name: deploy team namespaces
114114
command: bash scripts/deploy_namespaces.sh << parameters.cluster >> $DOCKERREGISTRYACCESS

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ credentials
44
source.env
55
kubeconfig*
66
.ruby-version
7+
.python-version
78
bash-functions*
89
ns/*.yaml

.grenrc

-16
This file was deleted.

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.5.0
4+
rev: v4.6.0
55
hooks:
66
- id: check-executables-have-shebangs
77
- id: check-symlinks

README.md

+45-16
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<div align="center">
22
<p>
3-
<img alt="Thoughtworks Logo" src="https://raw.githubusercontent.com/ThoughtWorks-DPS/static/master/thoughtworks_flamingo_wave.png?sanitize=true" width=200 /><br />
4-
<img alt="DPS Title" src="https://raw.githubusercontent.com/ThoughtWorks-DPS/static/master/EMPCPlatformStarterKitsImage.png?sanitize=true" width=350/><br />
3+
<img alt="Thoughtworks Logo" src="https://raw.githubusercontent.com/twplatformlabs/static/master/thoughtworks_flamingo_wave.png?sanitize=true" width=200 /><br />
4+
<img alt="DPS Title" src="https://raw.githubusercontent.com/twplatformlabs/static/master/EMPCPlatformStarterKitsImage.png?sanitize=true" width=350/><br />
55
<h2>psk-platform-simple-teams-and-ns</h2>
6-
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/ThoughtWorks-DPS/psk-aws-control-plane-services"></a>
6+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/github/license/twplatformlabs/psk-aws-control-plane-services"></a>
77
</p>
88
</div>
99

10-
In the greenfield development of an engineering platform there will typical be a window of time, preferably short, between when the early adopting customers need usable access to the platform but before the custom platform APIs are sufficiently mature to manage even the mvp capabilities.
10+
In the greenfield development of an engineering platform there will typical be a window of time, definitely short, between when the early adopting customers need usable access to the platform but before the custom platform APIs are sufficiently mature to manage even the mvp capabilities.
1111

1212
A simple way to address this problem (and even provide a good development resources to the team building the platform APIs), is to use a basic pipeline to applpy the needed, basic configuration. For this approach to be manageable, limit the scope to:
1313

@@ -19,7 +19,47 @@ The namespace definitions can include annotations for things like inclusion with
1919

2020
* The mvp of the plataform should include one or more product-defined, managed top-level domains that support ingress.
2121

22-
The example strategy uses two domains, twdps.io and twdps.digital. Scalable configuration for the various subdomains or path-patterns to support these product domains should be api managed just like custom ns. A good short-term stragy is to initial aupport default ingress patterns much the same was as default environments are provided.
22+
The example strategy uses two domains, twplatformlabs.org and twplatformlabs.link. The .link top level domain is for demonstrating migration strategies. Scalable configuration for the various subdomains or path-patterns to support these product domains should be api managed just like custom ns. A good short-term stragy is to initial aupport default ingress patterns much the same was as default environments are provided.
23+
24+
Default environment gateways:
25+
26+
| gateway | urls | cluster |
27+
|---------------------------------------|-----------------------------------|-------------------------|
28+
| preview.twplatformlabs.org-gateway | (*.)preview.twplatformlabs.org | sbx-i01-aws-us-east-1 |
29+
| preview.twplatformlabs.link-gateway | (*.)preview.twplatformlabs.link | sbx-i01-aws-us-east-1 |
30+
| dev.twplatformlabs.org-gateway | (*.)dev.twplatformlabs.org | prod-i01-aws-us-east-1 |
31+
| dev.twplatformlabs.link-gateway | (*.)dev.twplatformlabs.link | prod-i01-aws-us-east-1 |
32+
| qa.twplatformlabs.org-gateway | (*.)qa.twplatformlabs.org | prod-i01-aws-us-east-1 |
33+
| qa.twplatformlabs.link-gateway | (*.)qa.twplatformlabs.link | prod-i01-aws-us-east-1 |
34+
| prod.twplatformlabs.org-gateway | (*.)prod.twplatformlabs.org | prod-i01-aws-us-east-1 |
35+
| prod.twplatformlabs.link-gateway | (*.)prod.twplatformlabs.link | prod-i01-aws-us-east-1 |
36+
37+
38+
A typical external->internal routing patterns where an external api-gateway has been integrated for domains would be:
39+
40+
api.twdps.io > "external api gateway" > api.prod.twdps.io
41+
dev.api.twdps.io > "external api gateway" > api.stage.twdps.io # or whatever environment constitutes a publically useable test env
42+
43+
A small list of example early-adopter customers have their configuration managed by this temporary, simple ns management pipeline.
44+
45+
| alpha teams | sbx-i01-aws-us-east-1 | prod-i01-aws-us-east-2 |
46+
|--------------------|:----------------------:|:-----------------------:|
47+
| platform | preview | dev, qa, prod |
48+
| demo | preview | dev, qa, prod |
49+
| demo-publications | | dev, qa, prod |
50+
| demo-reviews | | dev, qa, prod |
51+
52+
For each, there will be a demo-preview, demo-dev and so on depending on the team and the cluster. Only demo and platform have a preview ns in the sbx cluster for demonstrating the role of the preview cluster.
53+
54+
## Note
55+
56+
This pipeline is expected to be short-lived and only used to support a small number of teams onboarded. Any scale at all will demonstrate that this is unsustainable. The value is limited to accelerating a small number of early adoptors onto the plateform to provide the necessary feedback loop for validating a minimum feature set prior to general availability. Prior to GA, the custom platform integration APIs should be deployed to perform the tasks of this static repo in a scalable and resilient architecture.
57+
58+
## maintainers
59+
60+
This is a replacement for earlier pre-release alpha team configuration.
61+
62+
## Deprecated
2363

2464
Default environment gateways:
2565

@@ -45,16 +85,5 @@ A small list of example early-adopter customers have their configuration managed
4585
| alpha teams | sbx-i01-aws-us-east-1 | prod-i01-aws-us-east-2 |
4686
|-----------------------|:----------------------:|:-----------------------:|
4787
| twdps-core-labs-team | preview | dev, qa, prod |
48-
| demo | preview | dev, qa, prod |
49-
| demo-publications | | dev, qa, prod |
50-
| demo-reviews | | dev, qa, prod |
5188

5289
For each, there will be a demo-preview, demo-dev and so on depending on the team and the cluster. Only demo and twdps-core-labs-team have a preview ns in the sbx cluster for demonstrating the role of the preview cluster.
53-
54-
## Note
55-
56-
This pipeline is expected to be short-lived and only used to support a small number of teams onboarded. Any scale at all will demonstrate that this is unsustainable. The value is limited to accelerating a small number of early adoptors onto the plateform to provide the necessary feedback loop for validating a minimum feature set prior to general availability. Prior to GA, the custom platform integration APIs should be deployed to perform the tasks of this static repo in a scalable and resilient architecture.
57-
58-
## maintainers
59-
60-
This is a replacement for earlier pre-release alpha team configuration.

environments/prod-i01-aws-us-east-2-teams.json

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"qa",
1515
"prod"
1616
],
17+
"platform": [
18+
"dev",
19+
"qa",
20+
"prod"
21+
],
1722
"twdps-core-labs-team": [
1823
"dev",
1924
"qa",
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
{
2-
"aws_account_id": "{{ op://empc-lab/aws-dps-1/aws-account-id }}",
2+
"aws_account_id": "{{ op://platform/aws-platform/aws-account-id }}",
33
"aws_assume_role": "PSKRoles/PSKControlPlaneBaseRole",
44
"aws_region": "us-east-2",
55
"cluster_name": "prod-i01-aws-us-east-2",
66
"external_dns_chart_version": "1.15.0",
77
88
"cluster_domains": [
9+
"dev.twplatformlabs.org",
10+
"dev.twplatformlabs.link",
11+
"qa.twplatformlabs.org",
12+
"qa.twplatformlabs.link",
13+
"api.twplatformlabs.org",
14+
"api.twplatformlabs.link",
915
"dev.twdps.digital",
1016
"dev.twdps.io",
1117
"qa.twdps.digital",
@@ -14,5 +20,5 @@
1420
"api.twdps.io"
1521
],
1622
"issuerEndpoint": "https://acme-v02.api.letsencrypt.org/directory",
17-
"issuerEmail": "twdps.io@gmail.com"
23+
"issuerEmail": "twplatformlabs@gmail.com"
1824
}

environments/sbx-i01-aws-us-east-1-teams.json

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"demo": [
33
"preview"
44
],
5+
"platform": [
6+
"preview"
7+
],
58
"twdps-core-labs-team": [
69
"preview"
710
]
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
{
2-
"aws_account_id": "{{ op://empc-lab/aws-dps-2/aws-account-id }}",
2+
"aws_account_id": "{{ op://platform/aws-sandbox/aws-account-id }}",
33
"aws_assume_role": "PSKRoles/PSKControlPlaneBaseRole",
44
"aws_region": "us-east-1",
55
"cluster_name": "sbx-i01-aws-us-east-1",
66
"external_dns_chart_version": "1.15.0",
77
88
"cluster_domains": [
9+
"preview.twplatformlabs.org",
10+
"preview.twplatformlabs.link",
911
"preview.twdps.digital",
1012
"preview.twdps.io"
1113
],
1214
"issuerEndpoint": "https://acme-v02.api.letsencrypt.org/directory",
13-
"issuerEmail": "twdps.io@gmail.com"
15+
"issuerEmail": "twplatformlabs@gmail.com"
1416
}

op.prod-i01-aws-us-east-2.env

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export TFE_TOKEN={{ op://empc-lab/svc-terraform-cloud/team-api-token }}
2-
export GH_TOKEN={{ op://empc-lab/svc-github/access-token }}
3-
export SLACK_BOT_TOKEN={{ op://empc-lab/svc-slack/post-bot-token }}
4-
export DOCKERREGISTRYACCESS={{ op://empc-lab/svc-github/dockerconfigjson }}
1+
export TFE_TOKEN={{ op://platform/svc-terraform-cloud/team-api-token }}
2+
export GH_TOKEN={{ op://platform/svc-github/access-token }}
3+
export SLACK_BOT_TOKEN={{ op://platform/svc-slack/platform-slack-bot-token }}
4+
export DOCKERREGISTRYACCESS={{ op://platform/svc-github/dockerconfigjson }}
55

6-
export AWS_ACCESS_KEY_ID={{ op://empc-lab/aws-dps-2/PSKProdServiceAccount-aws-access-key-id }}
7-
export AWS_SECRET_ACCESS_KEY={{ op://empc-lab/aws-dps-2/PSKProdServiceAccount-aws-secret-access-key }}
6+
export AWS_ACCESS_KEY_ID={{ op://platform/aws-sandbox/PSKProdServiceAccount-aws-access-key-id }}
7+
export AWS_SECRET_ACCESS_KEY={{ op://platform/aws-sandbox/PSKProdServiceAccount-aws-secret-access-key }}

op.sbx-i01-aws-us-east-1.env

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
export TFE_TOKEN={{ op://empc-lab/svc-terraform-cloud/team-api-token }}
2-
export DOCKERREGISTRYACCESS={{ op://empc-lab/svc-github/dockerconfigjson }}
3-
export AWS_ACCESS_KEY_ID={{ op://empc-lab/aws-dps-2/PSKNonprodServiceAccount-aws-access-key-id }}
4-
export AWS_SECRET_ACCESS_KEY={{ op://empc-lab/aws-dps-2/PSKNonprodServiceAccount-aws-secret-access-key }}
1+
export TFE_TOKEN={{ op://platform/svc-terraform-cloud/team-api-token }}
2+
export DOCKERREGISTRYACCESS={{ op://platform/svc-github/dockerconfigjson }}
3+
4+
export AWS_ACCESS_KEY_ID={{ op://platform/aws-sandbox/PSKNonprodServiceAccount-aws-access-key-id }}
5+
export AWS_SECRET_ACCESS_KEY={{ op://platform/aws-sandbox/PSKNonprodServiceAccount-aws-secret-access-key }}

scripts/deploy_namespaces.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ teams=$(jq -r 'keys[]' $json_file)
1414
echo "generate $cluster_name team namespace resource files"
1515
for team in $teams; do
1616
echo "team: $team"
17-
17+
1818
# Read the namespaces that should exist for the current team
1919
namespaces=$(jq -r --arg k "$team" '.[$k][]' $json_file)
20-
20+
2121
# Iterate over each namespace
2222
for namespace in $namespaces; do
2323
echo " namespace: $namespace"
@@ -91,7 +91,7 @@ metadata:
9191
namespace: $team-$namespace
9292
subjects:
9393
- kind: Group
94-
name: ThoughtWorks-DPS/$team
94+
name: twplatformlabs/$team
9595
apiGroup: rbac.authorization.k8s.io
9696
roleRef:
9797
kind: Role

scripts/gateway_functional_test.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ else
1111
testenv="dev"
1212
fi
1313

14-
echo "testing https://httpbin.$testenv.twdps.io/json"
14+
echo "testing https://httpbin.$testenv.twplatformlabs.org/json"
1515
bash scripts/toggle_httpbin.sh on $cluster_name
1616

17-
jsonResponse=$(curl -X GET "https://httpbin.$testenv.twdps.io/json" -H "accept: application/json")
17+
jsonResponse=$(curl -X GET "https://httpbin.$testenv.twplatformlabs.org/json" -H "accept: application/json")
1818
echo "response $jsonResponse"
1919
if [[ ! $jsonResponse =~ "slideshow" ]]; then
2020
echo "httpbin not responding"

scripts/toggle_httpbin.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ metadata:
2626
namespace: default-mtls
2727
spec:
2828
hosts:
29-
- "httpbin.$testenv.twdps.io"
29+
- "httpbin.$testenv.twplatformlabs.org"
3030
gateways:
31-
- istio-system/$testenv-twdps-io-gateway
31+
- istio-system/$testenv-twplatformlabs-org-gateway
3232
http:
3333
- route:
3434
- destination:

service-account-role-external-dns.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ data "aws_iam_openid_connect_provider" "eks" {
88

99
module "external_dns_irsa_role" {
1010
source = "terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks"
11-
version = "~> 5.40.0"
11+
version = "~> 5.52.2"
1212

1313
role_path = "/PSKRoles/"
1414
role_name = "simple-teams-external-dns-sa"

variables.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ variable "aws_region" {
77
}
88

99
variable "aws_account_id" {
10-
type = string
10+
type = string
1111
validation {
1212
condition = length(var.aws_account_id) == 12 && can(regex("^\\d{12}$", var.aws_account_id))
1313
error_message = "Invalid AWS account ID"

versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ terraform {
99

1010
backend "remote" {
1111
hostname = "app.terraform.io"
12-
organization = "twdps"
12+
organization = "twplatformlabs"
1313
workspaces {
1414
prefix = "psk-platform-simple-teams-and-ns-"
1515
}

0 commit comments

Comments
 (0)