Skip to content

Instantly share code, notes, and snippets.

View harryge00's full-sized avatar

Haoyuan Ge harryge00

  • Ant Financial
  • Hangzhou
View GitHub Profile
@harryge00
harryge00 / my.cnf
Created February 11, 2020 06:13
mysql config
[mysqld]
port = 3306
back_log = 3000
character_set_server = utf8
max_connect_errors = 100
max_connections = 2000
max_user_connections = 2000
max_heap_table_size = 64M
max_allowed_packet = 1024M
max_binlog_size = 500M
@harryge00
harryge00 / my.cnf
Created February 11, 2020 06:13
mysql config
[mysqld]
port = 3306
back_log = 3000
character_set_server = utf8
max_connect_errors = 100
max_connections = 2000
max_user_connections = 2000
max_heap_table_size = 64M
max_allowed_packet = 1024M
max_binlog_size = 500M
@harryge00
harryge00 / gitlab-dcos.json
Created January 9, 2020 06:03
dcos gitlab json
{
"id": "/gitlab",
"constraints": [
[
"hostname",
"CLUSTER",
""
]
],
@harryge00
harryge00 / add-backend-frontend.py
Last active May 13, 2020 02:09
Add backend/frontend pair for DC/OS edge-lb pool
#!/usr/bin/env python
import json
import os
import toml
from os.path import expanduser
import requests
import argparse
import sys
import re
from urlparse import urljoin
@harryge00
harryge00 / haproxy.cfg
Created December 8, 2019 16:47
haproxy.cfg
global
daemon
log 127.0.0.1 local0 debug
maxconn 4096
#nbproc 1
pidfile /var/run/haproxy.pid
#pidfile /mnt/mesos/sandbox/CONF_SHARE_DATA/haproxy.pid
#chroot /usr/local/etc/haproxy
defaults

Intro

This guide will introduce how to use Tencent Cloud's object storage as a "proxy" for AWS S3.

Create a Tencent Cloud bucket

[mysqld]
port = 3306
back_log = 3000
character_set_server = utf8
max_connect_errors = 100
max_connections = 2000
max_user_connections = 2000
max_heap_table_size = 64M
max_allowed_packet = 1024M
max_binlog_size = 500M
@harryge00
harryge00 / haproxy.cfg
Created October 23, 2019 03:07
haproxy.cfg
global
daemon
nbproc 1
pidfile /var/run/haproxy.pid
chroot /usr/local/etc/haproxy
defaults
mode tcp
retries 3
option redispatch
@harryge00
harryge00 / slave.cnf
Created October 23, 2019 03:03
MySQL slave config
[mysqld]
port = 3306
back_log = 3000
character_set_server = utf8
max_connect_errors = 100
max_connections = 2000
max_user_connections = 2000
max_heap_table_size = 64M
max_allowed_packet = 1024M
max_binlog_size = 500M

使用腾讯云备份Cassandra

2.5.0-3.11.3版本开始,dcos cassandra 兼容S3协议对象存储的备份,腾讯云的的对象存储cos兼容AWS S3协议,所以针对s3的脚本也可以应用于腾讯云。

备份 Cassandra 数据

以腾讯云上海地区的存储(cos.ap-shanghai.myqcloud.com)为例,执行如下命令,cassandra的数据将被备份:

export AWS_ACCESS_KEY_ID=#{腾讯云的KEY_ID}	
export AWS_SECRET_ACCESS_KEY=#{腾讯云的secret_key}
export S3_BUCKET_NAME=#{腾讯云cos桶名}
dcos cassandra plan start backup-s3 \