- Go 1.26+
- ETCD v3.6
- Git
- Task
# For Ubuntu/Debian
sudo apt-get update
sudo apt-get install golang-1.26
# For Arch Linux
sudo pacman -S go
# Verify installation
go version# Using the official installation script
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
# Verify installation
task --version# For Ubuntu/Debian
sudo apt-get install etcd
# For Arch Linux
sudo pacman -S etcd
# Start ETCD service
sudo systemctl start etcd
sudo systemctl enable etcd
# Verify ETCD is running
etcdctl endpoint health# Clone repository
git clone https://github.com/keboola/keboola-as-code
cd keboola-as-code
# Install dependencies
go mod download
go mod vendor
# Create environment file
cp .env.dist .envEdit .env file with your settings:
TEST_KBC_TMP_DIR=/tmp
TEST_KBC_PROJECTS_FILE=~/keboola-as-code/projects.jsonCreate projects.json with your project configuration:
[
{
"host": "connection.keboola.com",
"project": 1234,
"stagingStorage": "s3",
"backend": "snowflake",
"token": "<your-token>",
"legacyTransformation": false
}
]# Run tests
task tests
# Build local CLI binary
task build-local
# Run specific service (e.g., templates API)
export TEMPLATES_STORAGE_API_HOST=connection.keboola.com
go run cmd/templates-api/main.go
# Run stream service
export STREAM_STORAGE_API_HOST=connection.keboola.com
go run cmd/stream-api/main.gotask godoc
# Access at http://localhost:6060/pkg/github.com/keboola/keboola-as-code/?m=all# Verbose output
TEST_VERBOSE=true go test -race -v ./...
# HTTP client verbose
TEST_HTTP_CLIENT_VERBOSE=true go test -race -v ./...
# ETCD operations verbose
ETCD_VERBOSE=true go test -race -v ./...-
ETCD Connection Issues
- Verify ETCD is running:
systemctl status etcd - Check ETCD logs:
journalctl -u etcd - Ensure correct permissions on ETCD data directory
- Verify ETCD is running:
-
Go Module Issues
- Run
go mod tidyto clean up dependencies - Run
go mod vendorto update vendor directory - Check
GOPATHis set correctly
- Run
-
Permission Issues
- Ensure correct ownership of project files
- Check ETCD data directory permissions
- Verify write permissions in
/tmpdirectory
When running locally:
- Templates API: http://localhost:8000
- Stream Service: http://localhost:8001
- Apps Proxy: http://localhost:8002
- Metrics endpoints:
- Templates: :9000
- Stream: :9001
- Apps Proxy: :9002