Kubernetes - Installation via Script
The script accepts several optional parameters to customize the installation process:
--os=<os>
: Specify the operating system (default: detected automatically).
--version=<version>
: Specify the version to install (default: latest).
--docsdir=<docsdir>
: Specify the directory for documentation (default: current directory).
--tmpdir=<tmpdir>
: Specify the temporary directory for downloads (default: /tmp/scopearctl ).
--installdir=<installdir>
: Specify the installation directory (default: /usr/local/bin).
--nodocs
: Skip downloading and setting up documentation.
--nodownload
: Skip downloading the binary and only perform installation steps.
Example Command
curl -sSL <https://release.scopear.com/scopearctl/install> | sh -s -- --version=1.0.0 --installdir=/opt/scopear
Detailed Script Steps
Validation: This checks whether the operating system is Linux or macOS. If not, it exits with an error.
Download: This function constructs the download URL based on the specified version and channel and then downloads the archive to the temporary directory.
Checksum Verification: If checksum verification is enabled, the script downloads the checksum file and verifies the integrity of the downloaded archive.
Extraction: The downloaded archive is extracted to the temporary directory.
Documentation: If documentation setup is enabled, the script downloads the documentation files to the specified directory.
Installation: The binary is moved to the specified installation directory, and execution permissions are set.
Cleanup: Temporary files and directories are removed.
Example Install Scenarios
Install the Latest Version:
curl -sSL <https://release.scopear.com/scopearctl/install> | sh
Install a Specific Version:
curl -sSL <https://release.scopear.com/scopearctl/install> | sh -s -- --version=3.37.2
Install Without Documentation:
curl -sSL <https://release.scopear.com/scopearctl/install> | sh -s -- --nodocs
Install to Custom Directories:
curl -sSL <https://release.scopear.com/scopearctl/install> | sh -s -- \\ --installdir=/opt/scopearctl \\ --docsdir=/opt/scopearctl/docs \\ --tmpdir=/opt/scopearctl/tmp