No description
Find a file
2025-10-14 18:05:46 +01:00
app Merge branch 'feature/enhanced-configuration' 2025-09-05 17:21:19 +01:00
config update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
docs Add Google Cloud K3s infrastructure support 2025-10-02 15:41:50 +01:00
files/ctl chore/test-local-dev-builds (#2) 2025-07-16 18:50:16 +02:00
gcloud/tf Merge branch 'feat/mvk-gcloud-template' of ssh://codeberg.org/headshed/infctl-cli into feat/mvk-gcloud-template 2025-10-14 18:05:46 +01:00
k8s-manifests chore/test-local-dev-builds (#2) 2025-07-16 18:50:16 +02:00
logger update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
pipelines update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
scripts fix: Update cert-manager 2025-10-08 15:03:24 +01:00
templates changed app to use json config for pipeline steps 2025-07-14 16:34:15 +01:00
vagrant/dev/ubuntu feat: env INSTALL_LONGHORN 2025-10-10 13:33:11 +01:00
.env.gcloud-example Add Google Cloud K3s infrastructure support 2025-10-02 15:41:50 +01:00
.envrc.example update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
.gitignore Add Google Cloud K3s infrastructure support 2025-10-02 15:41:50 +01:00
build.sh update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
go.mod update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
go.sum update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
install.sh bump version 2025-09-05 19:11:29 +02:00
LICENSE initial commit 2025-07-09 12:09:12 +01:00
main.go update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
main_test.go update: Added Longhorn installation process and updated memory allocation for VMs 2025-09-05 16:49:06 +01:00
pipeline.json.example chore/test-local-dev-builds (#2) 2025-07-16 18:50:16 +02:00
README.md Add Google Cloud K3s infrastructure support 2025-10-02 15:41:50 +01:00

infctl-cli

infctl-cli is a Go command-line tool for orchestrating deployment pipelines using shell scripts and Kubernetes manifests. The tool is configured via JSON files and executes tasks as defined in a pipeline configuration.

Project Structure

infctl-cli/
├── main.go                # Application entry point
├── go.mod                 # Go module definition
├── app/                   # Core application logic
│   ├── app.go             # Pipeline orchestration and state management
│   └── k8s.go             # Kubernetes operations
├── config/                # Configuration management
│   ├── base.go            # Base configuration handling
│   └── project.go         # Project configuration handling
├── docs/                  # Documentation 
│   ├── API_REFERENCE.md   # API reference
│   └── CONFIG_SCHEMA.md   # Config schema
├── scripts/               # Shell scripts executed by the CLI
├── k8s-manifests/         # Kubernetes manifests
├── templates/             # Template files
└── files/                 # Static configuration files

Configuration Files

Three JSON files are used:

  • base.json: Base configuration (e.g., projects_directory, images, environment file path)
  • config.json: Project-specific configuration (e.g., project name, directory, URLs, port)
  • pipeline.json: Defines the sequence of scripts and manifests to execute

Example configuration files are provided as .example files in the repository.

Usage

Build the CLI:

go mod download
go build -o infctl-cli .

Run the CLI with a pipeline file:

./infctl-cli --deployment-file pipeline.json
# or
./infctl-cli -f pipeline.json

The CLI will:

  1. Load base and project configuration
  2. Initialize SQLite database for state management
  3. Execute the pipeline defined in the JSON file
  4. Run scripts from the scripts/ directory
  5. Apply Kubernetes manifests from the k8s-manifests/ directory

Scripts

Shell scripts in scripts/ are executed as defined in the pipeline configuration. Scripts are responsible for infrastructure setup, secret creation, configmap generation, and other deployment tasks. The pipeline JSON determines the order and parameters for each script.

Kubernetes Manifests

Manifests in k8s-manifests/ are applied using kubectl and kustomize. The pipeline configuration specifies which manifests to apply and in what order.

Testing

Run tests with:

go test ./... -v

License

This project is licensed under the GNU General Public License v3.0. See LICENSE for details.