Skip to content

Commit

Permalink
Merge pull request #2 from soerenschneider/main
Browse files Browse the repository at this point in the history
docs: update readme
  • Loading branch information
Schnitzel authored Dec 20, 2024
2 parents 299f0a6 + 004e53b commit b3c054a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,34 @@ Please make sure that docker is installed on your machine! It's required to run
```
make bootstrap-kind-cluster
```
You could give it another name by specifying `KIND_CLUSTER_NAME` environment variable
You could give it another name by specifying the `KIND_CLUSTER_NAME` environment variable.
2. Install 2A into kind cluster:
```
make deploy-2a
```
The Demos in this repo require at least 2A v0.0.5 or newer. You can change the version of the 2A by specifying the
The Demos in this repo require at least 2A v0.0.5 or newer. You can change the version of 2A by specifying the `HMC_VERSION` environment variable.
3. Monitor the installation of 2A (you probably will need to install `jq` to execute this command):
```
PATH=$PATH:./bin kubectl get management hmc -o json | jq -r '.status.components | to_entries[] | "\(.key): \(.value.success // .value.error)"'
```
@TODO: document what the output should look like
If the installation of 2a succeeded, the output should look as follows
```
capi: true
cluster-api-provider-aws: true
cluster-api-provider-azure: true
cluster-api-provider-vsphere: true
hmc: true
k0smotron: true
projectsveltos: true
```
4. Install the Demo Helm Repo into 2A:
```
make setup-helmrepo
```
@TODO: describe what this does
This step adds a [`HelmRepository` resource](https://fluxcd.io/flux/components/source/helmrepositories/) to the cluster that contains Helm charts for this demo.
### Infra Setup
Expand Down Expand Up @@ -116,7 +125,7 @@ In the real world this would most probably be done by a Platform Team Lead that
This demo shows how to upgrade an existing cluster through the cluster template system. This expects `Demo 1` to be completed.
This demo will upgrae the k8s cluster from `v1.31.1+k0s.1` (which is part of the `demo-aws-standalone-cp-0.0.1` template) to `v1.31.2+k0s.0` (which is part of `demo-aws-standalone-cp-0.0.2`)
This demo will upgrade the k8s cluster from `v1.31.1+k0s.1` (which is part of the `demo-aws-standalone-cp-0.0.1` template) to `v1.31.2+k0s.0` (which is part of `demo-aws-standalone-cp-0.0.2`)
1. Install ClusterTemplate Upgrade
```
Expand All @@ -128,7 +137,7 @@ This demo will upgrae the k8s cluster from `v1.31.1+k0s.1` (which is part of the
2. The fact that we have an upgrade available will be reported by 2A, and can be checked with:
```
kubectl -n hmc-system get managedcluster.hmc.mirantis.com hmc-system-aws-test1 -o json | jq -r '.status.availableUpgrades'
kubectl -n hmc-system get managedcluster.hmc.mirantis.com hmc-system-aws-test1 -o jsonpath='{.status.availableUpgrades}'
```
@TODO: change command to load all clusters
Expand All @@ -145,8 +154,10 @@ This demo will upgrae the k8s cluster from `v1.31.1+k0s.1` (which is part of the
```
4. Monitor the rollout of the upgrade @TODO: find a way to monitor the rollout of the upgrade
4. Monitor the rollout of the upgrade
```bash
KUBECONFIG="kubeconfigs/hmc-system-aws-test1.kubeconfig" kubectl get nodes --all-namespaces --watch
```

## Demo 3: Install ServiceTemplate into single Cluster

Expand All @@ -159,7 +170,6 @@ In order to run this demo you need `Demo 1` and/or `Demo 1 & 2` already complete
make install-servicetemplate-demo-ingress-nginx-4.11.0
```
2. Apply ServiceTemplate to cluster:
```
make apply-aws-test1-0.0.2-ingress
Expand All @@ -168,7 +178,7 @@ In order to run this demo you need `Demo 1` and/or `Demo 1 & 2` already complete
```
make apply-aws-test1-0.0.1-ingress
```
This applies either the [0.0.1-ingress.yaml](managedClusters/aws/0.0.1-ingress.yaml) or [0.0.2-ingress.yaml](managedClusters/aws/0.0.2-ingress.yaml) yaml template. For simplicity the yamls are a full `ManagedCluster` Object and not just a diff from the original cluster. The command output will show you a diff that explains that the only thing that actually has chnaged is the `serviceTemplate` key
This applies either the [0.0.1-ingress.yaml](managedClusters/aws/0.0.1-ingress.yaml) or [0.0.2-ingress.yaml](managedClusters/aws/0.0.2-ingress.yaml) yaml template. For simplicity the yamls are a full `ManagedCluster` Object and not just a diff from the original cluster. The command output will show you a diff that explains that the only thing that actually has changed is the `serviceTemplate` key
3. Show that ingress-nginx is installed in the managed cluster:
Expand All @@ -189,7 +199,7 @@ This Demo shows the capability of 2A to install a ServiceTemplate into multiple
## Demo 7: Test new clusterTemplate as 2A Admin, then approve them in separate Namespace
## Demo 8: Use newwly approved Namespace in separate Namespace
## Demo 8: Use newly approved Namespace in separate Namespace
## Demo 9: Approve ServiceTemplate in separate Namespace
Expand Down
2 changes: 1 addition & 1 deletion setup/helmRepository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ spec:
interval: 10m0s
provider: generic
type: oci
url: oci://ghcr.io/mirantis/2a-demo/charts
url: oci://ghcr.io/mirantis/2a-demos/charts

0 comments on commit b3c054a

Please sign in to comment.