change build process

This commit is contained in:
Bartal Læarsson
2025-03-03 13:28:38 +00:00
parent f18e328bf2
commit 2a1facd90f
3 changed files with 16 additions and 42 deletions
+7 -9
View File
@@ -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
+4 -4
View File
@@ -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
+5 -29
View File
@@ -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