From 39ec0f04a8735c1040aabc97c343005d7ffe3e35 Mon Sep 17 00:00:00 2001 From: denis-tingaikin Date: Sat, 21 Dec 2024 01:48:40 +0300 Subject: [PATCH 1/2] add kind selfhost Signed-off-by: denis-tingaikin --- .github/workflows/main.yaml | 89 +++++++++++++++++++++++++ kube/QUICKSTART.md | 97 ++++++++++++++++++++++++++++ kube/README.md | 6 ++ kube/account/account-deployment.yaml | 5 ++ kube/mongodb/mongodb-deployment.yaml | 1 - kube/mongodb/mongodb-service.yaml | 4 +- 6 files changed, 199 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yaml create mode 100644 kube/QUICKSTART.md diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..63c93b3 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,89 @@ +name: ci + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + +jobs: + kind-selfhost: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + path: ${{ github.workspace }}/src/github.com/${{ github.repository }} + + - name: "Install kind" + run: | + [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 + # For ARM64 + [ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64 + chmod +x ./kind + sudo mv ./kind /usr/local/bin/kind + + - name: "Setup k8s cluster" + run: | + cat < [!NOTE] +> kind does not require kubectl, but you will not be able to perform some of the examples in our docs without it. To install kubectl see the upstream kubectl installation docs. + +## Install + +**macOS:** +```bash +# For Intel Macs +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-amd64 +# For M1 / ARM Macs +[ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-arm64 +chmod +x ./kind +mv ./kind /some-dir-in-your-PATH/kind +``` + +**Linux:** +```bash +# For AMD64 / x86_64 +[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 +# For ARM64 +[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64 +chmod +x ./kind +sudo mv ./kind /usr/local/bin/kind +``` + +## Setup cluster with port forwarding + +> [!NOTE] +> On the host computer, `localhost:80` should be accessible. + +```bash +cat < Date: Sat, 21 Dec 2024 01:51:14 +0300 Subject: [PATCH 2/2] fix broken link Signed-off-by: denis-tingaikin --- kube/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kube/README.md b/kube/README.md index 6116788..364ac02 100644 --- a/kube/README.md +++ b/kube/README.md @@ -6,7 +6,7 @@ This folder contains a sample configuration for Huly Kubernetes deployment. Requires a working kubernetes cluster with min one node. Each node should have min 2 vCPUs and 4GB of RAM. -if you don't have any k8s cluster, consider to use [kind setup](KIND.md). +If you don't have any k8s cluster, consider using the [kind setup](QUICKSTART.md). ## Check and update configuration