| Server IP : 104.129.129.72 / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : answe8064 ( 1002) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /opt/installer/services/ |
Upload File : |
#!/bin/bash
if [ -f "include/startup.sh" ]; then
. include/startup.sh
elif [ -f "../include/startup.sh" ]; then
. ../include/startup.sh
fi
echo "Downloading docker-machine from source repository" | log
base=https://github.com/docker/machine/releases/download/v0.16.0
curl -L --max-redirs 3 --retry 3 --retry-connrefused --retry-delay 2 --max-time 30 --url $base/docker-machine-$(uname -s)-$(uname -m) >/tmp/docker-machine
waitOrStop 0 "File not downloaded from Github"
echo "Installing docker-machine in /usr/local/bin/docker-machine" | log
install /tmp/docker-machine /usr/local/bin/docker-machine
waitOrStop 0 "Failed to install application binary to system"
echo "Downloading docker-machine bash auto-complete strings" | log
mkdir -p /tmp/complete
cd /tmp/complete
base=https://raw.githubusercontent.com/docker/machine/v0.16.0
for i in docker-machine-prompt.bash docker-machine-wrapper.bash docker-machine.bash
do
# wget "$base/contrib/completion/bash/${i}" -P /etc/bash_completion.d
curl --url $base/contrib/completion/bash/${i} -LO --max-redirs 3 --retry 3 --retry-connrefused --retry-delay 2 --max-time 30
waitOrStop 0 "Auto complete failed to install"
done
mv /tmp/complete/* /etc/bash_completion.d/
echo "Adding CWM/Kamatera to auto-complete" | log
sed -i 's/amazonec2/kamatera\namazonec2/' /etc/bash_completion.d/docker-machine.bash
echo "Downloading CWM/Kamatera docker-machine-driver" | log
base=https://github.com/OriHoch/docker-machine-driver-kamatera/releases/download/v1.0.5/docker-machine-driver-kamatera_v1.0.5_linux_amd64.tar.gz
# curl -o /tmp/docker-machine-driver-kamatera.tar.gz $base -L
curlDownload $base /tmp/docker-machine-driver-kamatera.tar.gz
waitOrStop 0 "Kamatera driver not downloaded from Github"
tar -xvf /tmp/docker-machine-driver-kamatera.tar.gz -C /tmp/
waitOrStop 0 "Failed to extract Kamatera driver archive"
chmod +x /tmp/docker-machine-driver-kamatera
mv /tmp/docker-machine-driver-kamatera /usr/local/bin/
descriptionAppend "Usage: docker-machine create {machine_name} \\"
descriptionAppend "--driver kamatera \\"
descriptionAppend "--kamatera-api-client-id {APIClientId} \\"
descriptionAppend "--kamatera-api-secret {APIsecretId}"
descriptionAppend " "
descriptionAppend "Optional:"
descriptionAppend "--kamatera-datacenter {datacenter Code, default: EU}"
descriptionAppend "--kamatera-billing {billing cycle, default: hourly}"
descriptionAppend "--kamatera-cpu {cpu type, default: 1B}"
descriptionAppend "--kamatera-ram {ram in MB, default: 512}"
descriptionAppend "--kamatera-disk-size {disk size in GB, default: 10}"
descriptionAppend "--kamatera-image {server OS Image, default: ubuntu_server_20.04_64-bit}"
descriptionAppend " "
descriptionAppend "You can also set API ClientID/Secret:"
descriptionAppend "export KAMATERA_API_CLIENT_ID={APIClientId}"
descriptionAppend "export KAMATERA_API_SECRET={APISercretId}"
tagScript success
exit 0