Skip to content

Instantly share code, notes, and snippets.

Avatar

Sanketh I iSignal

  • Bay Area, California
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View gist:8ac83a59bab300ed01d0104fd44212de
Name: yb-tserver-0
Namespace: foo
Priority: 0
Node: kind-control-plane/172.17.0.2
Start Time: Tue, 18 Feb 2020 12:50:29 -0800
Labels: app=yb-tserver
controller-revision-hash=yb-tserver-8449f87cc5
statefulset.kubernetes.io/pod-name=yb-tserver-0
Annotations: <none>
Status: Running
View gist:838701acd917590d2fbfba9e17c43e64
version: '2'
services:
yb-master:
image: yugabytedb/yugabyte:2.0.3.0-b7
container_name: yb-master-n1
command: [ "/home/yugabyte/bin/yb-master",
"--fs_data_dirs=/mnt/disk0,/mnt/disk1",
"--master_addresses=yb-master-n1:7100",
"--replication_factor=1",
View gist:1f29af2f309881a6690dc1cd2574695a
[yugabyted:1623] 2019-11-15 11:01:35,610 INFO: | 0.1s | Starting Yugabyte DB (this may take a couple minutes)...
[yugabyted:1623] 2019-11-15 11:01:35,611 INFO: | 0.1s | About to start master with cmd /private/tmp/ybd-test-64E6A870-3E8A-4A0E-9D0B-0AE9CEA10A70/yugabyte-2.0.5.0/bin/yb-master --stop_on_parent_termination --undefok=stop_on_parent_termination --fs_data_dirs=/private/tmp/ybd-test-64E6A870-3E8A-4A0E-9D0B-0AE9CEA10A70/yugabyte-2.0.5.0/yugabyte-data --webserver_interface=127.0.0.1 --metrics_snapshotter_tserver_metrics_whitelist=handler_latency_yb_tserver_TabletServerService_Read_count,handler_latency_yb_tserver_TabletServerService_Write_count,handler_latency_yb_tserver_TabletServerService_Read_sum,handler_latency_yb_tserver_TabletServerService_Write_sum,disk_usage,cpu_usage,node_up --yb_num_shards_per_tserver=1 --ysql_num_shards_per_tserver=1 --master_addresses=127.0.0.1:7100 --rpc_bind_addresses=127.0.0.1:7100 --server_broadcast_addresses=127.0.0.1:7100 --replication_factor=1 --use_initial_sys_catal
View gist:31e340527100d324ec8a99bb097e729e
2019-11-15 18:36:37,336 [INFO] from play.api.db.DefaultDBApi in main - Database [default] connected at jdbc:postgresql://localhost:5433/system_platform
2019-11-15 18:36:39,590 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started Commissioner TaskPool.
2019-11-15 18:36:39,591 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started TaskProgressMonitor thread.
2019-11-15 18:36:41,283 [WARN] from play.api.db.evolutions.ApplicationEvolutions in main - Your production database [default] needs evolutions!
# --- Rev:1,Ups - fda115c
create table access_key (
key_code varchar(255) not null,
provider_uuid uuid not null,
key_info TEXT not null,
View gist:05d8107b227a952f60ffbbe706f8d70e
2019-11-15 18:36:37,336 [INFO] from play.api.db.DefaultDBApi in main - Database [default] connected at jdbc:postgresql://localhost:5433/system_platform
2019-11-15 18:36:39,590 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started Commissioner TaskPool.
2019-11-15 18:36:39,591 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started TaskProgressMonitor thread.
2019-11-15 18:36:41,283 [WARN] from play.api.db.evolutions.ApplicationEvolutions in main - Your production database [default] needs evolutions!
# --- Rev:1,Ups - fda115c
create table access_key (
key_code varchar(255) not null,
provider_uuid uuid not null,
key_info TEXT not null,
View gist:f66656781c759913663c0f98ab4d98e4
[yugabyted:1572] 2019-11-15 18:35:48,187 INFO: | 0.1s | Starting YugabyteDB (this may take a couple minutes)...
[yugabyted:1572] 2019-11-15 18:35:48,187 INFO: | 0.1s | Running the post-installation script /tmp/post_install/yugabyte-2.0.6.0/bin/post_install.sh
[yugabyted:1572] 2019-11-15 18:36:20,087 INFO: | 32.0s | Successfully ran the post-installation script.
[yugabyted:1572] 2019-11-15 18:36:20,088 INFO: | 32.0s | Creating data directory /tmp/post_install/yugabyte-2.0.6.0/yugabyte-data.
[yugabyted:1572] 2019-11-15 18:36:20,088 INFO: | 32.0s | About to start master with cmd /tmp/post_install/yugabyte-2.0.6.0/bin/yb-master --stop_on_parent_termination --undefok=stop_on_parent_termination --fs_data_dirs=/tmp/post_install/yugabyte-2.0.6.0/yugabyte-data --webserver_interface=127.0.0.1 --metrics_snapshotter_tserver_metrics_whitelist=handler_latency_yb_tserver_TabletServerService_Read_count,handler_latency_yb_tserver_TabletServerService_Write_count,handler_latency_yb_tserver_TabletServerService_Read_sum,hand
View yugabyte-statefulset-loadbalancer.yaml
#
# Overall Design:
# There are two Kubernetes StatefulSets in this yaml file - yb-master and yb-tserver. Each of
# these has the following:
# - a headless service to expose a DNS entry for discovery
# - a service to expose end-points to the outside world
# - the stateful set itself
# - a load-balancer service to view the universe dashboard UI
#
# Using YB with k8s
View gist:4910080b52314c38801eea8b10de76ca
2019-09-23 16:00:12,039 INFO: URL being requested: GET https://compute.googleapis.com/compute/beta/projects/yugabyte/aggregated/instances?filter=%28status+eq+RUNNING%29+%28name+eq+yb-admin-sanketh-test-1-n1%29&alt=json&maxResults=1
2019-09-23 16:00:12,040 INFO: Attempting refresh to obtain initial access_token
2019-09-23 16:00:12,052 INFO: Refreshing access_token
2019-09-23 16:00:13,592 INFO: Copying package from local '/opt/yugabyte/releases/1.3.2.1/yugabyte-1.3.2.1-linux.tar.gz' to remote '/tmp/yugabyte-1.3.2.1-linux.tar.gz'
2019-09-23 16:06:57,627 INFO: Configuring Instance: yb-admin-sanketh-test-1-n1
2019-09-23 16:06:57,630 INFO: Creating and copying over client TLS certificate
Traceback (most recent call last):
File "/Users/sanketh/code/yugabyte-db/managed/devops/yb_pyenv/bin/ybcloud.py", line 4, in <module>
__import__('pkg_resources').run_script('ybops==0.4', 'ybcloud.py')
File "/Users/sanketh/code/yugabyte-db/managed/devops/yb_pyenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 6
View gist:84470e26e13a131b0ec8aedc614d293e
# pip install yb-cassandra-driver
from cassandra.cluster import Cluster
import time
import random
from multiprocessing.dummy import Pool as ThreadPool
# Load Phase params
num_write_threads=40
num_keys=200