2021-12-15 06:48:59 -06:00
|
|
|
def integration_test_services_volumes():
|
|
|
|
return [
|
|
|
|
{ 'name': 'postgres', 'temp': { 'medium': 'memory' } },
|
|
|
|
{ 'name': 'mysql', 'temp': { 'medium': 'memory' }
|
|
|
|
}]
|
|
|
|
|
2021-09-07 02:21:49 -05:00
|
|
|
def integration_test_services(edition):
|
|
|
|
services = [
|
|
|
|
{
|
|
|
|
'name': 'postgres',
|
|
|
|
'image': 'postgres:12.3-alpine',
|
|
|
|
'environment': {
|
|
|
|
'POSTGRES_USER': 'grafanatest',
|
|
|
|
'POSTGRES_PASSWORD': 'grafanatest',
|
|
|
|
'POSTGRES_DB': 'grafanatest',
|
2021-12-15 06:48:59 -06:00
|
|
|
'PGDATA': '/var/lib/postgresql/data/pgdata',
|
2021-09-07 02:21:49 -05:00
|
|
|
},
|
2021-12-15 06:48:59 -06:00
|
|
|
'volumes': [{
|
|
|
|
'name': 'postgres',
|
|
|
|
'path': '/var/lib/postgresql/data/pgdata'
|
|
|
|
}],
|
2021-09-07 02:21:49 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'name': 'mysql',
|
2022-09-08 02:03:02 -05:00
|
|
|
'image': 'mysql:5.7.39',
|
2021-09-07 02:21:49 -05:00
|
|
|
'environment': {
|
|
|
|
'MYSQL_ROOT_PASSWORD': 'rootpass',
|
|
|
|
'MYSQL_DATABASE': 'grafana_tests',
|
|
|
|
'MYSQL_USER': 'grafana',
|
|
|
|
'MYSQL_PASSWORD': 'password',
|
|
|
|
},
|
2021-12-15 06:48:59 -06:00
|
|
|
'volumes': [{
|
|
|
|
'name': 'mysql',
|
|
|
|
'path': '/var/lib/mysql'
|
|
|
|
}]
|
2021-09-07 02:21:49 -05:00
|
|
|
},
|
|
|
|
]
|
|
|
|
|
|
|
|
if edition in ('enterprise', 'enterprise2'):
|
|
|
|
services.extend([{
|
|
|
|
'name': 'redis',
|
|
|
|
'image': 'redis:6.2.1-alpine',
|
|
|
|
'environment': {},
|
|
|
|
}, {
|
|
|
|
'name': 'memcached',
|
|
|
|
'image': 'memcached:1.6.9-alpine',
|
|
|
|
'environment': {},
|
|
|
|
}])
|
|
|
|
|
|
|
|
return services
|
|
|
|
|
|
|
|
def ldap_service():
|
|
|
|
return {
|
|
|
|
'name': 'ldap',
|
|
|
|
'image': 'osixia/openldap:1.4.0',
|
|
|
|
'environment': {
|
|
|
|
'LDAP_ADMIN_PASSWORD': 'grafana',
|
|
|
|
'LDAP_DOMAIN': 'grafana.org',
|
|
|
|
'SLAPD_ADDITIONAL_MODULES': 'memberof',
|
|
|
|
},
|
|
|
|
}
|