From 2a1facd90f1a6a56cd33c44b888214eecf4527e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartal=20L=C3=A6arsson?= Date: Mon, 3 Mar 2025 13:28:38 +0000 Subject: [PATCH] change build process --- README.md | 16 ++++++-------- ansible/inventories/kubernetes.yml | 8 +++---- cli/README.md | 34 +++++------------------------- 3 files changed, 16 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index 01d1214..2f571ae 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ # Kubernetes Local Development Environment +Only tested on Ubuntu-24.04 wsl ## Quick Start ```bash # Option 1: Using CLI tool (recommended) -./cli/install.sh # Install the CLI tool -provision # Run interactive provisioning +./cli/build.sh # build CLI tool in project +provision-cli provision # Run interactive provisioning in project root # Option 2: Using scripts directly ./scripts/provision-kubernetes.sh # Create Kubernetes cluster @@ -34,15 +35,12 @@ This project provides tools to create and manage local Kubernetes development en The CLI tool provides a user-friendly interface for managing your environments: ```bash -# Install CLI tool -./cli/install.sh - -# The installer adds the binary to ~/.local/bin -# Make sure this is in your PATH -export PATH="$PATH:$HOME/.local/bin" +# build CLI tool +./cli/build.sh +# The installer adds the binary to project root # Run the tool -provision +provision-cli provision ``` [CLI Documentation](./cli/README.md) - Detailed CLI usage and development diff --git a/ansible/inventories/kubernetes.yml b/ansible/inventories/kubernetes.yml index c86d110..bf4f85a 100644 --- a/ansible/inventories/kubernetes.yml +++ b/ansible/inventories/kubernetes.yml @@ -6,15 +6,15 @@ all: control_plane: hosts: controlplane: - ansible_host: 10.203.146.85 + ansible_host: 10.57.249.249 workers: hosts: node01: - ansible_host: 10.203.146.146 + ansible_host: 10.57.249.112 node02: - ansible_host: 10.203.146.50 + ansible_host: 10.57.249.123 node03: - ansible_host: 10.203.146.103 + ansible_host: 10.57.249.58 vars: ansible_user: ubuntu ansible_become: yes diff --git a/cli/README.md b/cli/README.md index 6cbd56c..cd5828f 100644 --- a/cli/README.md +++ b/cli/README.md @@ -6,37 +6,13 @@ A user-friendly CLI tool for provisioning and managing infrastructure components > **Important**: This tool has only been tested on Ubuntu 24.04 and WSL Ubuntu 24.04. There is no guarantee it will work on other operating systems. -### Quick Install (Ubuntu) +### Quick install/build (Ubuntu) ```bash -./install.sh - -# Make sure ~/.local/bin is in your PATH -export PATH="$PATH:$HOME/.local/bin" +./build.sh ``` -This installs the CLI tool to `~/.local/bin`. You may need to add this directory to your PATH if it's not already there. To make this change permanent, add the export line to your `~/.bashrc` or `~/.profile`. - -### Manual Install - -Find the appropriate binary for your platform in the `bin` directory: - -```bash -# Create ~/.local/bin directory if it doesn't exist -mkdir -p ~/.local/bin - -# Example for Linux/AMD64 -cp bin/linux_amd64/provision ~/.local/bin/ -chmod +x ~/.local/bin/provision - -# Add to PATH if needed -export PATH="$PATH:$HOME/.local/bin" -``` - -Available binaries: -- Linux: `bin/linux_amd64/provision` or `bin/linux_arm64/provision` -- macOS: `bin/darwin_amd64/provision` or `bin/darwin_arm64/provision` -- Windows: `bin/windows_amd64/provision.exe` +This builds the CLI tool to project root. ## Usage @@ -110,9 +86,9 @@ Cleanup completed successfully To modify or extend the CLI tool: 1. Make changes to the Go code -2. Build binaries for all platforms: +2. Build binary: ```bash - ./scripts/build-release.sh + ./build.sh ``` ### Adding New Commands