From b72dfb2f153d8a4f8605d944f2992994cc8a0411 Mon Sep 17 00:00:00 2001 From: ktatarnikov Date: Wed, 3 Dec 2025 11:36:19 +0100 Subject: [PATCH 1/4] EDGE-372 removing unnecessary files --- docs/.vitepress/config.mts | 2 +- docs/{development/index.md => concepts.md} | 0 docs/concepts/index.md | 1 - docs/usage/index.md | 0 4 files changed, 1 insertion(+), 2 deletions(-) rename docs/{development/index.md => concepts.md} (100%) delete mode 100644 docs/concepts/index.md delete mode 100644 docs/usage/index.md diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 793d01b..0c204f7 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -24,7 +24,7 @@ export default withMermaid({ nav: [ { text: 'Home', link: '/' }, { text: 'Concepts', link: '/concepts' }, - { text: 'Usage', link: '/usage' }, + { text: 'Usage', link: '/usage/installation' }, ], editLink: { diff --git a/docs/development/index.md b/docs/concepts.md similarity index 100% rename from docs/development/index.md rename to docs/concepts.md diff --git a/docs/concepts/index.md b/docs/concepts/index.md deleted file mode 100644 index 8b13789..0000000 --- a/docs/concepts/index.md +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/usage/index.md b/docs/usage/index.md deleted file mode 100644 index e69de29..0000000 From 5af4e5db2fac716a45879ef50f0a24b3bd568d51 Mon Sep 17 00:00:00 2001 From: ktatarnikov Date: Wed, 3 Dec 2025 11:51:13 +0100 Subject: [PATCH 2/4] EDGE-372 docs: development setup --- docs/development/setup.md | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/docs/development/setup.md b/docs/development/setup.md index e69de29..dee1a16 100644 --- a/docs/development/setup.md +++ b/docs/development/setup.md @@ -0,0 +1,58 @@ +# Development + +## **Dependencies** + +Requirements: + +- Docker +- [Kind cluster](https://kind.sigs.k8s.io/) + +## Install Kind clusters + + The command below will create two clusters, installs calico plugin and configures BGP peering between them. + + ```sh + ./config/generator/env/clusters.sh create + ``` + +## Run local controllers from repo + + TBD + + +## Run containerized versions via helm charts + +1. Generate test cluster configuration using script [here](https://github.com/HIRO-MicroDataCenters-BV/anyapplication-controller/tree/main/config/generator) + + The command below will generate development configuration from ./config-dev.yaml file for two clusters - kind-cluster1 and kind-cluster2. + + ```sh + ./generate.sh create-config ./config-dev.yaml ./target + ``` + + Note that the script will generate keys for all clusters. New ones are generated on every call. + +2. Execute install scripts for all clusters: + + ```sh + + # kind-kind-cluster1 + ./target/kind-kind-cluster1/anyapplication-install.sh + ./target/kind-kind-cluster1/mesh-install.sh + ./target/kind-kind-cluster1/placement-install.sh + + # kind-kind-cluster2 + ./target/kind-kind-cluster2/anyapplication-install.sh + ./target/kind-kind-cluster2/mesh-install.sh + ./target/kind-kind-cluster2/placement-install.sh + + ``` + +## Remove Kind clusters + + The command below will remove two kind clusters. + + ```sh + ./config/generator/env/clusters.sh delete + ``` + From 6e06b3a8e1ba34ccc6b50c7e5a592ca7f5e36916 Mon Sep 17 00:00:00 2001 From: ktatarnikov Date: Wed, 3 Dec 2025 11:58:43 +0100 Subject: [PATCH 3/4] EDGE-372 kind-cluster configurations --- .gitignore | 2 - config/anyapplication/kind-kind-cluster1.yaml | 77 +++++++++++++++++++ config/anyapplication/kind-kind-cluster2.yaml | 77 +++++++++++++++++++ 3 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 config/anyapplication/kind-kind-cluster1.yaml create mode 100644 config/anyapplication/kind-kind-cluster2.yaml diff --git a/.gitignore b/.gitignore index 2dc67d8..31dee01 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,6 @@ go.work /internal/.DS_Store /examples/secret2.yaml /examples/secret1.yaml -/config/anyapplication/kind-kind-cluster2.yaml -/config/anyapplication/kind-kind-cluster1.yaml /config/anyapplication/emdc2.yaml /config/anyapplication/emdc1.yaml node_modules/ diff --git a/config/anyapplication/kind-kind-cluster1.yaml b/config/anyapplication/kind-kind-cluster1.yaml new file mode 100644 index 0000000..4138508 --- /dev/null +++ b/config/anyapplication/kind-kind-cluster1.yaml @@ -0,0 +1,77 @@ +peers: + - url: localhost:18080 +runtime: + zone: kind-kind-cluster1 + operationalPollDuration: 5s + syncPollDuration: 10s + chartVersionPollDuration: 60s + defaultSyncTimeout: 180s + defaultUndeployTimeout: 180s +api: + bind_address: :19092 +cache: + excludes: + - projectcalico.org/FelixConfiguration + - projectcalico.org/GlobalNetworkPolicy + - projectcalico.org/KubeControllersConfiguration + - projectcalico.org/NetworkSet + - projectcalico.org/CalicoNodeStatus + - projectcalico.org/NetworkPolicy + - projectcalico.org/StagedNetworkPolicy + - projectcalico.org/HostEndpoint + - projectcalico.org/Profile + - projectcalico.org/BGPPeer + - projectcalico.org/BGPConfiguration + - projectcalico.org/IPReservation + - projectcalico.org/BGPFilter + - projectcalico.org/StagedGlobalNetworkPolicy + - projectcalico.org/StagedKubernetesNetworkPolicy + - projectcalico.org/IPPool + - projectcalico.org/Tier + - projectcalico.org/BlockAffinity + - projectcalico.org/ClusterInformation + - projectcalico.org/IPAMConfiguration + - projectcalico.org/GlobalNetworkSet + - crd.projectcalico.org/BGPConfiguration + - crd.projectcalico.org/HostEndpoint + - crd.projectcalico.org/GlobalNetworkSet + - crd.projectcalico.org/KubeControllersConfiguration + - crd.projectcalico.org/CalicoNodeStatus + - crd.projectcalico.org/StagedKubernetesNetworkPolicy + - crd.projectcalico.org/BlockAffinity + - crd.projectcalico.org/GlobalNetworkPolicy + - crd.projectcalico.org/IPAMConfig + - crd.projectcalico.org/IPPool + - crd.projectcalico.org/IPReservation + - crd.projectcalico.org/StagedNetworkPolicy + - crd.projectcalico.org/BGPPeer + - crd.projectcalico.org/IPAMBlock + - crd.projectcalico.org/ClusterInformation + - crd.projectcalico.org/IPAMHandle + - crd.projectcalico.org/NetworkSet + - crd.projectcalico.org/StagedGlobalNetworkPolicy + - crd.projectcalico.org/NetworkPolicy + - crd.projectcalico.org/Tier + - crd.projectcalico.org/BGPFilter + - crd.projectcalico.org/FelixConfiguration + - operator.tigera.io/Installation + - operator.tigera.io/APIServer + - operator.tigera.io/ManagementClusterConnection + - operator.tigera.io/TigeraStatus + - operator.tigera.io/Goldmane + - operator.tigera.io/GatewayAPI + - operator.tigera.io/ImageSet + - operator.tigera.io/Whisker + - policy.networking.k8s.io/BaselineAdminNetworkPolicy + - policy.networking.k8s.io/AdminNetworkPolicy + - dcp.hiro.io/anyapplication +logging: + default_level: info + components: + SyncManager: info + GitOpsEngine: info + ClusterCache: info + Controller: info + Jobs: info + API: info + Helm: info diff --git a/config/anyapplication/kind-kind-cluster2.yaml b/config/anyapplication/kind-kind-cluster2.yaml new file mode 100644 index 0000000..c56034c --- /dev/null +++ b/config/anyapplication/kind-kind-cluster2.yaml @@ -0,0 +1,77 @@ +peers: + - url: localhost:18080 +runtime: + zone: kind-kind-cluster2 + operationalPollDuration: 5s + syncPollDuration: 10s + chartVersionPollDuration: 60s + defaultSyncTimeout: 180s + defaultUndeployTimeout: 180s +api: + bind_address: :29092 +cache: + excludes: + - projectcalico.org/FelixConfiguration + - projectcalico.org/GlobalNetworkPolicy + - projectcalico.org/KubeControllersConfiguration + - projectcalico.org/NetworkSet + - projectcalico.org/CalicoNodeStatus + - projectcalico.org/NetworkPolicy + - projectcalico.org/StagedNetworkPolicy + - projectcalico.org/HostEndpoint + - projectcalico.org/Profile + - projectcalico.org/BGPPeer + - projectcalico.org/BGPConfiguration + - projectcalico.org/IPReservation + - projectcalico.org/BGPFilter + - projectcalico.org/StagedGlobalNetworkPolicy + - projectcalico.org/StagedKubernetesNetworkPolicy + - projectcalico.org/IPPool + - projectcalico.org/Tier + - projectcalico.org/BlockAffinity + - projectcalico.org/ClusterInformation + - projectcalico.org/IPAMConfiguration + - projectcalico.org/GlobalNetworkSet + - crd.projectcalico.org/BGPConfiguration + - crd.projectcalico.org/HostEndpoint + - crd.projectcalico.org/GlobalNetworkSet + - crd.projectcalico.org/KubeControllersConfiguration + - crd.projectcalico.org/CalicoNodeStatus + - crd.projectcalico.org/StagedKubernetesNetworkPolicy + - crd.projectcalico.org/BlockAffinity + - crd.projectcalico.org/GlobalNetworkPolicy + - crd.projectcalico.org/IPAMConfig + - crd.projectcalico.org/IPPool + - crd.projectcalico.org/IPReservation + - crd.projectcalico.org/StagedNetworkPolicy + - crd.projectcalico.org/BGPPeer + - crd.projectcalico.org/IPAMBlock + - crd.projectcalico.org/ClusterInformation + - crd.projectcalico.org/IPAMHandle + - crd.projectcalico.org/NetworkSet + - crd.projectcalico.org/StagedGlobalNetworkPolicy + - crd.projectcalico.org/NetworkPolicy + - crd.projectcalico.org/Tier + - crd.projectcalico.org/BGPFilter + - crd.projectcalico.org/FelixConfiguration + - operator.tigera.io/Installation + - operator.tigera.io/APIServer + - operator.tigera.io/ManagementClusterConnection + - operator.tigera.io/TigeraStatus + - operator.tigera.io/Goldmane + - operator.tigera.io/GatewayAPI + - operator.tigera.io/ImageSet + - operator.tigera.io/Whisker + - policy.networking.k8s.io/BaselineAdminNetworkPolicy + - policy.networking.k8s.io/AdminNetworkPolicy + - dcp.hiro.io/anyapplication +logging: + default_level: info + components: + SyncManager: info + GitOpsEngine: info + ClusterCache: info + Controller: info + Jobs: info + API: info + Helm: info From faaf35a8f87fc4fa74ea0f2ef27c2dca2180fc0c Mon Sep 17 00:00:00 2001 From: ktatarnikov Date: Wed, 3 Dec 2025 12:16:32 +0100 Subject: [PATCH 4/4] EDGE-372 development docs --- docs/development/setup.md | 64 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/docs/development/setup.md b/docs/development/setup.md index dee1a16..60fc856 100644 --- a/docs/development/setup.md +++ b/docs/development/setup.md @@ -17,8 +17,70 @@ Requirements: ## Run local controllers from repo - TBD +### Run AnyApplication Controller (kind-cluster1) + Checkout and build project: + + ```sh + # Check out repository + git clone https://github.com/HIRO-MicroDataCenters-BV/anyapplication-controller.git + cd anyapplication-controller/ + + # Build project + make build + ``` + + Run Controller: + + ```sh + # install CRDS + kubectl config use-context kind-kind-cluster1 + make install + + # run controller + make run-kind-kind-cluster1 + ``` + +### Run Mesh Controller (kind-cluster1) + + Install [cargo and rust](https://rust-lang.org/tools/install/) and build project: + + ```sh + # Check out repository + git clone https://github.com/HIRO-MicroDataCenters-BV/mesh-controller.git + cd mesh-controller/ + + # build project + cargo build + ``` + + Run controller: + ```sh + # install CRDS + kubectl --context kind-kind-cluster1 apply -f ./charts/mesh-controller/crds/meshpeer.yaml + + # run controller + cargo run -- -c ./env/kind-cluster1.yaml + ``` + +### Run Placement Controller (kind-cluster1) + + Install [uv](https://github.com/astral-sh/uv) and build project + + ```sh + # Check out repository + git clone https://github.com/HIRO-MicroDataCenters-BV/placement-controller.git + cd placement-controller/ + + # build project + uv build + ``` + + Run controller: + + ```sh + uv run python -m placement_controller.main --config ./etc/kind-kind-cluster1.yaml + ``` ## Run containerized versions via helm charts