Run Azurite
You can run Azurite, which is a local emulator for Blob Storage, in Docker Compose by using the docker-compose.yml file in the scalardb-samples/{samplesDir(props)} directory.
To start Blob Storage, run the following command:
docker compose up -d blobstorage
Then, create a container named test-container by running the following command:
docker compose up blobstorage-container-creator
{configureHeading(props)}
The {propertiesFile(props)} file in the scalardb-samples/{samplesDir(props)} directory contains database configurations. Please uncomment the properties for Blob Storage in the {propertiesFile(props)} file so that the configuration looks as follows:
{dedent`
# For Blob Storage
scalar.db.storage=blob-storage
scalar.db.contact_points=http://${host(props, 'blobstorage')}:10000/test/test-container
scalar.db.username=test
scalar.db.password=test
`}
To use Google Cloud Storage, you must have a Google Cloud account. If you don't have a Google Cloud account, visit Get started with Google Cloud.
Configure Cloud Storage
Create a Cloud Storage bucket. For instructions on creating a bucket, see Create buckets. You also need a service account key for authentication. For details, see Create a service account key.
{configureHeading(props)}
The {propertiesFile(props)} file in the scalardb-samples/{samplesDir(props)} directory contains database configurations. Be sure to change the values for scalar.db.contact_points, scalar.db.username, and scalar.db.password as described.
{dedent`
# For Cloud Storage
scalar.db.storage=cloud-storage
scalar.db.contact_points=
scalar.db.username=
scalar.db.password=
`}
Set scalar.db.password to the full content of your Google Cloud service account key file as a single-line JSON.
To use Amazon S3, you must have an AWS account. If you don't have an AWS account, visit Create an AWS account.
Configure Amazon S3
Create an S3 bucket. For instructions on creating a bucket, see Creating a bucket. You also need an access key for authentication. For details, see Creating access keys.
{configureHeading(props)}
The {propertiesFile(props)} file in the scalardb-samples/{samplesDir(props)} directory contains database configurations. Be sure to change the values for scalar.db.contact_points, scalar.db.username, and scalar.db.password as described.
{dedent`
# For S3
scalar.db.storage=s3
scalar.db.contact_points=/
scalar.db.username=
scalar.db.password=
`}
The format of scalar.db.contact_points is <REGION>/<S3_BUCKET_NAME> (for example, us-east-1/my-bucket).