Robert Kaussow
78fe88f86a
Author: Robert Kaussow <mail@geeklabor.de> Date: Thu Oct 1 10:55:33 2020 +0200 fix example hcloud location
416 lines
8.9 KiB
Markdown
416 lines
8.9 KiB
Markdown
---
|
|
title: droneci_autoscaler
|
|
type: docs
|
|
---
|
|
|
|
[![Source Code](https://img.shields.io/badge/gitea-source%20code-blue?logo=gitea&logoColor=white)](https://gitea.rknet.org/ansible/xoxys.droneci_autoscaler) [![Build Status](https://img.shields.io/drone/build/ansible/xoxys.droneci_autoscaler?logo=drone&server=https%3A%2F%2Fdrone.rknet.org)](https://drone.rknet.org/ansible/xoxys.droneci_autoscaler) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?label=license)](https://gitea.rknet.org/ansible/xoxys.droneci_autoscaler/src/branch/master/LICENSE)
|
|
|
|
Setup [Drone CI autoscaler](https://autoscale.drone.io/).
|
|
|
|
* [Default Variables](#default-variables)
|
|
* [droneci_autoscaler_agent_architecture](#droneci_autoscaler_agent_architecture)
|
|
* [droneci_autoscaler_agent_concurrency](#droneci_autoscaler_agent_concurrency)
|
|
* [droneci_autoscaler_agent_image](#droneci_autoscaler_agent_image)
|
|
* [droneci_autoscaler_agent_os](#droneci_autoscaler_agent_os)
|
|
* [droneci_autoscaler_agent_package_upgrade](#droneci_autoscaler_agent_package_upgrade)
|
|
* [droneci_autoscaler_agent_token](#droneci_autoscaler_agent_token)
|
|
* [droneci_autoscaler_agent_volumes](#droneci_autoscaler_agent_volumes)
|
|
* [droneci_autoscaler_db_type](#droneci_autoscaler_db_type)
|
|
* [droneci_autoscaler_exposed_ports](#droneci_autoscaler_exposed_ports)
|
|
* [droneci_autoscaler_gc_enabled](#droneci_autoscaler_gc_enabled)
|
|
* [droneci_autoscaler_image](#droneci_autoscaler_image)
|
|
* [droneci_autoscaler_instances](#droneci_autoscaler_instances)
|
|
* [droneci_autoscaler_interval](#droneci_autoscaler_interval)
|
|
* [droneci_autoscaler_logs_color](#droneci_autoscaler_logs_color)
|
|
* [droneci_autoscaler_logs_debug](#droneci_autoscaler_logs_debug)
|
|
* [droneci_autoscaler_logs_pretty](#droneci_autoscaler_logs_pretty)
|
|
* [droneci_autoscaler_memory_limit](#droneci_autoscaler_memory_limit)
|
|
* [droneci_autoscaler_memory_reservation](#droneci_autoscaler_memory_reservation)
|
|
* [droneci_autoscaler_networks](#droneci_autoscaler_networks)
|
|
* [droneci_autoscaler_networks_applied](#droneci_autoscaler_networks_applied)
|
|
* [droneci_autoscaler_pool_max](#droneci_autoscaler_pool_max)
|
|
* [droneci_autoscaler_pool_min](#droneci_autoscaler_pool_min)
|
|
* [droneci_autoscaler_pool_ttl](#droneci_autoscaler_pool_ttl)
|
|
* [droneci_autoscaler_restart_policy](#droneci_autoscaler_restart_policy)
|
|
* [droneci_autoscaler_runner_privileged](#droneci_autoscaler_runner_privileged)
|
|
* [droneci_autoscaler_runner_volumes](#droneci_autoscaler_runner_volumes)
|
|
* [droneci_autoscaler_server_host](#droneci_autoscaler_server_host)
|
|
* [droneci_autoscaler_server_proto](#droneci_autoscaler_server_proto)
|
|
* [droneci_autoscaler_server_token](#droneci_autoscaler_server_token)
|
|
* [droneci_autoscaler_service_directory](#droneci_autoscaler_service_directory)
|
|
* [droneci_autoscaler_service_stopped](#droneci_autoscaler_service_stopped)
|
|
* [droneci_autoscaler_sshkey](#droneci_autoscaler_sshkey)
|
|
* [droneci_autoscaler_version](#droneci_autoscaler_version)
|
|
* [droneci_autoscaler_volumes](#droneci_autoscaler_volumes)
|
|
* [droneci_autoscaler_watchtower_enabled](#droneci_autoscaler_watchtower_enabled)
|
|
* [Dependencies](#dependencies)
|
|
|
|
---
|
|
|
|
## Default Variables
|
|
|
|
### droneci_autoscaler_agent_architecture
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_architecture: amd64
|
|
```
|
|
|
|
### droneci_autoscaler_agent_concurrency
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_concurrency: 2
|
|
```
|
|
|
|
### droneci_autoscaler_agent_image
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_image: drone/drone-runner-docker:1.5
|
|
```
|
|
|
|
### droneci_autoscaler_agent_os
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_os: linux
|
|
```
|
|
|
|
### droneci_autoscaler_agent_package_upgrade
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_package_upgrade: false
|
|
```
|
|
|
|
### droneci_autoscaler_agent_token
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_token: myveryownsecret
|
|
```
|
|
|
|
### droneci_autoscaler_agent_volumes
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_agent_volumes: []
|
|
```
|
|
|
|
### droneci_autoscaler_db_type
|
|
|
|
Database type to use (default sqlite). All other DB variable will ony be used it DB type is **not** sqlite.
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_db_type: sqlite
|
|
```
|
|
|
|
### droneci_autoscaler_exposed_ports
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_exposed_ports: _unset_
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_exposed_ports:
|
|
- "8080:8080"
|
|
```
|
|
|
|
### droneci_autoscaler_gc_enabled
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_gc_enabled: false
|
|
```
|
|
|
|
### droneci_autoscaler_image
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_image: drone/autoscaler:latest
|
|
```
|
|
|
|
### droneci_autoscaler_instances
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_instances: []
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_instances:
|
|
- name: scaler_amd64
|
|
pool_max: 50
|
|
pool_ttl: 120m
|
|
agent_concurrency: 15
|
|
agent_architecture: amd64
|
|
sshkey: "dummy"
|
|
api_host: "drone-amd64.example.com"
|
|
provider_config:
|
|
- name: DRONE_HETZNERCLOUD_DATACENTER
|
|
value: fsn1-dc14
|
|
- name: DRONE_HETZNERCLOUD_TOKEN
|
|
value: abc123
|
|
- name: DRONE_HETZNERCLOUD_IMAGE
|
|
value: ubuntu-18.04
|
|
- name: DRONE_HETZNERCLOUD_TYPE
|
|
value:
|
|
# SSH key id from hcloud API
|
|
- name: DRONE_HETZNERCLOUD_SSHKEY
|
|
value:
|
|
- name: DRONE_HETZNERCLOUD_USERDATA_FILE
|
|
value: /etc/scaler/userdata.yml
|
|
```
|
|
|
|
### droneci_autoscaler_interval
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_interval: 1m
|
|
```
|
|
|
|
### droneci_autoscaler_logs_color
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_logs_color: false
|
|
```
|
|
|
|
### droneci_autoscaler_logs_debug
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_logs_debug: false
|
|
```
|
|
|
|
### droneci_autoscaler_logs_pretty
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_logs_pretty: true
|
|
```
|
|
|
|
### droneci_autoscaler_memory_limit
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_memory_limit: _unset_
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_memory_limit: 512m
|
|
```
|
|
|
|
### droneci_autoscaler_memory_reservation
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_memory_reservation: _unset_
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_memory_reservation: 256m
|
|
```
|
|
|
|
### droneci_autoscaler_networks
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_networks:
|
|
- name: droneci_default
|
|
external: true
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_networks:
|
|
- name: default
|
|
# optional network driver, defaults to 'bride'
|
|
driver: host
|
|
```
|
|
|
|
### droneci_autoscaler_networks_applied
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_networks_applied:
|
|
- droneci_default
|
|
```
|
|
|
|
### droneci_autoscaler_pool_max
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_pool_max: 1
|
|
```
|
|
|
|
### droneci_autoscaler_pool_min
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_pool_min: 0
|
|
```
|
|
|
|
### droneci_autoscaler_pool_ttl
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_pool_ttl: 50m
|
|
```
|
|
|
|
### droneci_autoscaler_restart_policy
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_restart_policy: always
|
|
```
|
|
|
|
### droneci_autoscaler_runner_privileged
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_runner_privileged: []
|
|
```
|
|
|
|
### droneci_autoscaler_runner_volumes
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_runner_volumes: []
|
|
```
|
|
|
|
### droneci_autoscaler_server_host
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_server_host: droneci
|
|
```
|
|
|
|
### droneci_autoscaler_server_proto
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_server_proto: http
|
|
```
|
|
|
|
### droneci_autoscaler_server_token
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_server_token: myveryownsecret
|
|
```
|
|
|
|
### droneci_autoscaler_service_directory
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_service_directory: /var/lib/docker/services/droneci_autoscaler
|
|
```
|
|
|
|
### droneci_autoscaler_service_stopped
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_service_stopped: false
|
|
```
|
|
|
|
### droneci_autoscaler_sshkey
|
|
|
|
SSH private key that will by used by the autoscaler to connect to the agents. If you dont provide a private key, a keypair will be generated automatically.
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_sshkey: _unset_
|
|
```
|
|
|
|
### droneci_autoscaler_version
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_version: latest
|
|
```
|
|
|
|
### droneci_autoscaler_volumes
|
|
|
|
Define required docker volumes. If you don't use sqlite you could remove the default volume.
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_volumes:
|
|
- name: data
|
|
dest: /var/lib/drone_autoscaler
|
|
bind: false
|
|
```
|
|
|
|
#### Example usage
|
|
|
|
```YAML
|
|
droneci_autoscaler_volumes:
|
|
# Instead of the name you could specify a path on the container host system,
|
|
# but you also have to enable bind mount for this volume
|
|
- name: data
|
|
# target location inside the container
|
|
dest: /var/lib/drone_autoscaler
|
|
# enable bind mount, if false volume will be configured as named volume
|
|
# keep in mind you MUST set bind in any case
|
|
bind: True
|
|
```
|
|
|
|
### droneci_autoscaler_watchtower_enabled
|
|
|
|
#### Default value
|
|
|
|
```YAML
|
|
droneci_autoscaler_watchtower_enabled: false
|
|
```
|
|
|
|
## Dependencies
|
|
|
|
None.
|