Skip to content

Latest commit

 

History

History
149 lines (101 loc) · 3.19 KB

File metadata and controls

149 lines (101 loc) · 3.19 KB

DMT Installation Script

This directory contains the installation script for DMT (Deckhouse Module Tool).

Quick Install

Using curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)"

Using wget

sh -c "$(wget -qO- https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)"

Installation Options

Install Specific Version

sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)" "" --version v1.0.0

Install to Custom Directory

sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)" "" --install-dir ~/bin

Force Reinstall

sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)" "" --force

Non-Interactive Installation

sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)" "" --unattended

Environment Variables

The installer respects the following environment variables:

  • VERSION - Version to install (default: latest)
  • INSTALL_DIR - Installation directory (default: /usr/local/bin)
  • REPO - GitHub repository (default: deckhouse/dmt)
  • FORCE - Force reinstall if already exists (yes/no)

Example with Environment Variables

VERSION=v1.0.0 INSTALL_DIR=~/bin sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)"

Manual Installation

  1. Download the script:

    wget https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh
  2. Make it executable:

    chmod +x install.sh
  3. Run the script:

    ./install.sh --version v1.0.0 --install-dir ~/bin

Supported Platforms

The installer supports the following platforms:

  • Linux

    • amd64 (x86_64)
    • arm64 (aarch64)
  • macOS

    • amd64 (x86_64)
    • arm64 (Apple Silicon)

Requirements

The following tools must be available:

  • curl or wget - for downloading the binary
  • tar - for extracting the archive
  • sudo - for installing to system directories (if needed)

Troubleshooting

Permission Denied

If you get a permission denied error, try:

  1. Install to a user-writable directory:

    sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)" "" --install-dir ~/bin
  2. Or use sudo:

    sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/deckhouse/dmt/main/tools/install.sh)"

Binary Not in PATH

If dmt is not found after installation, add the installation directory to your PATH:

# For bash/zsh
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# For custom installation directory
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Unsupported Platform

If you see "Unsupported platform" error, you may need to build from source:

git clone https://github.com/deckhouse/dmt.git
cd dmt
go build -o dmt ./cmd/dmt

Uninstallation

To uninstall DMT, simply remove the binary:

sudo rm /usr/local/bin/dmt

Or if installed to a custom directory:

rm ~/bin/dmt