-
Maintained by: Renater (contact@renater.fr)
-
Where to get help: the SimpleScaleVM official repository
-
Where to file issues: https://github.com/Renater/SimpleScaleVM/issues
-
Supported architecture:
amd64
-
Source of this description: documentation on the SimpleScaleVM repository
-
openstack-3.0.0
,openstack-3.0
,openstack-3
,openstack-latest
-
openstack-2.0.0
,openstack-2.0
,openstack-2
-
openstack-1.1.2
,openstack-1.1
,openstack-1
-
openstack-1.1.1
-
openstack-1.1.0
-
openstack-1.0.0
,openstack-1.0
-
openstack-0.1.0
,openstack-0.1
,openstack-0
(pre-release)
SimpleScaleVM is a module written in Python that manages the scaling of a cluster of virtual resources based on HTTP metrics. Its many features include:
-
Scheduled resource management: The Scaler includes a scheduler that fetches the state of the infrastructure every minute and create or delete replicas according to their status and the Scaler configuration.
-
Multi-provider support: The Scaler has been designed to be easily adapted on several cloud providers (the only available provider in this repository is OpenStack).
-
HTTP server for monitoring: A simple HTTP webserver is included in this module to be able to check its status at any time.
-
External address management: The module includes a Keepalived-like optional feature that makes sure a pool of external addresses are assigned to healthy replicas.
The full explanation of the functioning of the module is described in the documentation part of the GitHub repository.
Starting a SimpleScaleVM instance is simple; for instance, to start an instance with the OpenStack provider:
docker run -p 8000:8000 \
-e PROVIDER=openstack \
-e OS_AUTH_URL=<OpenStack endpoint> \
-e OS_USERNAME=<OpenStack username> \
-e OS_PASSWORD=<OpenStack password> \
-e OS_REGION_NAME=<OpenStack region> \
-e OS_PROJECT_ID=<OpenStack project ID> \
-e OS_PROJECT_NAME=<OpenStack project name> \
-e OPENSTACK_FLAVOR=<OpenStack flavor name> \
-e OPENSTACK_IMAGE=<OpenStack image name> \
-e OPENSTACK_NETWORK=<OpenStack network name> \
renater/simplescalevm:openstack-latest
... via docker stack deploy
or docker-compose
Example stack.yml
for simplescalevm
with the OpenStack provider:
version: "3"
services:
simplescalevm:
image: renater/simplescalevm:openstack-latest
container_name: simplescalevm
hostname: simplescalevm
restart: always
ports:
- 8000:8000
volumes:
- ./cloud-init.sh:/cloud-init.sh
environment:
- PROVIDER=openstack
- OS_AUTH_URL=<OpenStack endpoint>
- OS_USERNAME=<OpenStack username>
- OS_PASSWORD=<OpenStack password>
- OS_REGION_NAME=<OpenStack region>
- OS_PROJECT_ID=<OpenStack project ID>
- OS_PROJECT_NAME=<OpenStack project name>
- OPENSTACK_FLAVOR=<OpenStack flavor name>
- OPENSTACK_IMAGE=<OpenStack image name>
- OPENSTACK_NETWORK=<OpenStack network name>
Run docker stack deploy -c stack.yml simplescalevm
(or docker-compose -f stack.yml up
), wait for it to initialize completely, and visit http://localhost:8000
.
The docker exec
command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your simplescalevm
container:
docker exec -it simplescalevm /bin/sh
The log is available through Docker's container log:
docker logs simplescalevm
When you start the simplescalevm
image, you can adjust the Scaler configuration of the SimpleScaleVM instance by passing one or more optional environment variables on the docker run
command line or in the Docker-compose file.
Host of the HTTP server. Default value is 0.0.0.0
.
Port of the HTTP server. Default value is 8000
.
Total number of resources per replica. Default value is 1
.
Minimum number of resources that should be available at all times. Default value is 3
.
Protocol to use to contact the API on replicas. Default value is http
.
Port to use to contact the API on replicas. Default value is 8080
.
Path to use to contact the API on replicas. Default value is /
.
Key of the API response that corresponds to the number of available resources on the replica. Default value is capacity
.
Key of the API response that corresponds to the boolean indicating if the replica should be terminated. Default value is termination
.
Boolean that indicates if the scaler should manage external addresses. Default value is false
.
Boolean that indicates if the scaler should auto-scale itself. Default value is false
.
Minimum number of auto-scaler instances that should be up at all times. Default value is 3
.
IP address of the host, only used when ENABLE_AUTOSCALING
is enabled. Default value is 0.0.0.0
.
Provider that is used to deploy replicas (the only available value is openstack). Default value is openstack
.
In addition to the environment variables used to configure the Scaler, you have to define the provider configuration by passing environment variables on the docker run
command line or in the Docker-compose file. The following variables permits to configure the OpenStack provider.
URL of the Openstack endpoint. Default value is https://auth.cloud.ovh.net/v3
.
Name of the Openstack user. Required.
Password of the Openstack user. Required.
Name of the Openstack region. Default value is SBG7
.
ID of the Openstack project domain. Default value is default
.
Name of the Openstack project domain. Default value is Default
.
ID of the Openstack project. Required.
Name of the Openstack project. Required.
Openstack interface. Default value is public
.
Version of the Openstack API. Default value is 3
.
Name of the scaled virtual machines. Default value is server
.
Name of the flavor to use for the scaled virtual machines. Default value is d2-8
.
Name of the image to use for the scaled virtual machines. Default value is Debian 11
.
IP version to use for virtual machines. Default value is 4
.
Name of the network to use for the scaled virtual machines. Default value is Ext-Net
.
Metadata key to identify the scaled server pool. Default value is group
.
Metadata value to identify the scaled server pool. Default value is scaled
.
Description of the floating IPs that should be assigned (only used when EXTERNAL_ADDRESS_MANAGEMENT
is enabled). Default value is server
.
Name of the keypair that is provisioned on the virtual machines. Optional.
Path to a cloud-init file to launch on the scaled virtual machines at creation. Optional.
Name of the autoscaler virtual machines. Default value is autoscaler
.
Name of the flavor to use for the autoscaler virtual machines. Default value is s1-2
.
Name of the image to use for the AUTOSCALER virtual machines. Default value is Debian 11
.
Name of the network to use for the autoscaler virtual machines. Default value is internal
.
Metadata value to identify the autoscaler server pool. Default value is autoscaler
.
Path to a cloud-init file to launch on the autoscaler virtual machines at creation. Optional.