Skip to content

Commit 3f8cde7

Browse files
committed
update main ReadMe and remove idpbuilder reference
Signed-off-by: Pankaj Walke <[email protected]>
1 parent 379683b commit 3f8cde7

File tree

2 files changed

+70
-124
lines changed

2 files changed

+70
-124
lines changed

README.md

Lines changed: 33 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,14 @@ Check out more details about the [installation flow](docs/installation_flow.md).
3030
## Installation Flow Diagram
3131
This diagram illustrates the high-level installation flow for the CNOE AWS Reference Implementation. It shows how the local environment interacts with AWS resources to deploy and configure the platform on an EKS cluster.
3232

33-
+ **Using plain shell script**
3433
```mermaid
3534
flowchart TD
3635
subgraph "Local Environment"
3736
config["config.yaml"]
3837
secrets["GitHub App Credentials
3938
(private/*.yaml)"]
4039
create_secrets["create-config-secrets.sh"]
41-
install["install-using-idpbuilder.sh"]
40+
install["install.sh"]
4241
helm["helm"]
4342
end
4443
@@ -94,83 +93,8 @@ flowchart TD
9493
class config,secrets config;
9594
```
9695

97-
+ **Using `idpbuilder`**
98-
```mermaid
99-
flowchart TD
100-
subgraph "Local Environment"
101-
config["config.yaml"]
102-
secrets["GitHub App Credentials
103-
(private/*.yaml)"]
104-
create_secrets["create-config-secrets.sh"]
105-
install["install-using-idpbuilder.sh"]
106-
idpbuilder["idpbuilder
107-
(Local Kind Cluster)"]
108-
local_argocd["Argo CD
109-
(Kind Cluster)"]
110-
local_gitea["Gitea
111-
(Kind Cluster)"]
112-
end
113-
114-
subgraph "AWS"
115-
aws_secrets["AWS Secrets Manager
116-
- cnoe-ref-impl/config
117-
- cnoe-ref-impl/github-app"]
118-
119-
subgraph "EKS Cluster"
120-
eks_argocd["Argo CD"]
121-
eso["External Secret Operator"]
122-
appset["addons-appset
123-
(ApplicationSet)"]
124-
125-
subgraph "Addons"
126-
backstage["Backstage"]
127-
keycloak["Keycloak"]
128-
crossplane["Crossplane"]
129-
cert_manager["Cert Manager"]
130-
external_dns["External DNS"]
131-
ingress["Ingress NGINX"]
132-
argo_workflows["Argo Workflows"]
133-
end
134-
end
135-
end
136-
137-
config --> create_secrets
138-
secrets --> create_secrets
139-
create_secrets --> aws_secrets
140-
141-
config --> install
142-
install --> idpbuilder
143-
144-
idpbuilder --> local_argocd
145-
idpbuilder --> local_gitea
146-
147-
local_argocd -- "Installs" --> eks_argocd
148-
local_argocd -- "Installs" --> eso
149-
local_argocd -- "Creates" --> appset
150-
151-
aws_secrets -- "Provides configuration" --> eso
152-
153-
appset -- "Creates Argo CD Addon ApplicationSets" --> Addons
154-
155-
eks_argocd -- "Manages" --> Addons
156-
eso -- "Provides secrets to" --> Addons
157-
158-
classDef aws fill:#FF9900,stroke:#232F3E,color:white;
159-
classDef k8s fill:#326CE5,stroke:#254AA5,color:white;
160-
classDef tools fill:#4CAF50,stroke:#388E3C,color:white;
161-
classDef config fill:#9C27B0,stroke:#7B1FA2,color:white;
162-
163-
class aws_secrets,EKS aws;
164-
class eks_argocd,eso,appset,backstage,keycloak,crossplane,cert_manager,external_dns,ingress,argo_workflows k8s;
165-
class idpbuilder,local_argocd,local_gitea,install,create_secrets tools;
166-
class config,secrets config;
167-
```
168-
16996
## Getting Started
17097

