---
title: Charmhub | Deploy Canonical Observability Stack Lite using Charmhub - The Open
  Operator Collection
description: Deploy the latest version of Canonical Observability Stack Lite on any
  cloud.
url: https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing
---

##### We've discontinued the registration of new Bundles

New Bundle registrations are no longer accepted. Existing bundles remain functional. We recommend using the Juju Terraform Provider for new deployments.

[Learn more](https://discourse.charmhub.io/t/discontinuing-new-charmhub-bundle-registrations/15344)

# Canonical Observability Stack Lite

[Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")
| bundle

* [Canonical Observability](https://charmhub.io/publisher/observability "View all packages from Canonical Observability")
  | bundle

Platform:

stable 26

```
juju deploy cos-lite
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Relevant links

* [Homepage](https://github.com/canonical/cos-lite-bundle)

---

#### Contacts

* [Submit a bug](https://github.com/canonical/cos-lite-bundle/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

---

[Add docs to a charm](https://juju.is/docs/sdk/add-docs-to-your-charmhub-page)

**Table of Contents**

* [Single-node Minio deployment](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--single-node-minio-deployment)
  + [Deploy `minio`](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--deploy-minio)
  + [Deploy `s3-integrator`](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--deploy-s3-integrator)
  + [Add a bucket](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--add-a-bucket)
  + [Integrate s3](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--integrate-s3)

[Minio](https://min.io/) is a lightweight S3-compatible object storage system. In its single-node configuration, it is suitable for providing s3 storage backends for **testing purposes** for certain HA COS addons such as Tempo, Loki and Mimir.

In production, you will probably want to deploy ceph and then follow this guide instead [how to use ceph for s3 storage](https://discourse.charmhub.io/t/15740).

The `minio` charm does not directly provide an `s3` endpoint. For that, we need to deploy an `s3-integrator` app to act as intermediary.

[## Single-node Minio deployment](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--single-node-minio-deployment)
[## Deploy `minio`](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--deploy-minio)

Deploy the `minio` charm (feel free to use stronger access and secret keys depending on how exposed your environment is)

> `juju deploy minio --channel edge --trust --config access-key=accesskey --config secret-key=mysoverysecretkey`

Note that the secret-key must be at least 8 characters long. If not, Minio will crash.

And wait for it to go to `active/idle`.

[### Deploy `s3-integrator`](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--deploy-s3-integrator)
> `juju deploy s3-integrator --channel edge --trust s3`

We deploy `s3-integrator` as `s3`, but feel free to give the app a different name.

And wait for it to go to `blocked/idle`.
The `s3` app will go into `blocked` status until you run the `sync-s3-credentials` action to give it access to `minio`.

> `juju run s3/leader sync-s3-credentials access-key=accesskey secret-key=mysoverysecretkey`

[### Add a bucket](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--add-a-bucket)

### [Through s3-integrator](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#p-33234-through-s3-integrator)

As of `rev243+` of `s3-integrator`, the integrator will create the requested bucket as part of the startup procedure. You don’t need to create the buckets manually anymore.

### [Using the Minio UI](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#p-33234-using-the-minio-ui)

The simplest way to create a bucket is to use the Minio console.
Obtain the Minio IP from the `juju status` output and then open `http://MINIO_IP:9001` in a browser using the access key and secret key you configured earlier as user and password respectively.

From there you should be able to create a bucket with a few clicks. See [this guide](https://thenewstack.io/how-to-create-an-object-storage-bucket-with-minio-object-storage/) for a step-by-step tutorial.

### [Using the Python sdk](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#p-33234-using-the-python-sdk)

Alternatively, you can use the python sdk.

> pip install minio

Then execute:

```
from minio import Minio

address = <minio/0 unit IP>
bucket_name = "mybucket"  # replace with your bucket name

mc_client = Minio(
    f"{address}:9000",
    access_key="accesskey",
    secret_key="secretkey",
    secure=False,
)

found = mc_client.bucket_exists(bucket_name)
if not found:
    mc_client.make_bucket(bucket_name)
```

[### Integrate s3](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#heading--integrate-s3)

Now grant the s3 integrator access to the bucket by doing:

> `juju config s3 endpoint=minio-0.minio-endpoints.<JUJU MODEL NAME>.svc.cluster.local:9000 bucket=mybucket`

Replace with the name of the juju model `minio` is deployed in, and `mybucket` with the name of the bucket you just created.

Now the s3 integrator is ready to provide the `s3` integration to any charm requiring it.

Note that, as of `rev 41` for `s3-integrator`, if multiple charms each require integration with different S3 buckets, you would need to deploy multiple `s3-integrator` applications—one per unique bucket, as each `s3-integrator` application can only have **one** set of unique bucket configurations. [see more](https://github.com/canonical/s3-integrator/issues/48)

## [A handy script to do it all](https://charmhub.io/cos-lite/docs/how-to/deploy-minio-for-s3-testing#p-33234-a-handy-script-to-do-it-all)

We have written [a simple python script](https://raw.githubusercontent.com/canonical/tempo-coordinator-k8s-operator/main/scripts/deploy_minio.py) that does all of the above, for internal development purposes. And, as it happens, you can use it too!

```
juju switch cos  # select the model where you have COS-lite deployed
sudo pip3 install minio  # install the script's only dependency
curl https://raw.githubusercontent.com/canonical/tempo-coordinator-k8s-operator/main/scripts/deploy_minio.py | python3
```

The script will install minio charm, s3-integrator charm and configure them to create and use `tempo` bucket where traces will be stored. Once the script finishes, you should see the following message:

```
Waiting for task 2...
ok: Credentials successfully updated.

all done! have fun.
```

Your storage is now ready, and you can integrate the `s3` app to whatever needs a bucket.

---
