This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: golang:latest | |
variables: | |
REPO_NAME: gitlab.com/***/*** | |
before_script: | |
- go version | |
- echo $CI_BUILD_REF | |
- echo $CI_PROJECT_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------- | |
Setup Install HAProxy 1.8 on Ubuntu 16 | |
---------------------------------------- | |
sudo apt-get install software-properties-common | |
sudo add-apt-repository ppa:vbernat/haproxy-1.8 | |
sudo apt-get update | |
apt-cache policy haproxy | |
sudo apt install haproxy | |
sudo update-rc.d haproxy enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Something like this: | |
+----------+ +-----------+ | |
| |+----SSH+-->| | | |
| A | | B | | |
|+--------+| | | | |
Internet <-++-+PROXY<++<SSH Tunnel--+ | | |
|+--------+| | | | |
+----------+ +-----------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global] | |
; Override default pid file | |
pid = /run/php-fpm.pid | |
; Avoid logs being sent to syslog | |
error_log = /proc/self/fd/2 | |
[www] | |
; Access from webserver container is via network, not socket file | |
listen = [::]:9000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Template my.cnf for PXC | |
# Edit to your requirements. | |
[mysqld] | |
server-id=1 | |
datadir=/var/lib/mysql | |
socket=/var/run/mysqld/mysqld.sock | |
log-error=/var/log/mysqld.log | |
pid-file=/var/run/mysqld/mysqld.pid | |
log-bin | |
log_slave_updates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
# Path to Galera library | |
wsrep_provider=/usr/lib/galera3/libgalera_smm.so | |
# Cluster connection URL contains IPs of nodes | |
#If no IP is found, this implies that a new cluster needs to be created, | |
#in order to do that you need to bootstrap this node | |
wsrep_cluster_address=gcomm://172.16.10.20,172.16.20.20,172.16.30.20 | |
# In order for Galera to work correctly binlog format should be ROW |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while IFS='' read -r line || [[ -n "$line" ]]; do | |
echo '' | db2struct --host localhost -d farayad --package farayad -p --user root --struct=$line -t $line --gorm --guregu | |
done < "$1" | |
usage: | |
1-show tables; | |
2-store table name in tablename.txt file. | |
3- run: bash mysql2go.sh tablename.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# nginx server with http + ssl/https (Front) | |
# /etc/nginx/sites-available/example.com | |
server { | |
listen 80; | |
server_name example.com; | |
location / { | |
proxy_pass http://no-ssl:8080; | |
proxy_set_header Host $host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update && sudo apt upgrade -y | |
sudo apt install strongswan -y | |
sudo vi /etc/sysctl.conf | |
net.ipv4.ip_forward = 1 | |
net.ipv4.conf.all.accept_redirects = 0 | |
net.ipv4.conf.all.send_redirects = 0 | |
sudo sysctl -p /etc/sysctl.conf | |
openssl rand -base64 64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### KERNEL TUNING ### | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 | |
vm.dirty_ratio = 60 | |
vm.dirty_background_ratio = 2 |