Commit 1a02d6fb authored by Spiros Koulouzis's avatar Spiros Koulouzis

increase max connections on mysql

parent b8cda483
......@@ -53,22 +53,23 @@ class AnsibleService:
create = interface['create']
inputs = create['inputs']
git_url = inputs['repository']
playbook_names = inputs['resources']
for playbook_name in playbook_names:
environment_id = None
if env_vars:
environment_id = self.semaphore_helper.create_environment(project_id, name, env_vars)
task_id = self.run_task(name, project_id, key_id, git_url, inventory_id, playbook_name,
environment_id=environment_id)
if self.semaphore_helper.get_task(project_id, task_id).status != 'success':
msg = ''
for out in self.semaphore_helper.get_task_outputs(project_id, task_id):
msg = msg+out.output
raise Exception('Task: '+playbook_name+' failed. '+self.semaphore_helper.get_task(project_id, task_id).status+' Output: '+msg)
if 'resources' in inputs:
playbook_names = inputs['resources']
for playbook_name in playbook_names:
environment_id = None
if env_vars:
environment_id = self.semaphore_helper.create_environment(project_id, name, env_vars)
task_id = self.run_task(name, project_id, key_id, git_url, inventory_id, playbook_name,
environment_id=environment_id)
if self.semaphore_helper.get_task(project_id, task_id).status != 'success':
msg = ' '
for out in self.semaphore_helper.get_task_outputs(project_id, task_id):
msg = msg+' '+out.output
raise Exception('Task: '+playbook_name+' failed. '+self.semaphore_helper.get_task(project_id, task_id).status+' Output: '+msg)
tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id)
tasks_outputs[task_id] = self.semaphore_helper.get_task_outputs(project_id, task_id)
if 'configure' in interface and self.semaphore_helper.get_task(project_id, task_id).status == 'success':
if 'configure' in interface and self.semaphore_helper.get_task(project_id, task_id).status == 'success' and 'resources' in inputs:
configure = interface['configure']
inputs = configure['inputs']
git_url = inputs['repository']
......@@ -137,5 +138,5 @@ class AnsibleService:
if last_status != this_status:
logger.info('task name: ' + name + ', task status: ' + str(task.status))
last_status = this_status
sleep(3)
sleep(6)
return task_id
......@@ -21,7 +21,7 @@ services:
- "15671:15671"
mysql:
image: mysql:5.6
image: mysql:5.7
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore
......@@ -45,7 +45,7 @@ services:
SEMAPHORE_ADMIN: admin
SEMAPHORE_WEB_ROOT: http://0.0.0.0:3000
ports:
- "3001:3000"
- "3000:3000"
depends_on:
- mysql
......
......@@ -21,7 +21,9 @@ services:
- "15671:15671"
mysql:
image: mysql:5.6
image: mysql:5.7
volumes:
- ./mysql.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore
......@@ -60,7 +62,7 @@ services:
- rabbit
- mongo
- sure-tosca
image: qcdis/manager
image: manager
environment:
RABBITMQ_HOST: rabbit
MONGO_HOST: mongo
......
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_connections = 2048
......@@ -62,6 +62,7 @@ http {
location /manager {
add_header 'Access-Control-Allow-Origin' *;
proxy_pass http://manager:8080/manager;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
......
apiVersion: v1
kind: ConfigMap
metadata:
name: mysql-config
namespace: conf
data:
htpasswd: |
alogo:$apr1$pbMniSeq$m4PZevv7VLULQLhiD2V2R0
conf_user:$apr1$sDBv9ugd$AV7m5Jeg0463jXaBxiZDs.
articonf_ui:$apr1$qFaau5L2$xgO53tciXFlrL/Z61nrzP.
mysqld.cnf: |
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
#log-error = /var/log/mysql/error.log
# By default we only accept connections from localhost
#bind-address = 127.0.0.1
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
max_connections = 2048
......@@ -37,9 +37,24 @@ spec:
value: "yes"
- name: MYSQL_USER
value: semaphore
image: mysql:5.6
image: mysql:5.7
name: mysql
imagePullPolicy: Always
resources: {}
volumeMounts:
- name: config-volume
mountPath: /etc/mysql/mysql.conf.d/
volumes:
- name: config-volume
configMap:
name: mysql-config
items:
- key: mysqld.cnf
path: mysqld.cnf
restartPolicy: Always
status: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment