Index: web-module/script/yml/monitoring/server/allinone.yml =================================================================== diff -u -r6346c28529301c55879a17c881f863855914a355 -rc0c9260f404de2116f14bdd4edb88c1fc0cd0d16 --- web-module/script/yml/monitoring/server/allinone.yml (.../allinone.yml) (revision 6346c28529301c55879a17c881f863855914a355) +++ web-module/script/yml/monitoring/server/allinone.yml (.../allinone.yml) (revision c0c9260f404de2116f14bdd4edb88c1fc0cd0d16) @@ -58,7 +58,7 @@ replicas: 1 placement: constraints: - - node.role!=manager + - node.role != manager - node.hostname == sub-slave1node logging: driver: "json-file" @@ -585,7 +585,7 @@ max-size: "100m" www313cokr: - image: 313devgrp/jstree-service-framework-backend-app:21.03.25 + image: 313devgrp/jstree-service-framework-backend-app:21.03.27 ports: - "31313:8080" deploy: Index: web-module/script/yml/monitoring/server/allinone/my.cnf =================================================================== diff -u --- web-module/script/yml/monitoring/server/allinone/my.cnf (revision 0) +++ web-module/script/yml/monitoring/server/allinone/my.cnf (revision c0c9260f404de2116f14bdd4edb88c1fc0cd0d16) @@ -0,0 +1,176 @@ +#5.7.32 +[client] +port = 3306 +socket = /var/run/mysqld/mysqld.sock + +# This was formally known as [safe_mysqld]. Both versions are currently parsed. +[mysqld_safe] +socket = /var/run/mysqld/mysqld.sock +nice = 0 +syslog + +[mysqld] +# Basic Settings +user = mysql +pid-file = /var/run/mysqld/mysqld.pid +socket = /var/run/mysqld/mysqld.sock +port = 3306 +########### add +sql-mode = ANSI_QUOTES,STRICT_ALL_TABLES,STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION +basedir = /usr +datadir = /var/lib/mysql +tmpdir = /tmp + +lc-messages-dir = /usr/share/mysql +lc-messages = en_US +########### add +skip-external-locking + +# Character set Config +character-set-client-handshake = FALSE +character-set-server = utf8 +init_connect = SET collation_connection = utf8_general_ci +init_connect = SET NAMES utf8 +skip-name-resolve = 1 +log_timestamps = SYSTEM +log_error_verbosity = 1 + +# Common Config +back_log = 1024 +ft_min_word_len = 4 +interactive_timeout = 600 +max_connections = 500 +performance_schema + +max_length_for_sort_data = 1024 +tmp_table_size = 1024M +table_open_cache = 2000 +transaction-isolation = REPEATABLE-READ +#open_file_limit = 1024 +slave-net-timeout = 3 + +# Engine +default-storage-engine = InnoDB + +# Listening IP +bind-address = 0.0.0.0 + +# Safety +max-connect-errors = 1000000 +max_allowed_packet = 64M +skip-name-resolve +sysdate-is-now = 1 +innodb = FORCE +innodb-strict-mode = 1 + +wait_timeout = 60 +interactive_timeout = 60 + +# Buffers +sort_buffer_size = 4M +read_buffer_size = 2M +join_buffer_size = 8M +read_rnd_buffer_size = 16M + +#thread_concurrency = 8 # Max CPU * 2 + +# MyISAM +key-buffer-size = 32M +#myisam-recover = FORCE,BACKUP +myisam_sort_buffer_size = 64M + +# CACHES AND LIMITS # +tmp-table-size = 128M +max-heap-table-size = 1G +query-cache-type = 0 +query-cache-size = 0 +query_cache_limit = 1M +max-connections = 5000 +thread-cache-size = 50 +thread_stack = 192K +open-files-limit = 65535 +table-definition-cache = 1024 +table-open-cache = 2048 + +# Bin logs +binlog-format = ROW +log-bin = /var/lib/mysql/mysql-bin +log-bin_trust_function_creators = 1 + +binlog_cache_size = 1M +binlog_row_image = minimal +binlog_checksum = none +server-id = 1851 + +log-slave-updates = 1 +expire-logs-days = 5 +sync-binlog = 1 +max_binlog_size = 100M + +gtid_mode = off +enforce_gtid_consistency = off +binlog-ignore-db = performance_schema +binlog-ignore-db = information_schema +binlog-ignore-db = sys + +local-infile = 0 + +server-id = 1 # randomize it incase of multiple servers + +# InnoDB +innodb_checksum_algorithm = NONE +innodb_data_file_path = ibdata1:1G;ibdata2:1G;ibdata3:1024M:autoextend +innodb_flush_method = O_DSYNC +innodb_lock_wait_timeout = 10 +innodb_thread_sleep_delay = 0 +#innddb_fast_shutdown +innodb_autoinc_lock_mode = 1 +innodb_thread_concurrency = 4 +#innodb_read_io_thread = 2 +#innodb_write_io_thread = 2 +innodb_open_files = 1024 +innodb_doublewrite = 0 + +innodb_data_home_dir = /var/lib/mysql/innodb-data +innodb-buffer-pool-size = 2048M +innodb_buffer_pool_instances = 8 +#innodb_additional_mem_pool_size = 20M +innodb_log_group_home_dir = /var/lib/mysql/innodb-data +innodb_log_buffer_size = 8M +innodb-log-files-in-group = 2 +innodb-log-file-size = 256M +innodb-file-per-table = 1 +innodb-flush-log-at-trx-commit = 1 +#innodb-flush-method = O_DIRECT + +# With virtual synchrony redundancy, make write queries faster +innodb_doublewrite = 1 + +# This is a recommended tuning variable for performance +innodb_locks_unsafe_for_binlog = 1 + +# LOGGING +general_log_file = /var/log/mysql/mysql.log +log-error = /var/log/mysql/mysql-error.log +log-queries-not-using-indexes = 1 +slow_query_log_file = /var/log/mysql/slow.log +slow_query_log = 1 +long_query_time = 3 + +[mysqldump] +quick +quote-names +max_allowed_packet = 64M + +#[mysqladmin] +#user = root + +[isamchk] +key_buffer = 16M + +# +# * IMPORTANT: Additional settings that can override those from this file! +# The files must end with '.cnf', otherwise they'll be ignored. +# +!includedir /etc/mysql/conf.d/ +!includedir /etc/mysql/mysql.conf.d/ Index: web-module/script/yml/monitoring/server/database.yml =================================================================== diff -u --- web-module/script/yml/monitoring/server/database.yml (revision 0) +++ web-module/script/yml/monitoring/server/database.yml (revision c0c9260f404de2116f14bdd4edb88c1fc0cd0d16) @@ -0,0 +1,62 @@ +version: '3.6' + +services: + + mysqldb: + image: mysql:5.7.32 + hostname: mysqldb + command: + - --lower_case_table_names=1 + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci + ports: + - "3306:3306" + environment: + - MYSQL_DATABASE=www313cokr + - MYSQL_ROOT_PASSWORD=qwe123!@# + - TZ=Asia/Seoul + networks: &mysqldb-network + - mysqldb_network + deploy: + mode: replicated + replicas: 1 + placement: + constraints: [node.role==manager] + volumes: + - mysqldbVolume:/var/lib/mysql + - mysqlTmpVolume:/tmp + - mysqlLogVolume:/var/log/mysql + configs: + - source: my.cnf + target: /etc/mysql/my.cnf + +configs: + my.cnf: + file: ./my.cnf + +volumes: + mysqldbVolume: + driver: local + driver_opts: + type: "nfs" + o: "addr=${NFSSERVER:-1.2.3.4},nolock,soft,rw,sync" + device: ":${NFSPATH:-/nfspath}/mysql" + + mysqlTmpVolume: + driver: local + driver_opts: + type: "nfs" + o: "addr=${NFSSERVER:-1.2.3.4},nolock,soft,rw,sync" + device: ":${NFSPATH:-/nfspath}/mysqlTmp" + + mysqlLogVolume: + driver: local + driver_opts: + type: "nfs" + o: "addr=${NFSSERVER:-1.2.3.4},nolock,soft,rw,sync" + device: ":${NFSPATH:-/nfspath}/mysqlLog" + +networks: + mysqldb_network: + attachable: true + Index: web-module/script/yml/monitoring/server/portainer.yml =================================================================== diff -u -r4990844e5e165134314601c197f73c8b79c9145c -rc0c9260f404de2116f14bdd4edb88c1fc0cd0d16 --- web-module/script/yml/monitoring/server/portainer.yml (.../portainer.yml) (revision 4990844e5e165134314601c197f73c8b79c9145c) +++ web-module/script/yml/monitoring/server/portainer.yml (.../portainer.yml) (revision c0c9260f404de2116f14bdd4edb88c1fc0cd0d16) @@ -14,16 +14,11 @@ - /var/run/docker.sock:/var/run/docker.sock - /var/lib/docker/volumes:/var/lib/docker/volumes networks: - - portainer_network + - agent_network deploy: mode: global placement: constraints: [node.platform.os == linux] - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "100m" portainer: image: portainer/portainer @@ -34,20 +29,15 @@ volumes: - portainer_data:/data networks: - - portainer_network + - agent_network deploy: mode: replicated replicas: 1 placement: constraints: [node.role == manager] - logging: - driver: "json-file" - options: - max-file: "5" - max-size: "100m" networks: - portainer_network: + agent_network: driver: overlay volumes: