Development Guide
Guide for contributing to and developing Simple VPS Provisioner.
Table of Contents
- Development Setup
- Project Structure
- Building from Source
- Code Architecture
- Contributing
- Testing
- Release Process
Development Setup
Prerequisites
- Go 1.21+ - Install Go
- Git - For version control
- Debian or Ubuntu VM - For testing (recommended)
- Text editor - VS Code, GoLand, Vim, etc.
Clone Repository
git clone https://github.com/willjackson/simple-vps-provisioner.git
cd simple-vps-provisioner
Install Dependencies
# Initialize Go modules
go mod tidy
# Verify dependencies
go mod verify
Build Development Version
# Simple build
go build -o svp
# Build with version
VERSION=$(git describe --tags --always)
go build -ldflags="-X main.version=${VERSION}" -o svp
# Test
./svp --version
Project Structure
svp/
├── .github/workflows/ # CI/CD pipelines
│ ├── release.yml # Automated releases
│ └── test.yml # Build and test
│
├── cmd/ # Command implementations
│ ├── setup.go # Full provisioning logic
│ ├── verify.go # Configuration verification
│ ├── update.go # Self-update logic
│ └── php_update.go # PHP version updates
│
├── pkg/ # Core packages
│ ├── cms/ # CMS-specific logic
│ ├── config/ # Configuration management
│ ├── database/ # Database operations
│ ├── ssl/ # SSL/TLS operations
│ ├── system/ # System-level operations
│ ├── updater/ # Self-update functionality
│ ├── utils/ # Utility functions
│ └── web/ # Web server operations
│
├── types/ # Shared type definitions
├── docs/ # GitHub Pages documentation
├── main.go # CLI entry point
└── *.sh # Build and install scripts
See full structure details in Project Architecture.
Building from Source
Development Build
go build -o svp
Build All Platforms
VERSION=1.0.30 ./build-release.sh
Install Locally
sudo bash install.sh
Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/my-feature) - Make changes with clear commits
- Test on Debian/Ubuntu
- Push and create pull request
See full contributing guidelines for details.
View Complete Development Guide →
| ← Back to Home | Documentation → |