Skip to content

Commit 76553a8

Browse files
committed
Update repository URLs from aws-controllers-k8s to awslabs
1 parent 0875cf2 commit 76553a8

File tree

6 files changed

+162
-90
lines changed

6 files changed

+162
-90
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ $(CONTROLLER_GEN): $(LOCALBIN)
177177
.PHONY: image
178178
build-image: ## Build the Symphony controller images using ko build
179179
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \
180-
ko build --bare github.com/aws-controllers-k8s/symphony/cmd/controller \
180+
ko build --bare github.com/awslabs/symphony/cmd/controller \
181181
--push=false --tags ${RELEASE_VERSION} --sbom=none
182182

183183
.PHONY: publish
184184
publish-image: ## Publish the Symphony controller images to ECR
185185
$(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \
186-
ko publish --bare github.com/aws-controllers-k8s/symphony/cmd/controller \
186+
ko publish --bare github.com/awslabs/symphony/cmd/controller \
187187
--tags ${RELEASE_VERSION} --sbom=none
188188

189189
.PHONY: package-helm

examples/eks-cluster-mgmt/README.md

Lines changed: 98 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
11
# Amazon EKS cluster management using Symphony & ACK
2-
This example demonstrates how to manage a fleet of EKS clusters using Symphony, ACK, and ArgoCD -- it creates EKS clusters, and bootstraps them with the required add-ons
32

4-
A hub-spoke model is used in this example; a management cluster (hub) is created as part of the initial setup and the controllers needed for provisioning and bootstrapping workload clusters (spokes) are installed on top.
3+
This example demonstrates how to manage a fleet of EKS clusters using Symphony,
4+
ACK, and ArgoCD -- it creates EKS clusters, and bootstraps them with the
5+
required add-ons
56

7+
A hub-spoke model is used in this example; a management cluster (hub) is created
8+
as part of the initial setup and the controllers needed for provisioning and
9+
bootstrapping workload clusters (spokes) are installed on top.
610

7-
**NOTE:** As this example evolves, some of the instructions below will be detailed further (e.g. the creation of the management cluster), others (e.g. controllers installation) will be automated via the GitOps flow.
11+
**NOTE:** As this example evolves, some of the instructions below will be
12+
detailed further (e.g. the creation of the management cluster), others (e.g.
13+
controllers installation) will be automated via the GitOps flow.
814

915
## Prerequisites
16+
1017
1. AWS account for the management cluster
1118
2. AWS account for workload clusters; each with the following IAM roles:
12-
- `eks-cluster-mgmt-ec2`
13-
- `eks-cluster-mgmt-eks`
14-
- `eks-cluster-mgmt-iam`
15-
16-
The permissions should be as needed for every controller.
17-
Trust policy:
18-
```json
19-
{
20-
"Version": "2012-10-17",
21-
"Statement": [
22-
{
23-
"Effect": "Allow",
24-
"Principal": {
25-
"AWS": "arn:aws:iam::<mgmt-account-id>:role/ack-<srvc-name>-controller"
26-
},
27-
"Action": "sts:AssumeRole",
28-
"Condition": {}
29-
}
30-
]
31-
}
32-
```
19+
20+
- `eks-cluster-mgmt-ec2`
21+
- `eks-cluster-mgmt-eks`
22+
- `eks-cluster-mgmt-iam`
23+
24+
The permissions should be as needed for every controller. Trust policy:
25+
26+
```json
27+
{
28+
"Version": "2012-10-17",
29+
"Statement": [
30+
{
31+
"Effect": "Allow",
32+
"Principal": {
33+
"AWS": "arn:aws:iam::<mgmt-account-id>:role/ack-<srvc-name>-controller"
34+
},
35+
"Action": "sts:AssumeRole",
36+
"Condition": {}
37+
}
38+
]
39+
}
40+
```
3341

3442
## Instructions
43+
3544
### Environment variables
3645

37-
1. Use the snippet below to set environment variables. Replace the placeholders first (surrounded with`<>`):
46+
1. Use the snippet below to set environment variables. Replace the placeholders
47+
first (surrounded with`<>`):
48+
3849
```sh
39-
export SYMPHONY_REPO_URL="https://github.com/aws-controllers-k8s/private-symphony.git"
50+
export SYMPHONY_REPO_URL="https://github.com/awslabs/private-symphony.git"
4051
export WORKSPACE_PATH=<workspace-path> #the directory where repos will be cloned e.g. ~/environment/
4152
export ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account)
4253
export AWS_REGION=<region> #e.g. us-west-2
@@ -45,44 +56,60 @@ export ARGOCD_CHART_VERSION=7.5.2
4556
```
4657

4758
### Management cluster
59+
4860
2. Create an EKS cluster (management cluster)
4961
3. Create IAM OIDC provider for the cluster:
62+
5063
```sh
5164
eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve
5265
```
66+
5367
4. Save OIDC provider URL in an environment variable:
68+
5469
```sh
5570
OIDC_PROVIDER=$(aws eks describe-cluster --name $EKS_CLUSTER_NAME --region $AWS_REGION --query "cluster.identity.oidc.issuer" --output text | sed -e "s/^https:\/\///")
5671
```
72+
5773
5. Install the following ACK controllers on the management cluster:
58-
- ACK IAM controller
59-
- ACK EC2 controller
60-
- ACK EKS controller
61-
6. Install Symphony on the management cluster. Please note that this example is tested on 0.1.0-rc.3.
74+
- ACK IAM controller
75+
- ACK EC2 controller
76+
- ACK EKS controller
77+
6. Install Symphony on the management cluster. Please note that this example is
78+
tested on 0.1.0-rc.3.
6279
7. Install EKS pod identity add-on:
80+
6381
```sh
6482
aws eks create-addon --cluster-name $CLUSTER_NAME --addon-name eks-pod-identity-agent --addon-version v1.0.0-eksbuild.1
6583
```
84+
6685
### Repo
86+
6787
8. Clone Symphony repo:
88+
6889
```sh
6990
git clone $SYMPHONY_REPO_URL $WORKSPACE_PATH/symphony
7091
```
7192

72-
9. Create the GitHub repo `cluster-mgmt` in your organization; it will contain the clusters definition, and it will be reconciled to the management cluster via the GitOps flow
93+
9. Create the GitHub repo `cluster-mgmt` in your organization; it will contain
94+
the clusters definition, and it will be reconciled to the management cluster
95+
via the GitOps flow
7396

7497
**NOTE:** Until Symphony is released, make sure the repo you create is private.
7598

7699
10. Save the URL of the created repo in an environment variable:
100+
77101
```sh
78102
export MY_REPO_URL=<repo-url> #e.g. https://github.com/iamahgoub/cluster-mgmt.git
79103
```
80104

81105
11. Clone the created repo:
106+
82107
```sh
83108
git clone $MY_REPO_URL $WORKSPACE_PATH/cluster-mgmt
84109
```
110+
85111
12. Populate the repo:
112+
86113
```sh
87114
cp -r $WORKSPACE_PATH/symphony/examples/cluster-mgmt/* $WORKSPACE_PATH/cluster-mgmt
88115
find /path/to/directory -type f -exec sed -i "s/search_string/$REPLACE_STRING/g" {} +
@@ -93,7 +120,9 @@ find $WORKSPACE_PATH/cluster-mgmt -type f -exec sed -i "s~AWS_REGION~$AWS_REGION
93120
find $WORKSPACE_PATH/cluster-mgmt -type f -exec sed -i "s~CLUSTER_NAME~$CLUSTER_NAME~g" {} +
94121
find $WORKSPACE_PATH/cluster-mgmt -type f -exec sed -i "s~OIDC_PROVIDER~$OIDC_PROVIDER~g" {} +
95122
```
123+
96124
13. Push the changes
125+
97126
```sh
98127
cd $WORKSPACE_PATH/cluster-mgmt
99128
git add .
@@ -103,7 +132,10 @@ cd $WORKSPACE_PATH
103132
```
104133

105134
### ArgoCD installation
106-
14. Create an IAM role for ArgoCD on the management cluster and associated with ArgoCD `ServiceAccount`:
135+
136+
14. Create an IAM role for ArgoCD on the management cluster and associated with
137+
ArgoCD `ServiceAccount`:
138+
107139
```sh
108140
cat >argocd-policy.json <<EOF
109141
{
@@ -147,7 +179,9 @@ aws iam attach-role-policy --role-name argocd-hub-role --policy-arn=arn:aws:iam:
147179

148180
aws eks create-pod-identity-association --cluster-name $CLUSTER_NAME --role-arn arn:aws:iam::$ACCOUNT_ID:role/argocd-hub-role --namespace argocd --service-account argocd-application-controller
149181
```
182+
150183
15. Install ArgoCD helm chart:
184+
151185
```sh
152186
helm repo add argo-cd https://argoproj.github.io/argo-helm
153187
helm upgrade --install argocd argo-cd/argo-cd --version $ARGOCD_CHART_VERSION \
@@ -158,44 +192,68 @@ helm upgrade --install argocd argo-cd/argo-cd --version $ARGOCD_CHART_VERSION \
158192

159193
### Bootstrapping
160194

161-
16. Create ArgoCD `Repository` resource that points to `cluster-mgmt` repo created in an earlier instruction
195+
16. Create ArgoCD `Repository` resource that points to `cluster-mgmt` repo
196+
created in an earlier instruction
162197
17. Apply the bootstrap ArgoCD application:
198+
163199
```sh
164200
kubectl apply -f $WORKSPACE_PATH/cluster-mgmt/gitops/bootstrap.yaml
165201
```
166202

167203
### Adding workload clusters
168204

169-
The initial configuration creates one workload cluster named `workload-cluster1`.
205+
The initial configuration creates one workload cluster named
206+
`workload-cluster1`.
170207

171208
**TODO:** add steps for cluster/account mapping
172209

173-
18. Add a workload cluster by adding a manifest for it under `clusters/`. Refer to `clusters/workload-cluster1.yaml` as an example.
210+
18. Add a workload cluster by adding a manifest for it under `clusters/`. Refer
211+
to `clusters/workload-cluster1.yaml` as an example.
174212
19. Include the new cluster manifest in `clusters/kustomization.yaml`.
175-
20. Add the cluster name and corresponding account number in `charts-values/ack-multi-account/values.yaml`.
213+
20. Add the cluster name and corresponding account number in
214+
`charts-values/ack-multi-account/values.yaml`.
176215
21. Commit/push the changes to Git.
177216

178-
179217
## Known issues
180-
1. You will need to restart the Symphony controller when you add a new workload cluster due to a bug in the controller. Once the resource group `eksclusterwithvpc` is applied, the controller is able to apply the corresponding VPC resources, but it is not able to recognize the generated ids (e.g. subnet id), and feed that into EKS resources. Refer to [this issue](https://github.com/aws-controllers-k8s/private-symphony/issues/8) for more details.
181-
2. Deleting a cluster does not properly clean up all cluster resources i.e. subnets, routetables are left strangling. ACK EC2 controller keep reporting dependencies preventing deletion. To work around this issue, attempt restart ACK EC2 controller, and/or manually deleting the resources.
218+
219+
1. You will need to restart the Symphony controller when you add a new workload
220+
cluster due to a bug in the controller. Once the resource group
221+
`eksclusterwithvpc` is applied, the controller is able to apply the
222+
corresponding VPC resources, but it is not able to recognize the generated
223+
ids (e.g. subnet id), and feed that into EKS resources. Refer to
224+
[this issue](https://github.com/awslabs/private-symphony/issues/8) for more
225+
details.
226+
2. Deleting a cluster does not properly clean up all cluster resources i.e.
227+
subnets, routetables are left strangling. ACK EC2 controller keep reporting
228+
dependencies preventing deletion. To work around this issue, attempt restart
229+
ACK EC2 controller, and/or manually deleting the resources.
182230

183231
## Clean-up
184-
1. Delete ArgoCD bootstrap application, and wait for workload clusters and hosting VPCs to be deleted:
232+
233+
1. Delete ArgoCD bootstrap application, and wait for workload clusters and
234+
hosting VPCs to be deleted:
235+
185236
```sh
186237
kubectl delete application bootstrap -n argocd
187238
```
239+
188240
2. Uninstall ArgoCD helm chart
241+
189242
```sh
190243
helm uninstall argocd -n argocd
191244
```
245+
192246
3. Delete ArgoCD IAM role and policy
247+
193248
```sh
194249
aws iam delete-role --role-name argocd-hub-role
195250
```
251+
196252
4. Delete ArgoCD IAM policy
253+
197254
```sh
198255
aws iam delete-policy --policy-arn arn:aws:iam::$ACCOUNT_ID:policy/argocd-policy
199256
```
257+
200258
5. Delete ACK controllers and Symphony
201259
6. Delete the management cluster

website/docs/docs/getting-started/01-Installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Once authenticated, install Symphony using the Helm chart:
2727
```sh
2828
# Fetch the latest release version from GitHub
2929
export SYMPHONY_VERSION=$(curl -s \
30-
https://api.github.com/repos/aws-controllers-k8s/private-symphony/releases/latest | \
30+
https://api.github.com/repos/awslabs/private-symphony/releases/latest | \
3131
grep '"tag_name":' | \
3232
sed -E 's/.*"([^"]+)".*/\1/' \
3333
)

0 commit comments

Comments
 (0)