Skip to content

Instantly share code, notes, and snippets.

View tahmmee's full-sized avatar
🗯️
Voilà

Tommie McAfee tahmmee

🗯️
Voilà
View GitHub Profile
@tahmmee
tahmmee / arduino_gsm_hello.ino
Created August 2, 2017 01:30
AT commands for gsm shield with audio
#include <SoftwareSerial.h>
#include <string.h>
char incoming_char = 0;
SoftwareSerial cell(2, 3);
const char* commands[]={"ATZ",
"AT",
@tahmmee
tahmmee / longevity_test_info.md
Created July 18, 2017 15:40
About longevity testing

The test running with query, search, views, xdcr, and a gateway service fetching dcp streams. There are 7 data nodes, 3 index nodes, 2 query nodes, 2 fts nodes, 1 sync gateway.

The test steps regarding data loading and query rate are listed below, and the way to interpret each line is as follows:

[2017-07-16T09:34:25-07:00, sequoiatools/pillowfight:9b4ae1] -U couchbase://172.23.108.103/default?select_bucket=true -M 512 -I 2000 -B 200 -t 1 --rate-limit 2000 -P password

Is equivalent to running the following docker command:

- hosts: tag_Type_couchbaseserver_data_cluster1
vars:
sudo: yes
rpm_path: "/tmp/couchbase.rpm"
remote_user: centos
become: yes
become_method: sudo
serial: 20
tasks:
- copy:
./sequoia -test tests/integration/test_allFeaturesWithReplica.yml -scope tests/integration/scope_ReplicaIndex.yml --dry_run --skip_pull --expose_ports --skip_setup
→ parsed tests/integration/scope_ReplicaIndex.yml
→ parsed tests/integration/test_allFeaturesWithReplica.yml
[pull] sequoiatools/couchbase-cli:5.0
→ parsed tests/templates/rebalance.yml
→ parsed tests/templates/vegeta.yml
→ parsed tests/templates/kv.yml
→ parsed tests/templates/fts.yml
→ parsed tests/templates/n1ql.yml
sequoiatools/tpcc [wait:true] ./run.sh 172.17.0.10:8093 util/cbcrindex.sql
# start sdkdclient and save container id
- image: sdkdclient
command: <params>
alias: SdkdContainer
# reference it later
- image: sdkd-java
command: ./burn ... {{.ContainerIP `SdkdContainer`}}
@tahmmee
tahmmee / sdk_sg.yml
Created May 15, 2017 17:33
sdk with sync gateway
- include: tests/templates/rebalance.yml
# start gateway
-
image: couchbase/sync-gateway
command: "-url http://{{.Orchestrator}} -bucket {{.Bucket}}"
alias: SYNC_GATEWAY
# start sdk test (async)
-
{
"profile": {
"likes": 57182,
"friends": [
"59D58FD723",
"03B40B383F",
"EE0393135E",
"DBEA32B09E",
"20C41131E5"
],
@tahmmee
tahmmee / create_delete.yml
Last active April 20, 2017 15:49
create delete with gideon
# start gideon loader (let it run in background)
-
image: sequoiatools/gideon
command: "kv --ops 1000 --create 100 --hosts {{.Orchestrator}} --bucket {{.Bucket}}"
alias: GideonContainer
# monitor item count
-
template: wait_for_items
@tahmmee
tahmmee / collect_sg.sh
Created April 17, 2017 15:19
pytest collect sync_gateway tests
root@ubuntu:~/workspace/test_repo_updater# pytest mobile-testkit/testsuites/syncgateway/functional/tests --collect-only
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/_pytest/config.py", line 338, in _importconftest
mod = conftestpath.pyimport()
File "/usr/local/lib/python2.7/dist-packages/py/_path/local.py", line 650, in pyimport
__import__(modname)
File "/usr/local/lib/python2.7/dist-packages/_pytest/assertion/rewrite.py", line 207, in load_module
py.builtin.exec_(co, mod.__dict__)
File "/usr/local/lib/python2.7/dist-packages/py/_builtin.py", line 221, in exec_
exec2(obj, globals, locals)
@tahmmee
tahmmee / rbac_python_sdk.py
Last active April 11, 2017 17:32
rbac with python sdk
from couchbase.cluster import Cluster, ClassicAuthenticator, PasswordAuthenticator
host = "172.17.0.2"
port = 8091
bucket = "default"
password = "password"
bucket_password = ""
endpoint = 'couchbase://{0}?select_bucket=true'.format(host )