From 76553a8a9022cf4fd135147f6b27b1acee4dbe06 Mon Sep 17 00:00:00 2001 From: Amine Date: Thu, 7 Nov 2024 15:48:24 -0800 Subject: [PATCH] Update repository URLs from aws-controllers-k8s to awslabs --- Makefile | 4 +- examples/eks-cluster-mgmt/README.md | 138 +++++++++++++----- .../docs/getting-started/01-Installation.md | 2 +- website/docs/docs/overview.md | 96 ++++++------ website/docusaurus.config.ts | 10 +- website/src/pages/index.tsx | 2 +- 6 files changed, 162 insertions(+), 90 deletions(-) diff --git a/Makefile b/Makefile index 80989b58..a4ec97ce 100644 --- a/Makefile +++ b/Makefile @@ -177,13 +177,13 @@ $(CONTROLLER_GEN): $(LOCALBIN) .PHONY: image build-image: ## Build the Symphony controller images using ko build $(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \ - ko build --bare github.com/aws-controllers-k8s/symphony/cmd/controller \ + ko build --bare github.com/awslabs/symphony/cmd/controller \ --push=false --tags ${RELEASE_VERSION} --sbom=none .PHONY: publish publish-image: ## Publish the Symphony controller images to ECR $(WITH_GOFLAGS) KOCACHE=$(KOCACHE) KO_DOCKER_REPO="095708837592.dkr.ecr.us-west-2.amazonaws.com/symphony" \ - ko publish --bare github.com/aws-controllers-k8s/symphony/cmd/controller \ + ko publish --bare github.com/awslabs/symphony/cmd/controller \ --tags ${RELEASE_VERSION} --sbom=none .PHONY: package-helm diff --git a/examples/eks-cluster-mgmt/README.md b/examples/eks-cluster-mgmt/README.md index ce447d03..24670aa7 100644 --- a/examples/eks-cluster-mgmt/README.md +++ b/examples/eks-cluster-mgmt/README.md @@ -1,42 +1,53 @@ # Amazon EKS cluster management using Symphony & ACK -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 -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. +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 +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. -**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. +**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. ## Prerequisites + 1. AWS account for the management cluster 2. AWS account for workload clusters; each with the following IAM roles: - - `eks-cluster-mgmt-ec2` - - `eks-cluster-mgmt-eks` - - `eks-cluster-mgmt-iam` - - The permissions should be as needed for every controller. - Trust policy: - ```json - { - "Version": "2012-10-17", - "Statement": [ - { - "Effect": "Allow", - "Principal": { - "AWS": "arn:aws:iam:::role/ack--controller" - }, - "Action": "sts:AssumeRole", - "Condition": {} - } - ] - } - ``` + + - `eks-cluster-mgmt-ec2` + - `eks-cluster-mgmt-eks` + - `eks-cluster-mgmt-iam` + + The permissions should be as needed for every controller. Trust policy: + + ```json + { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": "arn:aws:iam:::role/ack--controller" + }, + "Action": "sts:AssumeRole", + "Condition": {} + } + ] + } + ``` ## Instructions + ### Environment variables -1. Use the snippet below to set environment variables. Replace the placeholders first (surrounded with`<>`): +1. Use the snippet below to set environment variables. Replace the placeholders + first (surrounded with`<>`): + ```sh -export SYMPHONY_REPO_URL="https://github.com/aws-controllers-k8s/private-symphony.git" +export SYMPHONY_REPO_URL="https://github.com/awslabs/private-symphony.git" export WORKSPACE_PATH= #the directory where repos will be cloned e.g. ~/environment/ export ACCOUNT_ID=$(aws sts get-caller-identity --output text --query Account) export AWS_REGION= #e.g. us-west-2 @@ -45,44 +56,60 @@ export ARGOCD_CHART_VERSION=7.5.2 ``` ### Management cluster + 2. Create an EKS cluster (management cluster) 3. Create IAM OIDC provider for the cluster: + ```sh eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve ``` + 4. Save OIDC provider URL in an environment variable: + ```sh OIDC_PROVIDER=$(aws eks describe-cluster --name $EKS_CLUSTER_NAME --region $AWS_REGION --query "cluster.identity.oidc.issuer" --output text | sed -e "s/^https:\/\///") ``` + 5. Install the following ACK controllers on the management cluster: - - ACK IAM controller - - ACK EC2 controller - - ACK EKS controller -6. Install Symphony on the management cluster. Please note that this example is tested on 0.1.0-rc.3. + - ACK IAM controller + - ACK EC2 controller + - ACK EKS controller +6. Install Symphony on the management cluster. Please note that this example is + tested on 0.1.0-rc.3. 7. Install EKS pod identity add-on: + ```sh aws eks create-addon --cluster-name $CLUSTER_NAME --addon-name eks-pod-identity-agent --addon-version v1.0.0-eksbuild.1 ``` + ### Repo + 8. Clone Symphony repo: + ```sh git clone $SYMPHONY_REPO_URL $WORKSPACE_PATH/symphony ``` -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 +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 **NOTE:** Until Symphony is released, make sure the repo you create is private. 10. Save the URL of the created repo in an environment variable: + ```sh export MY_REPO_URL= #e.g. https://github.com/iamahgoub/cluster-mgmt.git ``` 11. Clone the created repo: + ```sh git clone $MY_REPO_URL $WORKSPACE_PATH/cluster-mgmt ``` + 12. Populate the repo: + ```sh cp -r $WORKSPACE_PATH/symphony/examples/cluster-mgmt/* $WORKSPACE_PATH/cluster-mgmt 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 find $WORKSPACE_PATH/cluster-mgmt -type f -exec sed -i "s~CLUSTER_NAME~$CLUSTER_NAME~g" {} + find $WORKSPACE_PATH/cluster-mgmt -type f -exec sed -i "s~OIDC_PROVIDER~$OIDC_PROVIDER~g" {} + ``` + 13. Push the changes + ```sh cd $WORKSPACE_PATH/cluster-mgmt git add . @@ -103,7 +132,10 @@ cd $WORKSPACE_PATH ``` ### ArgoCD installation -14. Create an IAM role for ArgoCD on the management cluster and associated with ArgoCD `ServiceAccount`: + +14. Create an IAM role for ArgoCD on the management cluster and associated with + ArgoCD `ServiceAccount`: + ```sh cat >argocd-policy.json </ pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: "/", // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: "aws-controllers-k8s", // Usually your GitHub org/user name. + organizationName: "awslabs", // Usually your GitHub org/user name. projectName: "private-symphony", // Usually your repo name. onBrokenLinks: "throw", @@ -109,7 +109,7 @@ const config: Config = { ], }, { - href: "https://github.com/aws-controllers-k8s/private-symphony", + href: "https://github.com/awslabs/private-symphony", position: "right", className: "header-github-link", "aria-label": "GitHub repository", @@ -133,7 +133,7 @@ const config: Config = { items: [ { label: "Slack", - href: "https://github.com/aws-controllers-k8s/private-symphony", + href: "https://github.com/awslabs/private-symphony", }, ], }, @@ -142,7 +142,7 @@ const config: Config = { items: [ { label: "GitHub", - href: "https://github.com/aws-controllers-k8s/private-symphony", + href: "https://github.com/awslabs/private-symphony", }, ], }, diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 7f09dc3f..e00c6c72 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -24,7 +24,7 @@ function HomepageHeader() { + to="https://github.com/awslabs/private-symphony"> Go to Github