171-
> [!NOTE]
172-
> The installation requires AWS credentials to access the EKS cluster to deploy kubernetes resources. Therefore, the installation steps can be executed on local machine or on an EC2 instance with IAM instance role. If using local machine, please use [`aws-vault`](https://github.com/99designs/aws-vault) command to run local EC2 credentials server. Find more information about this requirement in [installation flow](docs/installation_flow.md) document.
173-
17498
### Step 1. ☸️ Create EKS Cluster
17599

176100
The reference implementation can be installed on new EKS cluster which can be created with following tools:
@@ -199,7 +123,12 @@ This will create all the pre-requisite AWS Resources required for the reference
199123
200124
### Step 2. 🏢 Create GitHub Organization
201125

202-
Backstage and Argo CD in this reference implementation are integrated with GitHub. Therefore, a GitHub Organization should be created in order to create GitHub Apps for these integrations. Follow the instructions in [GitHub documentation](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch) to create new organization.
126+
Backstage and Argo CD in this reference implementation are integrated with GitHub. Both Backstage and ArgoCD, use Github Apps for authenticating with Github.
127+
128+
Therefore, a GitHub Organization should be created in order to create GitHub Apps for these integrations. Follow the instructions in [GitHub documentation](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/creating-a-new-organization-from-scratch) to create new organization or visit [here](https://github.com/account/organizations/new).
129+
130+
> [!NOTE]
131+
> It is recommended to use Github Organization instead of personal github ID as backstage has certain [limitations](https://backstage.io/docs/integrations/github/github-apps/#caveats) for using personal account Github Apps for authenticating to Github. Also, the Github Organization is ***FREE***.
203132
204133
### Step 3. 🍴 Fork the Repository
205134

@@ -219,7 +148,7 @@ Create following apps and store it in corresponding file path.
219148
Argo CD requires `url` and `installationId` of the GitHub app. The `url` is the GitHub URL of the organization. The `installationId` can be captured by navigating to the app installation page with URL `https://github.com/organizations/<Organization-name>/settings/installations/<ID>`. You can find more information [on this page](https://stackoverflow.com/questions/74462420/where-can-we-find-github-apps-installation-id).
220149

221150
> [!WARNING]
222-
> **If the app is created using backstage CLI, it creates files in current working directory. These files contains credentials. Handle it with care. It is recommended to remove these files after copying the content over to files in `private` directory**
151+
> **If the app is created using backstage CLI, it creates files in current working directory. These files contain credentials. Handle it with care. It is recommended to remove these files after copying the content over to files in `private` directory**
223152
224153
> [!NOTE]
225154
> The rest of the installation process assumes the GitHub apps credentials are available in `private/backstage-github.yaml` and `private/argocd-github.yaml`
@@ -231,34 +160,18 @@ Argo CD requires `url` and `installationId` of the GitHub app. The `url` is the
231160
The installation requires following binaries in the local environment:
232161

233162
+ [**AWS CLI**](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)
234-
+ [**Docker**](https://docs.docker.com/engine/install/)
163+
+ [**kubectl**](https://kubernetes.io/docs/tasks/tools/)
235164
+ [**yq**](https://mikefarah.gitbook.io/yq/v3.x)
236-
+ [**helm**](https://helm.sh/docs/intro/install/) _(Required only if using plain shell script for installation)_
237-
+ [**IDPBuilder**](https://github.com/cnoe-io/idpbuilder) _(Required only if using ipdbuilder for installation)_
238-
+ [**AWS Vault**](https://github.com/99designs/aws-vault?tab=readme-ov-file#installing) _(Required only for local machine installation)_
165+
+ [**helm**](https://helm.sh/docs/intro/install/)
239166

240167
#### 🔐 Configure AWS Credentials
168+
Configure the AWS CLI with credentials of an IAM role which has access to the EKS cluster. Follow instructions in [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html#getting-started-quickstart-new) to configure AWS CLI.
241169

242-
If the installation steps are being executed on EC2 instance, just ensure that the EC2 IAM instance role has permissions to access EKS cluster. No other configuration is required in this case.
243-
244-
If the steps are being executed on a laptop/desktop, follow below steps:
245-
246-
1. Configure the AWS CLI with credentials of an IAM role which has access to the EKS cluster. Follow instructions in [AWS documentation](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html#getting-started-quickstart-new) to configure AWS CLI.
247-
2. Once AWS CLI is configured, install and start the EC2 credentials server.
248-
249-
```bash
250-
aws-vault exec <AWS_PROFILE> --ec2-server
251-
```
252-
253-
3. Verify that the EC2 credentials server is started.
254-
255-
```bash
256-
curl -s http://169.254.169.254/latest/meta-data/iam/security-credentials/local-credentials
257-
```
170+
If the installation steps are being executed on EC2 instance, ensure that the EC2 IAM instance role has permissions to access EKS cluster or The AWS CLI is configured as mentioned above.
258171

259172
#### ⚙️ Configure Reference Implementation
260173

261-
The reference implementation uses **`config.yaml`** file in the repository root directory to pass values. Refer to following table and update all the values appropriately. All the values are required.
174+
The reference implementation uses **`config.yaml`** file in the repository root directory to configure the installation values. The **`config.yaml`** should be updated with appropriate values before proceeding. Refer to following table and update all the values appropriately. All the values are required.
262175

263176
| Parameter | Description | Type |
264177
|-----------|-------------|------|
@@ -273,9 +186,12 @@ The reference implementation uses **`config.yaml`** file in the repository root
273186
| `path_routing` | Enable path routing ("true") vs domain-based routing ("false") | string |
274187
| `tags` | Arbitrary key-value pairs for AWS resource tagging | object |
275188

189+
> [!TIP]
190+
> If these values are updated after installation. Ensure to run command in next step to update the values in AWS secret manager. Otherwise, the updated values will not reflect in the live installation.
191+
276192
#### 🔒 Create Secrets in AWS Secret Manager
277193

278-
The values required for the installation to work are stored in AWS Secret Manager in two secrets:
194+
The values required for the installation are stored in AWS Secret Manager in two secrets:
279195

280196
1. **cnoe-ref-impl/config:** Stores values from **`config.yaml`** in JSON
281197
2. **cnoe-ref-impl/github-app:** Stores GitHub App credentials with file name as key and content of the file as value from **private** directory.
@@ -290,48 +206,41 @@ Run below command to create new secrets or update the existing secrets if alread
290206
> **DO NOT** move to next steps without completing all the instructions in this step
291207
292208
### Step 6. 🚀 Installation
209+
> [!NOTE]
210+
> Before moving forward, Ensure that the kubectl context is set to EKS cluster and the configured AWS IAM role has access to the cluster.
293211
294212
#### ▶️ Start the Installation Process
295213

296-
The installation can be done using plain shell script or `idpbuilder`. All the addons are installed as Argo CD apps. When using bash script, Argo CD and External Secret Operator are installed on EKS cluster as helm chart. When installing with `idpbuilder`, the Argo CD in `idpbuilder` is used install these initial addons. Once Argo CD on EKS is up, other addons are installed through it and finally the Argo CD on EKS also manages itself. Check out more details about the [installation flow](docs/installation_flow.md).
297-
298-
+ **Install using script:**
299-
```bash
300-
./scripts/install.sh
301-
```
302-
303-
+ **Install using `idpbuilder`:**
214+
All the addons are installed as Argo CD apps. At the start of the installation, Argo CD and External Secret Operator are installed on EKS cluster as helm chart. Once Argo CD on EKS is up, other addons are installed through it and finally the Argo CD on EKS also manages itself and External Secret Operator. Check out more details about the [installation flow](docs/installation_flow.md). Run following command to start the installation.
304215
```bash
305-
./scripts/install-using-idpbuilder.sh
216+
scripts/install.sh
306217
```
307218

308219
#### 📊 Monitor Installation Process
309220

310-
The installation script will continue to run until all the addon Argo CD apps are healthy. To monitor the process, use below instructions to access Argo CD instances. _(If using EC2 instance, make sure the port-forward from EC2 to local machine is set up)_
221+
The installation script will continue to run until all the Argo CD apps for Addons are healthy. To monitor the process, use below instructions to access instance of Argo CD running on EKS.
311222

312-
+ **`idpbuilder` Argo CD:** `idpbuilder` exposes its Argo CD instance at `https://cnoe.localtest.me:8443/argocd` which can be accessed through browser.
313-
314-
+ **EKS Argo CD:** Start the kubernetes port-forward session for Argo CD service and access the Argo CD UI in browser. In Argo CD UI, monitor the health of all Argo CD Apps
223+
Check if the kubectl context is set to EKS cluster and it can access the EKS cluster. Then, Start the kubernetes port-forward session for Argo CD service and access the Argo CD UI in browser. In Argo CD UI, monitor the health of all Argo CD Apps
315224

316225
```bash
317226
kubectl port-forward -n argocd svc/argocd-server 8080:80
318227
```
319228

320229
Depending upon the configuration, Argo CD will be accessible at http://localhost:8080 or http://localhost:8080/argocd.
321230

322-
Switch between the kubernetes context of idpbuilder or EKS and retrieve the credentials for Argo CD can be retrieved with following command:
231+
Retrieve the credentials for Argo CD can be retrieved with following command:
323232

324233
```bash
325-
kubectl get secrets -n argocd argocd-initial-admin-secret -oyaml | yq '.data.password' | base64 -d
326-
327-
# OR
328-
329-
idpbuilder get secrets -p argocd -o yaml
234+
kubectl get secrets -n argocd argocd-initial-admin-secret -oyaml | yq '.data.password' | base64 -d && echo
330235
```
331236

332237
### Step 7. 🌐 Accessing the Platform
333238

334-
The addons are exposed using the base domain configured in [Step 5](#️-configure-reference-implementation). The URL depends on the setting for `path_routing`. Refer to following table for URLs:
239+
The addons with Web UI are exposed using the base domain configured in [Step 5](#️-configure-reference-implementation). The URLs can be retrieved by running following command:
240+
```
241+
scripts/get-urls.sh
242+
```
243+
The URL depends on the setting for `path_routing`. Refer to following table for URLs:
335244

336245
| App Name | URL (w/ Path Routing) | URL (w/o Path Routing) |
337246
| --------- | --------- | --------- |
@@ -342,7 +251,7 @@ The addons are exposed using the base domain configured in [Step 5](#️-configu
342251
All the addons are configured with Keycloak SSO USER1 and the user password for it can be retrieved using following command:
343252

344253
```bash
345-
kubectl get secrets -n keycloak keycloak-config -o go-template='{{range $k,$v := .data}}{{printf "%s: " $k}}{{if not $v}}{{$v}}{{else}}{{$v | base64decode}}{{end}}{{"\n"}}{{end}}'
254+
kubectl get secret -n keycloak keycloak-config -o jsonpath='{.data.USER1_PASSWORD}' | base64 -d && echo
346255
```
347256
Once, all the Argo CD apps on EKS cluster are reporting healthy status, try out [examples](docs/examples/) to create new application through Backstage.
348257
For troubleshooting, refer to the [troubleshooting guide](docs/troubleshooting.md).
@@ -354,11 +263,11 @@ For troubleshooting, refer to the [troubleshooting guide](docs/troubleshooting.m
354263
Run following command to remove all the addons created by this installation:
355264

356265
```
357-
./scripts/uninstall.sh
266+
scripts/uninstall.sh
358267
```
359268

360269
This script will only remove resources other than CRDs from the EKS cluster so that the same cluster can used for re-installation which is useful during development. To remove CRDs, use following command:
361270

362271
```
363-
./scripts/cleanup-crds.sh
272+
scripts/cleanup-crds.sh
364273
```

scripts/get-urls.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
# Colors
4+
RED='\033[38;5;160m'
5+
GREEN='\033[38;5;34m'
6+
PURPLE='\033[38;5;98m'
7+
NC='\033[0m'
8+
BLUE='\033[38;5;33m'
9+
YELLOW='\033[38;5;178m'
10+
CYAN='\033[38;5;37m'
11+
BOLD='\033[1m'
12+
ORANGE='\033[38;5;172m'
13+
14+
# Get the path_routing value from config.yaml
15+
PATH_ROUTING=$(yq '.path_routing' config.yaml)
16+
# Get the domain from config.yaml
17+
DOMAIN=$(yq '.domain' config.yaml)
18+
19+
echo -e "\n${BOLD}${ORANGE}✨ ========================================== ✨${NC}"
20+
echo -e "${BOLD}${CYAN}🌐 Platform Access URLs 🌐${NC}"
21+
echo -e "${BOLD}${ORANGE}✨ ========================================== ✨${NC}\n"
22+
23+
echo -e "${BOLD}${PURPLE}🔗 URLs for accessing the platform:${NC}"
24+
echo -e "${YELLOW}----------------------------------------------------${NC}"
25+
26+
if [ "$PATH_ROUTING" == "\"true\"" ] || [ "$PATH_ROUTING" == "true" ]; then
27+
echo -e "${CYAN}🔶 Backstage: ${BOLD}https://$DOMAIN${NC}"
28+
echo -e "${CYAN}🔶 Argo CD: ${BOLD}https://$DOMAIN/argocd${NC}"
29+
echo -e "${CYAN}🔶 Argo Workflows: ${BOLD}https://$DOMAIN/argo-workflows${NC}"
30+
else
31+
echo -e "${CYAN}🔶 Backstage: ${BOLD}https://backstage.$DOMAIN${NC}"
32+
echo -e "${CYAN}🔶 Argo CD: ${BOLD}https://argocd.$DOMAIN${NC}"
33+
echo -e "${CYAN}🔶 Argo Workflows: ${BOLD}https://argo-workflows.$DOMAIN${NC}"
34+
fi
35+
36+
echo -e "${YELLOW}----------------------------------------------------${NC}"
37+
echo -e "\n${BOLD}${GREEN}✅ Use the URLs above to access the platform services${NC}\n"

0 commit comments

Comments
 (0)