Installation
Steps:
- Install the CloudBD disk driver and CLI
- Deploy your CloudBD credentials.json
- Create a storage remote config file
Install CloudBD Software
CloudBD provides signed software repositories (apt and yum) with the latest version of the CloudBD software. Follow the steps for your specific Linux distro:
Ubuntu Bionic (18.04 LTS) and Ubuntu Xenial (16.04 LTS)
Download CloudBD's package signing key:
sudo curl -sSfo /usr/share/keyrings/cloudbd-keyring.gpg \ https://repo.cloudbd.io/cloudbd-keyring.gpg
Add CloudBD's repo to apt sources:
sudo curl -sSfo /etc/apt/sources.list.d/cloudbd.list \ https://repo.cloudbd.io/$(lsb_release -cs)/cloudbd.list
Refresh apt's package list
sudo apt-get update
Install CloudBD disk driver and CloudBD CLI
sudo apt-get install -y cbd-client
Amazon Linux AMI (2018.03 or later) and Amazon Linux 2
Add CloudBD's repo to yum
sudo curl -sSfo /etc/yum.repos.d/cloudbd.repo \ https://repo.cloudbd.io/$(rpm --eval %{?dist} | cut -c2-)/cloudbd.repo
Update packages
sudo yum update
Install CloudBD disk driver and CloudBD CLI
sudo yum install -y cbd-client
Deploy Credentials
Your CloudBD credentials.json file is required to create or delete CloudBD disks or to attach CloudBD disks to a server. The credentials can be downloaded from the CloudBD Management Site Credentials page. Click the Get Credentials button to download a copy of your credentials.json file (see Credentials for more info).
Upload your credentials
Upload a copy of your CloudBD account credentials to /etc/cloudbd/credentials.json on the server.
Secure your Credentials
Change the credentials file ownership to user=root and group=cloudbd
Change the access permissions to 640 (read/write for root, read only for group, no access for other)
sudo chown root:cloudbd /etc/cloudbd/credentials.json sudo chmod 640 /etc/cloudbd/credentials.json ls -l /etc/cloudbd/credentials.json -rw-r----- 1 root cloudbd 2893 Dec 19 2017 /etc/cloudbd/credentials.json
Add Users to cloudbd Group (optional)
Only users in the cloudbd group and the root user will be able to create or delete CloudBD disks.
# Add group cloudbd to the current user sudo usermod -a -G cloudbd $USER # Relogin to your user shell to activate new group or open a new shell sudo su - $USER
Create a Storage Remote Config File
A storage remote config file describes the type, location, and auth parameters of a CloudBD storage remote. The CloudBD CLI and driver use the config files to know how to securely communicate with your storage remotes.
Storage remote config files:
- Are placed in the /etc/cloudbd/remotes.d/ directory
- Must end in .conf
- Use basic INI format <KEY> = <VALUE>
A storage remote config file's filename without the .conf extension is used by the CloudBD CLI and the cbdtab as the remote's name.
Example Storage Remote Config File:
# List remote config files
ls /etc/cloudbd/remotes.d/
myremote1.conf
# CloudBD CLI command to list configured remotes
cloudbd list
myremote1
# CloudBD CLI command to list disks on myremote1
cloudbd list myremote1
exampledisk1
# View the remote config file
cat /etc/cloudbd/remotes.d/myremote1.conf
type = aws_ec2_metadata
region = us-east-2
bucket = myremote1-cloudbds3remotebucket-43fqpks0df4fd
Complete documentation of storage remote config files for all supported storage remote types is available on the respective CloudBD remote pages.
Storage Remote Types: