Instantly share code, notes, and snippets.

Embed
What would you like to do?
ConvoySetup
# Usage curl -#L https://git.io/convoy | sudo bash
CONVOY_VERSION=v0.5.0
cd /tmp
echo "Downloading convoy ..."
wget -q https://github.com/rancher/convoy/releases/download/$CONVOY_VERSION/convoy.tar.gz -O convoy.tar.gz
echo "Installing convoy ..."
tar xf convoy.tar.gz
cp -v convoy/convoy convoy/convoy-pdata_tools /usr/local/bin/
mkdir -vp /etc/docker/plugins/
echo "unix:///var/run/convoy/convoy.sock" > /etc/docker/plugins/convoy.spec
rm -r convoy.tar.gz convoy
VFS_PATH=$1
echo "Installing convoy service..."
sudo cat > /etc/systemd/system/convoy.service <<EOL
[Unit]
Description=Convoy Daemon
Requires=docker.service
[Service]
ExecStart=/usr/local/bin/convoy daemon --drivers vfs --driver-opts vfs.path=${VFS_PATH:/mnt}
[Install]
WantedBy=multi-user.target
EOL
systemctl daemon-reload
systemctl enable convoy
systemctl start convoy
echo "Convoy daemon installed & running"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment