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

increase max connections on mysql

parent b8cda483
...@@ -53,22 +53,23 @@ class AnsibleService: ...@@ -53,22 +53,23 @@ class AnsibleService:
create = interface['create'] create = interface['create']
inputs = create['inputs'] inputs = create['inputs']
git_url = inputs['repository'] git_url = inputs['repository']
playbook_names = inputs['resources'] if 'resources' in inputs:
for playbook_name in playbook_names: playbook_names = inputs['resources']
environment_id = None for playbook_name in playbook_names:
if env_vars: environment_id = None
environment_id = self.semaphore_helper.create_environment(project_id, name, env_vars) if env_vars:
task_id = self.run_task(name, project_id, key_id, git_url, inventory_id, playbook_name, environment_id = self.semaphore_helper.create_environment(project_id, name, env_vars)
environment_id=environment_id) task_id = self.run_task(name, project_id, key_id, git_url, inventory_id, playbook_name,
if self.semaphore_helper.get_task(project_id, task_id).status != 'success': environment_id=environment_id)
msg = '' if self.semaphore_helper.get_task(project_id, task_id).status != 'success':
for out in self.semaphore_helper.get_task_outputs(project_id, task_id): msg = ' '
msg = msg+out.output for out in self.semaphore_helper.get_task_outputs(project_id, task_id):
raise Exception('Task: '+playbook_name+' failed. '+self.semaphore_helper.get_task(project_id, task_id).status+' Output: '+msg) 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'] configure = interface['configure']
inputs = configure['inputs'] inputs = configure['inputs']
git_url = inputs['repository'] git_url = inputs['repository']
...@@ -137,5 +138,5 @@ class AnsibleService: ...@@ -137,5 +138,5 @@ class AnsibleService:
if last_status != this_status: if last_status != this_status:
logger.info('task name: ' + name + ', task status: ' + str(task.status)) logger.info('task name: ' + name + ', task status: ' + str(task.status))
last_status = this_status last_status = this_status
sleep(3) sleep(6)
return task_id return task_id
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
- "15671:15671" - "15671:15671"
mysql: mysql:
image: mysql:5.6 image: mysql:5.7
environment: environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore MYSQL_DATABASE: semaphore
...@@ -45,7 +45,7 @@ services: ...@@ -45,7 +45,7 @@ services:
SEMAPHORE_ADMIN: admin SEMAPHORE_ADMIN: admin
SEMAPHORE_WEB_ROOT: http://0.0.0.0:3000 SEMAPHORE_WEB_ROOT: http://0.0.0.0:3000
ports: ports:
- "3001:3000" - "3000:3000"
depends_on: depends_on:
- mysql - mysql
......
...@@ -21,7 +21,9 @@ services: ...@@ -21,7 +21,9 @@ services:
- "15671:15671" - "15671:15671"
mysql: mysql:
image: mysql:5.6 image: mysql:5.7
volumes:
- ./mysql.cnf:/etc/mysql/mysql.conf.d/mysqld.cnf
environment: environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes' MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_DATABASE: semaphore MYSQL_DATABASE: semaphore
...@@ -60,7 +62,7 @@ services: ...@@ -60,7 +62,7 @@ services:
- rabbit - rabbit
- mongo - mongo
- sure-tosca - sure-tosca
image: qcdis/manager image: manager
environment: environment:
RABBITMQ_HOST: rabbit RABBITMQ_HOST: rabbit
MONGO_HOST: mongo 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 { ...@@ -62,6 +62,7 @@ http {
location /manager { location /manager {
add_header 'Access-Control-Allow-Origin' *;
proxy_pass http://manager:8080/manager; proxy_pass http://manager:8080/manager;
proxy_set_header Host $http_host; proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr; 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: ...@@ -37,9 +37,24 @@ spec:
value: "yes" value: "yes"
- name: MYSQL_USER - name: MYSQL_USER
value: semaphore value: semaphore
image: mysql:5.6 image: mysql:5.7
name: mysql name: mysql
imagePullPolicy: Always imagePullPolicy: Always
resources: {} 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 restartPolicy: Always
status: {} 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