Queries about jitsi-autoscaler

I have few questions about jitsi-autoscaler.

  1. Can I use it with any of the cloud providers?
  2. What’s the meaning of all the config must be added to the config directory statement here. Does it mean that I have to put groups.json to the config directory?
  3. what is the use of OCI_CONFIGURATION_FILE_PATH env variable in docker-compose.yaml file?
  4. When I’m trying to build an image out of it then I’m getting below error.
docker-compose -f demo/docker-compose.yml build

redis uses an image, skipping
Building autoscaler
Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 72, in main
  File "compose/cli/main.py", line 128, in perform_command
  File "compose/cli/main.py", line 303, in build
  File "compose/project.py", line 403, in build
  File "compose/project.py", line 385, in build_service
  File "compose/service.py", line 1106, in build
  File "site-packages/docker/api/build.py", line 261, in build
  File "site-packages/docker/api/build.py", line 308, in _set_auth_headers
  File "site-packages/docker/auth.py", line 311, in get_all_credentials
  File "site-packages/docker/auth.py", line 262, in _resolve_authconfig_credstore
  File "site-packages/docker/auth.py", line 287, in _get_store_instance
  File "site-packages/docker/credentials/store.py", line 25, in __init__
docker.credentials.errors.InitializationError: docker-credential-gcloud not installed or not available in PATH
[399] Failed to execute script docker-compose

CC: @Aaron_K_van_Meerten @Raluca_Baciu
I’m sorry for tagging you here but I think only you guys can help with this. Please help.

First off, a quick caveat: this project is in its infancy, and isn’t recommended for production use without a complete understanding of the components, possible points of monitoring and errors, etc.
That said, we do use it for our own deployments and works for the use cases we have.
The autoscaler project is meant to eventually encompass all cloud providers, currently it only supports instances in OCI (oracle cloud). We would welcome contributions to support other clouds, and I’m open to a discussion about where to plug this in, if developers are interested.
In order to use it, the image would need to be built and deployed, provided valid credentials for oracle cloud. It also requires a redis service for its datastore. Then the autoscaler would need to be made available as a service, at an endpoint accessible to the sidecar running on the VMs. In addition, a set of keys would need to be set up for the sidecar to sign requests that the autoscaler service trusts. Then the autoscaler sidecar needs to be configured to run on every VM pointed to the autoscaler endpoint.


Thanks @Aaron_K_van_Meerten for the info. I guess I can’t use it as of now.

Hi, i am able to set up in oracle cloud, But i think it’s not scaling down
So what is the strategy for scale down from where you get matrices requires for graceful shutdowns down

The critical piece here is the (jitsi-autoscaler-sidecar), which is used to feed the stats used by the autoscaler to make scaling decisions. The sidecar also emits the final shutdown commands, by executing shell scripts on the instances themselves once they have completed graceful shutdown. Much of this is needed be set up by automation which is left as an exercise to the reader. The basic idea is: you create a graceful shutdown shell script which waits for the JVB graceful shutdown script to complete, and then emits the final command, which might look something like this:


export OCI_BIN="/usr/local/bin/oci"
export CURL_BIN="/usr/bin/curl"
export JQ_BIN="/usr/bin/jq"

if [ -z "$INSTANCE_ID" ]; then
    INSTANCE_ID=$($CURL_BIN -s | $JQ_BIN .id -r)

# terminate our instance
$OCI_BIN compute instance terminate --instance-id "$INSTANCE_ID" --preserve-boot-volume false --auth instance_principal --force

Please note that this implies permissions in Oracle Cloud for the instance to terminate itself, which requires from IAM configuration that is also left as an exercise to the reader.


Thank u
Yes, I got it, I hope I will do the complete setup, let u know any problem or bug I will face.
Thanks Again

Any update on how we can use auto scaler project ?

You may use it as you wish. It’s only compatible currently with the oracle cloud, digital ocean and custom providers, but we’re happy to accept pull requests for others.
We use it to autoscale all our resources for the various deployments we manage, so it works as intended anyway. We don’t have any guides yet on how to set it up or configure it, as it’s relatively distributed, but it’s also a fairly basic microservice, backed by redis, so if you have experience with this sort of thing we’d also happily take any community-sourced howto or walkthrough.
Let us know if you have any specific questions, and we’ll try to assist.