upctl is a tool for setting up local development environments using Kubernetes (via Helm) or Docker Compose
- 1. Dependencies
- 2. Installation
- 3. Create a configuration file
- 4. Login to the teleport server
- 5. Configure repository cache
- 6. Using with Kubernetes (default)
- 7. Using with Docker Compose
For Kubernetes mode:
- Docker Desktop or colima
- kubectl
- mysql-client
- awscli
For Docker Compose mode:
- Docker Engine
- Docker Compose
- mysql-client (if using database imports)
- awscli (if downloading database dumps from S3)
# Add the tap
brew tap uptime-labs/upctl
# Install upctl
brew install upctlVisit the releases page and download the upctl version for your operating system (e.g., Linux, macOS).
Make sure to download the correct version for your operating system.
upctl_0.x.x_linux_amd64for Intel-based GNU/Linuxupctl_0.x.x_linux_arm64for Arm-based GNU/Linuxupctl_0.x.x_darwin_amd64for intel-based macOSupctl_0.x.x_darwin_arm64for Arm-based macOS
cd ~/Downloads
sudo install -o root -g root -m 0755 upctl_0.8.0_linux_amd64 /usr/local/bin/upctlcd ~/Downloads
chmod +x upctl_0.8.0_darwin_amd64
sudo mv upctl_0.8.0_darwin_amd64 /usr/local/bin/upctlcp config/upctl.yaml ~/.upctl.yaml
cp -R config/overrides ~/.upctl/The configuration file supports both Kubernetes/Helm and Docker Compose configurations.
repositories:
- name: grafana
url: https://grafana.github.io/helm-charts
username: <username>
password: <password>Repository passwords are optional
tsh login --proxy=teleport.example.comFor Kubernetes/Helm mode:
upctl config repoIf you modify repositories, re-run the command to update the repositories cache.
upctl install grafana To install all packages defined in the configuration:
upctl install --allupctl import-dbupctl remove <package name>Add your Docker Compose services to the docker_compose section in your upctl.yaml:
docker_compose:
version: '3.8'
services:
loki:
image: grafana/loki:latest
ports:
- "3100:3100"
volumes:
- loki-data:/loki
command: -config.file=/etc/loki/local-config.yaml
restart: unless-stopped
networks:
- uptimelabs
grafana:
image: grafana/grafana:latest
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
restart: unless-stopped
networks:
- uptimelabs
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
loki-data:
driver: local
grafana-data:
driver: local
networks:
uptimelabs:
driver: bridgeTo install packages using Docker Compose instead of Kubernetes/Helm:
upctl install --docker grafanaTo install all Docker Compose services:
upctl install --docker --allManage your Docker Compose services:
# List available services (defined in your upctl.yaml)
upctl list
# Start a specific service (e.g., grafana)
# A service name is required if --all is not used.
upctl up grafana
# Start all services
upctl up --all
# Stop a specific service (e.g., grafana)
# A service name is required if --all is not used.
# Note: 'docker compose down' itself typically stops all services defined in the compose file.
# Specifying a service name with 'upctl down <service_name>' might be handled by upctl
# to only target specific actions if possible, or the underlying 'docker compose down'
# command might ignore the service name and stop all services.
# Refer to 'upctl down --help' for the most current behavior.
upctl down grafana
# Stop all services
upctl down --all
# View logs for a specific service (e.g., grafana)
# A service name is required if --all is not used.
upctl logs grafana
# View logs for all services
upctl logs --allImport a database into a Docker MySQL container (ensure the MySQL service is defined in your Docker Compose setup within upctl.yaml):
upctl import-dbNote: The --docker flag for import-db might be legacy if the global context determines Docker Compose usage. Verify with upctl import-db --help.
TODO: Clarify if --docker is still needed for import-db or if context implies it.