Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CONF
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UvA
CONF
Commits
1a02d6fb
Commit
1a02d6fb
authored
4 years ago
by
Spiros Koulouzis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
increase max connections on mysql
parent
b8cda483
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
20 deletions
+75
-20
ansible_service.py
deployer/service/ansible_service.py
+16
-15
docker-compose-test.yml
docker-compose/docker-compose-test.yml
+2
-2
docker-compose.yml
docker-compose/docker-compose.yml
+4
-2
mysql.cnf
docker-compose/mysql.cnf
+11
-0
nginx.conf
docker-compose/nginx.conf
+1
-0
mysql-configmap.yaml
k8s/CONF/mysql-configmap.yaml
+25
-0
mysql-deployment.yaml
k8s/CONF/mysql-deployment.yaml
+16
-1
No files found.
deployer/service/ansible_service.py
View file @
1a02d6fb
...
...
@@ -53,6 +53,7 @@ class AnsibleService:
create
=
interface
[
'create'
]
inputs
=
create
[
'inputs'
]
git_url
=
inputs
[
'repository'
]
if
'resources'
in
inputs
:
playbook_names
=
inputs
[
'resources'
]
for
playbook_name
in
playbook_names
:
environment_id
=
None
...
...
@@ -61,14 +62,14 @@ class AnsibleService:
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
=
'
'
msg
=
'
'
for
out
in
self
.
semaphore_helper
.
get_task_outputs
(
project_id
,
task_id
):
msg
=
msg
+
out
.
output
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
)
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
This diff is collapsed.
Click to expand it.
docker-compose/docker-compose-test.yml
View file @
1a02d6fb
...
...
@@ -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
:
-
"
300
1
:3000"
-
"
300
0
:3000"
depends_on
:
-
mysql
...
...
This diff is collapsed.
Click to expand it.
docker-compose/docker-compose.yml
View file @
1a02d6fb
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
docker-compose/mysql.cnf
0 → 100644
View file @
1a02d6fb
[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
This diff is collapsed.
Click to expand it.
docker-compose/nginx.conf
View file @
1a02d6fb
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
k8s/CONF/mysql-configmap.yaml
0 → 100644
View file @
1a02d6fb
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
This diff is collapsed.
Click to expand it.
k8s/CONF/mysql-deployment.yaml
View file @
1a02d6fb
...
...
@@ -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
:
{}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment