├── .DS_Store
├── .idea
├── .gitignore
├── Platform-Engineer-Kube.iml
├── modules.xml
└── vcs.xml
├── 40171730216847_.pic.jpg
├── KubernetesPart2ndStep
├── .DS_Store
├── Crossplane
│ ├── Azure.md
│ └── setup.md
├── Devtron
│ └── instructions.md
├── KubeVirt
│ ├── .DS_Store
│ ├── install.sh
│ ├── prereqs.md
│ ├── ubuntu
│ │ ├── directions.md
│ │ ├── iso_update.md
│ │ ├── prereqs.md
│ │ ├── pvc.yaml
│ │ └── ubuntu.yaml
│ └── windows_server_2022
│ │ ├── directions.md
│ │ ├── iso_update.md
│ │ ├── pvc.yaml
│ │ └── win2022.yaml
├── Operators
│ └── instructions.md
├── Rancher
│ └── instructions.md
└── cluster-api
│ ├── .DS_Store
│ ├── azure
│ ├── apply.sh
│ ├── cloud-provider.sh
│ ├── cni-install.sh
│ ├── connect-to-cluster.sh
│ ├── install.sh
│ ├── mgmtinit-azure.sh
│ ├── rbac-creds.sh
│ └── workloadcreation-azure.sh
│ └── website.md
├── NoCodePreparation1stStep
├── CIS Azure Kubernetes Service (AKS) Benchmark v1.2.0 PDF.pdf
├── CIS_Kubernetes_Benchmark_v1.6.0 (1).pdf
├── authentication_and_authorization.md
├── creation.md
├── management.md
├── scanning.md
├── security.md
└── what_is_needed.md
├── README.md
└── UIAndMonitoringEtcStep3
├── .DS_Store
├── homegrown
└── instructions.md
├── opensource
├── .DS_Store
├── Backstage
│ └── instructions.md
└── CNOE
│ ├── LICENSE
│ ├── README.md
│ ├── idpbuilder
│ ├── idpbuilder-darwin-arm64.tar.gz
│ └── instructions.md
├── paid
├── .DS_Store
├── massdriver
│ └── instructions.md
├── opslevel
│ └── instructions.md
└── port
│ └── instructions.md
└── radius
├── instructions.md
└── radapp
├── .rad
└── rad.yaml
├── app.bicep
└── test.bicep
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/.DS_Store
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 | # Editor-based HTTP Client requests
5 | /httpRequests/
6 | # Datasource local storage ignored files
7 | /dataSources/
8 | /dataSources.local.xml
9 |
--------------------------------------------------------------------------------
/.idea/Platform-Engineer-Kube.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/40171730216847_.pic.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/40171730216847_.pic.jpg
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/KubernetesPart2ndStep/.DS_Store
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/Crossplane/Azure.md:
--------------------------------------------------------------------------------
1 | # After installing Crossplane, it takes about 2-3 minutes or so for the CRD's to register
2 |
3 | ```
4 | cat <&1 | grep "Bootstrap Password:"
65 |
66 | 3. Log in and register cluster.
67 |
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/KubernetesPart2ndStep/cluster-api/.DS_Store
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/apply.sh:
--------------------------------------------------------------------------------
1 | ```
2 | kubectl apply -f capi-azurekubeadm.yaml
3 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/cloud-provider.sh:
--------------------------------------------------------------------------------
1 | ```
2 | helm install --kubeconfig=./capi-azure.kubeconfig --repo https://raw.githubusercontent.com/kubernetes-sigs/cloud-provider-azure/master/helm/repo cloud-provider-azure --generate-name --set infra.clusterName=capi-azure --set cloudControllerManager.clusterCIDR="192.168.0.0/16"
3 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/cni-install.sh:
--------------------------------------------------------------------------------
1 | ```
2 | helm repo add projectcalico https://docs.tigera.io/calico/charts --kubeconfig=./capi-azure.kubeconfig && \
3 | helm install calico projectcalico/tigera-operator --kubeconfig=./capi-azure.kubeconfig -f https://raw.githubusercontent.com/kubernetes-sigs/cluster-api-provider-azure/main/templates/addons/calico/values.yaml --namespace tigera-operator --create-namespace
4 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/connect-to-cluster.sh:
--------------------------------------------------------------------------------
1 | ```
2 | clusterctl get kubeconfig capi-azure > capi-azure.kubeconfig
3 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/install.sh:
--------------------------------------------------------------------------------
1 | ## Linux
2 |
3 | ```
4 | curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.4.4/clusterctl-linux-amd64 -o clusterctl
5 |
6 | sudo install -o root -g root -m 0755 clusterctl /usr/local/bin/clusterctl
7 | ```
8 |
9 | ## Mac
10 | ```
11 | brew install clusterctl
12 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/mgmtinit-azure.sh:
--------------------------------------------------------------------------------
1 | ```
2 | export CLUSTER_TOPOLOGY=true
3 | ```
4 |
5 | ```
6 | export AZURE_SUBSCRIPTION_ID=""
7 |
8 | # Create an Azure Service Principal and paste the output here
9 | export AZURE_TENANT_ID=""
10 | export AZURE_CLIENT_ID=""
11 | export AZURE_CLIENT_SECRET=""
12 |
13 | # Base64 encode the variables
14 | export AZURE_SUBSCRIPTION_ID_B64="$(echo -n "$AZURE_SUBSCRIPTION_ID" | base64 | tr -d '\n')"
15 | export AZURE_TENANT_ID_B64="$(echo -n "$AZURE_TENANT_ID" | base64 | tr -d '\n')"
16 | export AZURE_CLIENT_ID_B64="$(echo -n "$AZURE_CLIENT_ID" | base64 | tr -d '\n')"
17 | export AZURE_CLIENT_SECRET_B64="$(echo -n "$AZURE_CLIENT_SECRET" | base64 | tr -d '\n')"
18 |
19 | # Settings needed for AzureClusterIdentity used by the AzureCluster
20 | export AZURE_CLUSTER_IDENTITY_SECRET_NAME="cluster-identity-secret"
21 | export CLUSTER_IDENTITY_NAME="cluster-identity"
22 | export AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE="default"
23 | ```
24 |
25 | ```
26 | # Create a secret to include the password of the Service Principal identity created in Azure
27 | kubectl create secret generic "${AZURE_CLUSTER_IDENTITY_SECRET_NAME}" --from-literal=clientSecret="${AZURE_CLIENT_SECRET}" --namespace "${AZURE_CLUSTER_IDENTITY_SECRET_NAMESPACE}"
28 | ```
29 |
30 | ```
31 | # Finally, initialize the management cluster
32 | clusterctl init --infrastructure azure
33 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/rbac-creds.sh:
--------------------------------------------------------------------------------
1 | az ad sp create-for-rbac -n MyApp --role Contributor --scopes /subscriptions/220284d2-6a19-4781-87f8-5c564ec4fec9
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/azure/workloadcreation-azure.sh:
--------------------------------------------------------------------------------
1 | ```
2 | export AZURE_LOCATION="eastus"
3 |
4 | export AZURE_CONTROL_PLANE_MACHINE_TYPE="Standard_D2s_v3"
5 | export AZURE_NODE_MACHINE_TYPE="Standard_D2s_v3"
6 |
7 | export AZURE_RESOURCE_GROUP="devrelasaservice"
8 | ```
9 |
10 | ```
11 | clusterctl generate cluster capi-azure --kubernetes-version v1.28.0 > capi-azurekubeadm.yaml
12 | ```
--------------------------------------------------------------------------------
/KubernetesPart2ndStep/cluster-api/website.md:
--------------------------------------------------------------------------------
1 | https://capz.sigs.k8s.io/topics/managedcluster.html
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/CIS Azure Kubernetes Service (AKS) Benchmark v1.2.0 PDF.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/NoCodePreparation1stStep/CIS Azure Kubernetes Service (AKS) Benchmark v1.2.0 PDF.pdf
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/CIS_Kubernetes_Benchmark_v1.6.0 (1).pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/NoCodePreparation1stStep/CIS_Kubernetes_Benchmark_v1.6.0 (1).pdf
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/authentication_and_authorization.md:
--------------------------------------------------------------------------------
1 | ## Standard RBAC
2 |
3 | ```
4 | kubectl create sa podcreator
5 | ```
6 |
7 | ```
8 | kubectl get sa podcreator
9 | ```
10 |
11 | ```
12 | kubectl apply -f - <
47 | ```
48 |
49 |
50 | ### EKS
51 |
52 | https://docs.aws.amazon.com/eks/latest/userguide/update-cluster.html
53 |
54 |
55 | ## Monitoring and Observability
56 |
57 | When implementing monitoring and observability, you have two primary options:
58 | - Homegrown
59 | - Enterprise
60 |
61 | Homegrown is comprised of open-source tools or a monitoring/observability tool that you build in-house.
62 |
63 | Enterprise is a paid tool. Think Datadog or AppDynamics
64 |
65 | ### Open-Source
66 |
67 | - Grafana
68 | - Prometheus
69 | - Loki
70 | - Tempo
71 |
72 | #### Grafana and Prometheus
73 |
74 | ```
75 | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
76 | helm repo update
77 | ```
78 |
79 | ```
80 | helm install kube-prometheus prometheus-community/kube-prometheus-stack
81 | ```
82 |
83 | Grafana Creds
84 | - Username: admin
85 | - Password: admin
86 |
87 | (password may also be: prom-operator)
88 |
89 | #### Install Loki
90 |
91 | ```
92 | helm repo add grafana https://grafana.github.io/helm-charts
93 | ```
94 |
95 | Configure a `values.yaml` file
96 | ```
97 | loki:
98 | commonConfig:
99 | replication_factor: 1
100 | storage:
101 | type: 'filesystem'
102 | singleBinary:
103 | replicas: 1
104 | ```
105 |
106 | ```
107 | helm install -n monitoring --values loki-values.yaml loki grafana/loki
108 | ```
109 | #### Install Tempo
110 |
111 | ```
112 | helm repo add grafana https://grafana.github.io/helm-charts
113 | ```
114 |
115 | ```
116 | helm install -n monitoring tempo grafana/tempo
117 | ```
118 |
119 |
120 | ### Enterprise
121 |
122 | - Datadog
123 |
124 | ```
125 | helm repo add datadog https://helm.datadoghq.com
126 | ```
127 |
128 | ```
129 | helm repo update
130 | ```
131 |
132 | ```
133 | CLUSTER_NAME=
134 | API_KEY=
135 | ```
136 |
137 | ```
138 | helm install datadog -n datadog \
139 | --set datadog.site='datadoghq.com' \
140 | --set datadog.clusterName=$CLUSTER_NAME \
141 | --set datadog.clusterAgent.replicas='2' \
142 | --set datadog.clusterAgent.createPodDisruptionBudget='true' \
143 | --set datadog.kubeStateMetricsEnabled=true \
144 | --set datadog.kubeStateMetricsCore.enabled=true \
145 | --set datadog.logs.enabled=true \
146 | --set datadog.logs.containerCollectAll=true \
147 | --set datadog.apiKey=$API_KEY \
148 | --set datadog.processAgent.enabled=true \
149 | --set targetSystem='linux' \
150 | datadog/datadog --create-namespace
151 | ```
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/scanning.md:
--------------------------------------------------------------------------------
1 | ## Kubescape
2 |
3 | 1. Sign up for the Kubescape Forever Free editor: https://cloud.armosec.io/account/sign-up
4 |
5 | 2. Install the Kubescape CLI: https://github.com/kubescape/kubescape
6 |
7 | 3. Log into the Kubescape UI, and under the dashboard, you’ll see an option to add cluster scans. Click the Add cluster scans button.
8 |
9 | 4. Next, you have two options to choose from to deploy cluster scanning:
10 |
11 | - In Cluster Deployment, which is a Helm Chart that you deploy inside of your cluster.
12 | - With the Kubescape CLI, which you can use locally or even in an automated fashion with a CICD pipeline.
13 |
14 | Use the Helm Option. You can copy the code from the Kubescape UI as it'll automatically have your account GUID.
15 |
16 | 5. Now that the cluster exists, click on CONFIGURATION SCANNING in the left pane and then click on AllControls.
17 |
18 | 6. Click the "scan" button on the top right and run a scan of ALL. Ensure that cluster scanning is enabled on the bottom left.
19 |
20 | You'll see a ton of results on the bottom. You can go through each to get an idea of what they look like.
21 |
22 | ### Manifest Scanning With Kubescape
23 | Run the following to test out how to scan Kubernetes Manifests.
24 |
25 | ```
26 | kubescape scan https://github.com/AdminTurnedDevOps/PearsonCourses/tree/main/Helm-Charts-For-Kubernetes/Segment3/nginxupdate
27 | ```
28 |
29 |
30 | ## Implementing Kube-Bench
31 |
32 | Kube-Bench is a tool that you can use for security scanning of clusters. It utilizes CIS Benchmarks, so the repeatability aspect for you is available.
33 |
34 | 1. Download kube-bench. The installation options will vary based on your operating system. For example, below is how you can download Kube-benhc on an Ubuntu server.
35 | ```
36 | curl -L https://github.com/aquasecurity/kube-bench/releases/download/v0.6.10/kube-bench_0.6.10_linux_amd64.deb -o kube-bench_0.6.10_linux_amd64.deb
37 | ```
38 |
39 | Then, you can run the installation.
40 |
41 | ```
42 | sudo apt install ./kube-bench_0.6.10_linux_amd64.deb -f
43 | ```
44 |
45 | ON MAC
46 | ```
47 | curl -L https://github.com/aquasecurity/kube-bench/releases/download/v0.6.2/kube-bench_0.6.2_linux_amd64.tar.gz -o kube-bench_0.6.2_linux_amd64.tar.gz
48 |
49 | tar -xvf kube-bench_0.6.2_linux_amd64.tar.gz
50 | ```
51 |
52 | There are several other installation options. Please see them here:
53 |
54 | 2. Once kube-bench is installed, run it on the terminal.
55 | ```
56 | kube-bench
57 | ```
58 |
59 | It's going to run against your Kubernetes cluster that's in your current context, so you should see a ton of output on the terminal.
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/security.md:
--------------------------------------------------------------------------------
1 | ## OWASP
2 |
3 | https://owasp.org/www-project-kubernetes-top-ten/
4 |
5 | ## CIS
6 |
7 | Go over CIS report
8 |
9 | ## Implementing OPA
10 |
11 | 1. Add the OPA Helm Chart
12 | ```
13 | helm repo add gatekeeper https://open-policy-agent.github.io/gatekeeper/charts
14 | ```
15 |
16 | 2. Install the OPA Helm Chart
17 | ```
18 | helm install gatekeeper/gatekeeper --name-template=gatekeeper --namespace gatekeeper-system --create-namespace
19 | ```
20 |
21 | OR
22 |
23 | ```
24 | kubectl apply -f https://raw.githubusercontent.com/open-policy-agent/gatekeeper/master/deploy/gatekeeper.yaml
25 | ```
26 |
27 | 3. Confirm that all Kubernetes resources were deployed.
28 | ```
29 | kubectl get all -n gatekeeper-system
30 | ```
31 |
32 | 1. The config is your definition of what Gatekeeper is allowed to create policies for. For example, in the config.yaml below, Gatekeeper knows that it can only specify Policies for Pods, but no other Kubernetes resources.
33 |
34 | ```
35 | kubectl create -f - <-
183 | The ':latest' tag is mutable and can lead to unexpected errors if the
184 | image changes. A best practice is to use an immutable tag that maps to
185 | a specific version of an application Pod. This policy validates that the image
186 | specifies a tag and that it is not called `latest`.
187 | spec:
188 | validationFailureAction: audit
189 | background: true
190 | rules:
191 | - name: validate-image-tag
192 | match:
193 | resources:
194 | kinds:
195 | - Pod
196 | - Deployment
197 | validate:
198 | message: "Using a mutable image tag e.g. 'latest' is not allowed."
199 | pattern:
200 | spec:
201 | containers:
202 | - image: "!*:latest"
203 | ```
204 |
205 | 4. Run the following:
206 | ```
207 | kubectl create -f Kyverno/disallow.yaml
208 | ```
209 |
210 | 5. Create a new YAML file called nginx.yaml and paste in the following configuration.
211 | ```
212 | apiVersion: apps/v1
213 | kind: Deployment
214 | metadata:
215 | name: nginx-deployment
216 | spec:
217 | selector:
218 | matchLabels:
219 | app: nginxdeployment
220 | replicas: 2
221 | template:
222 | metadata:
223 | labels:
224 | app: nginxdeployment
225 | spec:
226 | containers:
227 | - name: nginxdeployment
228 | image: nginx:latest
229 | ports:
230 | - containerPort: 80
231 | ```
232 |
233 | You should see an output similiar to the below.
234 |
235 | ```
236 | kubectl create -f nginx.yaml
237 | Error from server: error when creating "nginx.yaml": admission webhook "validate.kyverno.svc-fail" denied the request:
238 |
239 | policy Deployment/default/nginx-deployment for resource violation:
240 |
241 | require-labels:
242 | autogen-check-for-labels: 'validation error: label ''app.kubernetes.io/name'' is
243 | required. rule autogen-check-for-labels failed at path /spec/template/metadata/labels/app.kubernetes.io/name/'
244 | ```
--------------------------------------------------------------------------------
/NoCodePreparation1stStep/what_is_needed.md:
--------------------------------------------------------------------------------
1 | ## Kubernetes As The Platform
2 |
3 | 1. Security (all aspects from apps to cluster)
4 | 2. Scanning (cluster, images, etc.)
5 | 3. Authentication and authorization
6 | 4. Creation (Day One Ops - automation, writing the code to deploy, deployment mechanisms)
7 | 5. Management (Day Two Ops - upgrades, maintenance, alerting, monitoring/observability, etc.)
8 |
9 |
10 | 6. Proper SLA's, HA, and scaling
11 | 7. Proper teams (who's managing what?)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Platform-Engineering On Kubernetes cluster
2 | Build A Platform Engineering Environment On Kubernetes From Scratch
3 | 1. Build a Kubernetes cluster as an underlying platform.
4 | 2. Implement platform capabilities.
5 | 3. Interact with the platform
6 |
7 | Using Kubernetes, we can have all methods in one place.
8 | With tools/methods like Operators, Kubevirt, Cluster API, and Crossplane, Kubernetes can be THEE underlying platform of choice.
9 | Think about it - you can do everything from creating VM's to deploying resources outside of Kubernetes and managing all of it in a declarative fashion.
10 |
11 | Kubernetes is one of the primary ways you can implement Platform Engineering.
12 |
13 | As you build a platform for engineers/developers who have requested to use it, you’ll have a few different options to do so. It’ll require several pieces. Just to list a few out:
14 |
15 | 1. An API
16 |
17 | 2. A CLI
18 |
19 | 3. A method of deploying resources
20 |
21 | 4. A method to deploy clusters
22 |
23 | 5. Management and deployment of containers
24 |
25 | 6. IaC tools like Terraform
26 |
27 | 7. Deploying and managing VMs
28 |
29 | 
30 |
31 |
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/UIAndMonitoringEtcStep3/.DS_Store
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/homegrown/instructions.md:
--------------------------------------------------------------------------------
1 | https://github.com/AdminTurnedDevOps/CapabilityPE
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/UIAndMonitoringEtcStep3/opensource/.DS_Store
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/Backstage/instructions.md:
--------------------------------------------------------------------------------
1 | ## On A VM
2 |
3 | curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash -
4 |
5 | sudo apt install nodejs
6 |
7 | npx @backstage/create-app
8 |
9 | cd k8sbackstage
10 |
11 | yarn dev
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/CNOE/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Apache License
3 | Version 2.0, January 2004
4 | http://www.apache.org/licenses/
5 |
6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7 |
8 | 1. Definitions.
9 |
10 | "License" shall mean the terms and conditions for use, reproduction,
11 | and distribution as defined by Sections 1 through 9 of this document.
12 |
13 | "Licensor" shall mean the copyright owner or entity authorized by
14 | the copyright owner that is granting the License.
15 |
16 | "Legal Entity" shall mean the union of the acting entity and all
17 | other entities that control, are controlled by, or are under common
18 | control with that entity. For the purposes of this definition,
19 | "control" means (i) the power, direct or indirect, to cause the
20 | direction or management of such entity, whether by contract or
21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
22 | outstanding shares, or (iii) beneficial ownership of such entity.
23 |
24 | "You" (or "Your") shall mean an individual or Legal Entity
25 | exercising permissions granted by this License.
26 |
27 | "Source" form shall mean the preferred form for making modifications,
28 | including but not limited to software source code, documentation
29 | source, and configuration files.
30 |
31 | "Object" form shall mean any form resulting from mechanical
32 | transformation or translation of a Source form, including but
33 | not limited to compiled object code, generated documentation,
34 | and conversions to other media types.
35 |
36 | "Work" shall mean the work of authorship, whether in Source or
37 | Object form, made available under the License, as indicated by a
38 | copyright notice that is included in or attached to the work
39 | (an example is provided in the Appendix below).
40 |
41 | "Derivative Works" shall mean any work, whether in Source or Object
42 | form, that is based on (or derived from) the Work and for which the
43 | editorial revisions, annotations, elaborations, or other modifications
44 | represent, as a whole, an original work of authorship. For the purposes
45 | of this License, Derivative Works shall not include works that remain
46 | separable from, or merely link (or bind by name) to the interfaces of,
47 | the Work and Derivative Works thereof.
48 |
49 | "Contribution" shall mean any work of authorship, including
50 | the original version of the Work and any modifications or additions
51 | to that Work or Derivative Works thereof, that is intentionally
52 | submitted to Licensor for inclusion in the Work by the copyright owner
53 | or by an individual or Legal Entity authorized to submit on behalf of
54 | the copyright owner. For the purposes of this definition, "submitted"
55 | means any form of electronic, verbal, or written communication sent
56 | to the Licensor or its representatives, including but not limited to
57 | communication on electronic mailing lists, source code control systems,
58 | and issue tracking systems that are managed by, or on behalf of, the
59 | Licensor for the purpose of discussing and improving the Work, but
60 | excluding communication that is conspicuously marked or otherwise
61 | designated in writing by the copyright owner as "Not a Contribution."
62 |
63 | "Contributor" shall mean Licensor and any individual or Legal Entity
64 | on behalf of whom a Contribution has been received by Licensor and
65 | subsequently incorporated within the Work.
66 |
67 | 2. Grant of Copyright License. Subject to the terms and conditions of
68 | this License, each Contributor hereby grants to You a perpetual,
69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70 | copyright license to reproduce, prepare Derivative Works of,
71 | publicly display, publicly perform, sublicense, and distribute the
72 | Work and such Derivative Works in Source or Object form.
73 |
74 | 3. Grant of Patent License. Subject to the terms and conditions of
75 | this License, each Contributor hereby grants to You a perpetual,
76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77 | (except as stated in this section) patent license to make, have made,
78 | use, offer to sell, sell, import, and otherwise transfer the Work,
79 | where such license applies only to those patent claims licensable
80 | by such Contributor that are necessarily infringed by their
81 | Contribution(s) alone or by combination of their Contribution(s)
82 | with the Work to which such Contribution(s) was submitted. If You
83 | institute patent litigation against any entity (including a
84 | cross-claim or counterclaim in a lawsuit) alleging that the Work
85 | or a Contribution incorporated within the Work constitutes direct
86 | or contributory patent infringement, then any patent licenses
87 | granted to You under this License for that Work shall terminate
88 | as of the date such litigation is filed.
89 |
90 | 4. Redistribution. You may reproduce and distribute copies of the
91 | Work or Derivative Works thereof in any medium, with or without
92 | modifications, and in Source or Object form, provided that You
93 | meet the following conditions:
94 |
95 | (a) You must give any other recipients of the Work or
96 | Derivative Works a copy of this License; and
97 |
98 | (b) You must cause any modified files to carry prominent notices
99 | stating that You changed the files; and
100 |
101 | (c) You must retain, in the Source form of any Derivative Works
102 | that You distribute, all copyright, patent, trademark, and
103 | attribution notices from the Source form of the Work,
104 | excluding those notices that do not pertain to any part of
105 | the Derivative Works; and
106 |
107 | (d) If the Work includes a "NOTICE" text file as part of its
108 | distribution, then any Derivative Works that You distribute must
109 | include a readable copy of the attribution notices contained
110 | within such NOTICE file, excluding those notices that do not
111 | pertain to any part of the Derivative Works, in at least one
112 | of the following places: within a NOTICE text file distributed
113 | as part of the Derivative Works; within the Source form or
114 | documentation, if provided along with the Derivative Works; or,
115 | within a display generated by the Derivative Works, if and
116 | wherever such third-party notices normally appear. The contents
117 | of the NOTICE file are for informational purposes only and
118 | do not modify the License. You may add Your own attribution
119 | notices within Derivative Works that You distribute, alongside
120 | or as an addendum to the NOTICE text from the Work, provided
121 | that such additional attribution notices cannot be construed
122 | as modifying the License.
123 |
124 | You may add Your own copyright statement to Your modifications and
125 | may provide additional or different license terms and conditions
126 | for use, reproduction, or distribution of Your modifications, or
127 | for any such Derivative Works as a whole, provided Your use,
128 | reproduction, and distribution of the Work otherwise complies with
129 | the conditions stated in this License.
130 |
131 | 5. Submission of Contributions. Unless You explicitly state otherwise,
132 | any Contribution intentionally submitted for inclusion in the Work
133 | by You to the Licensor shall be under the terms and conditions of
134 | this License, without any additional terms or conditions.
135 | Notwithstanding the above, nothing herein shall supersede or modify
136 | the terms of any separate license agreement you may have executed
137 | with Licensor regarding such Contributions.
138 |
139 | 6. Trademarks. This License does not grant permission to use the trade
140 | names, trademarks, service marks, or product names of the Licensor,
141 | except as required for reasonable and customary use in describing the
142 | origin of the Work and reproducing the content of the NOTICE file.
143 |
144 | 7. Disclaimer of Warranty. Unless required by applicable law or
145 | agreed to in writing, Licensor provides the Work (and each
146 | Contributor provides its Contributions) on an "AS IS" BASIS,
147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148 | implied, including, without limitation, any warranties or conditions
149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150 | PARTICULAR PURPOSE. You are solely responsible for determining the
151 | appropriateness of using or redistributing the Work and assume any
152 | risks associated with Your exercise of permissions under this License.
153 |
154 | 8. Limitation of Liability. In no event and under no legal theory,
155 | whether in tort (including negligence), contract, or otherwise,
156 | unless required by applicable law (such as deliberate and grossly
157 | negligent acts) or agreed to in writing, shall any Contributor be
158 | liable to You for damages, including any direct, indirect, special,
159 | incidental, or consequential damages of any character arising as a
160 | result of this License or out of the use or inability to use the
161 | Work (including but not limited to damages for loss of goodwill,
162 | work stoppage, computer failure or malfunction, or any and all
163 | other commercial damages or losses), even if such Contributor
164 | has been advised of the possibility of such damages.
165 |
166 | 9. Accepting Warranty or Additional Liability. While redistributing
167 | the Work or Derivative Works thereof, You may choose to offer,
168 | and charge a fee for, acceptance of support, warranty, indemnity,
169 | or other liability obligations and/or rights consistent with this
170 | License. However, in accepting such obligations, You may act only
171 | on Your own behalf and on Your sole responsibility, not on behalf
172 | of any other Contributor, and only if You agree to indemnify,
173 | defend, and hold each Contributor harmless for any liability
174 | incurred by, or claims asserted against, such Contributor by reason
175 | of your accepting any such warranty or additional liability.
176 |
177 | END OF TERMS AND CONDITIONS
178 |
179 | APPENDIX: How to apply the Apache License to your work.
180 |
181 | To apply the Apache License to your work, attach the following
182 | boilerplate notice, with the fields enclosed by brackets "[]"
183 | replaced with your own identifying information. (Don't include
184 | the brackets!) The text should be enclosed in the appropriate
185 | comment syntax for the file format. We also recommend that a
186 | file or class name and description of purpose be included on the
187 | same "printed page" as the copyright notice for easier
188 | identification within third-party archives.
189 |
190 | Copyright [2023] Autodesk
191 |
192 | Licensed under the Apache License, Version 2.0 (the "License");
193 | you may not use this file except in compliance with the License.
194 | You may obtain a copy of the License at
195 |
196 | http://www.apache.org/licenses/LICENSE-2.0
197 |
198 | Unless required by applicable law or agreed to in writing, software
199 | distributed under the License is distributed on an "AS IS" BASIS,
200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201 | See the License for the specific language governing permissions and
202 | limitations under the License.
203 |
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/CNOE/README.md:
--------------------------------------------------------------------------------
1 | # IDP Builder
2 |
3 | Internal development platform binary launcher.
4 |
5 | > **WORK IN PROGRESS**: This tool is in a pre-release stage and is under active development.
6 |
7 | ## About
8 |
9 | Spin up a complete internal developer platform using industry standard technologies like Kubernetes, Argo, and backstage with only Docker required as a dependency.
10 |
11 | This can be useful in several ways:
12 | * Create a single binary which can demonstrate an IDP reference implementation.
13 | * Use within CI to perform integration testing.
14 | * Use as a local development environment for IDP engineers.
15 |
16 | ## Quickstart:
17 |
18 | ### Build
19 |
20 | `make`
21 |
22 | ### Run
23 |
24 | `./idpbuilder create --buildName localdev`
25 |
26 | You can also define the kubernetes version to image and which corresponds to the kind pre-built [image](https://github.com/kubernetes-sigs/kind/releases).
27 | `./idpbuilder create --kubeVersion v1.27.3`
28 |
29 | If it is needed to expose some extra Ports between the docker container and the kubernetes host, they can be declared as such
30 | `./idpbuilder create --extraPorts 22:32222`
31 |
32 | It is also possible to use your own kind config file
33 | `./idpbuilder create --buildName local --kindConfig ./my-kind.yaml`
34 |
35 | **NOTE**: Be sure to include in your kind config the section `containerdConfigPatches` where the registry hostname includes the name specified with the parameter: `--buildname`
36 | ```yaml
37 | containerdConfigPatches:
38 | - |-
39 | [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"]
40 | endpoint = ["http://idpbuilder--registry:5000"]
41 | ```
42 |
43 | ### Use
44 |
45 | Kubernetes: `kubectl get pods`
46 |
47 | Argo: https://argocd.cnoe.localtest.me:8443/
48 |
49 | Backstage: https://backstage.cnoe.localtest.me:8443/
50 |
51 | ## Architecture
52 |
53 | The IDP builder binary is primarily composed of a wrapper around a [Kubebuilder](https://kubebuilder.io) based operator and associated type called localbuild. See: [api/v1alpha1/localbuild_types.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/api/v1alpha1/localbuild_types.go#L28-L66) and [pkg/controllers/localbuild/controller.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L54-L84)
54 |
55 | However it starts out by creating a Kind cluster to register the CRD and controller for localbuild and to host the resources created by it which in turn create the basis for our IDP. You can see the steps taken to install the dependencies and stand up the localbuild controller in the CLI codebase here: [pkg/build/build.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/build/build.go#L95-L131)
56 |
57 | ### Kind Cluster
58 | The Kind cluster is created using the Kind library and only requires Docker be installed on the host. See: [ReconcileKindCluster](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/build/build.go#L39-L59)
59 |
60 | ### Localbuild
61 |
62 | Localbuild's reconciler steps through a number of subreconcilers to create all of the IDP components. See: [Subreconcilers](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L69-L74)
63 |
64 | The subreconcilers currently include:
65 |
66 | * [ReconcileProjectNamespace:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L102C32-L102C57) Creates a namespace for the Localbuild objects
67 | * [ReconcileArgo:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/argo.go#L51) Installs ArgoCD
68 | * [ReconcileEmbeddedGitServer:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L125) Installs a "gitserver" which is another Kubebuilder Operate in this project See: [api/v1alpha1/gitserver_types.go](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/api/v1alpha1/gitserver_types.go)
69 | * [ReconcileArgoApps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L172) Steps through all the "Embedded" Argo Apps and installs them. See: [Embedded Apps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/resources.go#L20-L32)
70 |
71 | ### GitServer
72 |
73 | Gitserver is essentially a fileserver for the Argo apps that are packaged within this IDP builder. As you might expect, it serves the files used by the ArgoCD apps using the git protocol. You can see the container image that contains these files get built here in the [GitServer Reconciler](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/gitserver/image.go#L44-L60)
74 |
75 | ### Embedded Argo Apps
76 |
77 | The embedded Argo apps are created by the Localbuild reconciler See: [Argo Apps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/controllers/localbuild/controller.go#L210-L243) Then they are picked up by the ArgoCD operator which in turn connects to the GitServer to perform their gitops deployment.
78 |
79 | The resources served by the GitServer are contained within this binary here: [pkg/apps/srv](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/)
80 |
81 | They include:
82 | * [ArgoCD Ingress:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/argocd/ingress.yaml) which makes the ArgoCD interface available.
83 | * [Backstage:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/backstage/install.yaml) which intalls the Backstage Resources.
84 | * [Crossplane:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/crossplane/crossplane.yaml) which uses the Crossplane Helm chart to install Crossplane.
85 | * [Nginx Ingress Controller:](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/nginx-ingress/ingress-nginx.yaml) which makes nginx ingresses available on the cluster.
86 |
87 | As you can imagine each of these apps are are deployed by ArgoCD to the Kind cluster created by CLI. The Argo apps can be inspected with kubectl in the `argocd` namespace and the resources they create can be seen in their corresponding namespaces (`backstage` and `crossplane`)
88 |
89 | ### Diagram
90 |
91 | [Excalidraw diagram here:](https://excalidraw.com/#json=MNOQf_OeLtKYe_Y80Bt2l,AP-ftLAwZoDWjp2yudnMKA)
92 |
93 |
94 |
95 | ## Extending the IDP builder
96 | In the future we hope to allow for a pluggable interface to allow for extending the IDP builder with additional argo apps. For now you simply need to add additional apps in the [Embedded Apps](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/resources.go#L20-L32) and also add the resources they will deploy in the `srv` folder: [pkg/apps/srv](https://github.com/cnoe-io/idpbuilder/blob/4b0f8ecdd7266083373da51d5add1bca73e05a33/pkg/apps/srv/)
97 |
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/CNOE/idpbuilder:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/UIAndMonitoringEtcStep3/opensource/CNOE/idpbuilder
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/CNOE/idpbuilder-darwin-arm64.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/UIAndMonitoringEtcStep3/opensource/CNOE/idpbuilder-darwin-arm64.tar.gz
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/opensource/CNOE/instructions.md:
--------------------------------------------------------------------------------
1 | 1. cd in `Day3/opensource/CNOE`
2 |
3 | 2. Unzip
4 | ```
5 | tar -xvf idpbuilder-darwin-arm64.tar.gz
6 | ```
7 |
8 | 3. Run
9 |
10 | ```
11 | ./idpbuilder create
12 | ```
13 |
14 | 4. Wait a few minutes and the portals will be up:
15 | ArgoCD: https://argocd.cnoe.localtest.me:8443/
16 | Backstage: https://backstage.cnoe.localtest.me:8443/
17 | Gitea: https://gitea.cnoe.localtest.me:8443/
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/paid/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AustinIOI/Platform-Engineering-Kubernetes/49e029f20cfffbeb64e47cf61cee75bf536b41fe/UIAndMonitoringEtcStep3/paid/.DS_Store
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/paid/massdriver/instructions.md:
--------------------------------------------------------------------------------
1 | https://app.massdriver.cloud/register
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/paid/opslevel/instructions.md:
--------------------------------------------------------------------------------
1 | 1. Start for free here: https://www.opslevel.com/free-trial
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/paid/port/instructions.md:
--------------------------------------------------------------------------------
1 | https://www.getport.io/try-now
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/radius/instructions.md:
--------------------------------------------------------------------------------
1 | ## Radius
2 |
3 | 1. Install the Radius CLI: https://docs.radapp.io/installation/
4 |
5 | 2. Create a new directory to house the Radius app
6 | ```
7 | mkdir radapp
8 | ```
9 |
10 | 3. `cd` into the new directory and initialize the app
11 | ```
12 | rad init
13 | ```
14 |
15 | 4. Add the `test.bicep` file from Section6 > radius into the `radapp` directory
16 |
17 | 5. Deploy the app
18 | ```
19 | rad deploy test.bicep
20 | ```
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/radius/radapp/.rad/rad.yaml:
--------------------------------------------------------------------------------
1 | workspace:
2 | application: "radapp"
3 |
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/radius/radapp/app.bicep:
--------------------------------------------------------------------------------
1 | import radius as radius
2 | param application string
3 |
4 | resource demo 'Applications.Core/containers@2023-10-01-preview' = {
5 | name: 'demo'
6 | properties: {
7 | application: application
8 | container: {
9 | image: 'ghcr.io/radius-project/tutorial/webapp:edge'
10 | ports: {
11 | web: {
12 | containerPort: 3000
13 | }
14 | }
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UIAndMonitoringEtcStep3/radius/radapp/test.bicep:
--------------------------------------------------------------------------------
1 | import radius as radius
2 |
3 | @description('The ID of your Radius Environment. Automatically injected by the rad CLI.')
4 | param environment string
5 |
6 | @description('The ID of your Radius Application. Automatically injected by the rad CLI.')
7 | param application string
8 |
9 | resource frontend 'Applications.Core/containers@2023-10-01-preview' = {
10 | name: 'frontend'
11 | properties: {
12 | application: application
13 | container: {
14 | image: 'nginx:latest'
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------