「CockroachDB」:修訂間差異
跳至導覽
跳至搜尋
第37行: | 第37行: | ||
requests: | requests: | ||
memory: "15Gi" | memory: "15Gi" | ||
env: | |||
- name: LC_ALL | |||
value: en_US.UTF-8 | |||
nodeSelector: | nodeSelector: | ||
instancetype: r5 | instancetype: r5 | ||
第75行: | 第78行: | ||
requests: | requests: | ||
cpu: "7000m" | cpu: "7000m" | ||
env: | |||
- name: LC_ALL | |||
value: en_US.UTF-8 | |||
nodeSelector: | nodeSelector: | ||
instancetype: c5 | instancetype: c5 |
於 2018年12月31日 (一) 18:25 的修訂
CockroachDB是一個資料庫軟體,目標是與PostgreSQL相容。
測試
Kubernetes
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: poc-r5
spec:
replicas: 5
serviceName: cockroachdb-r5
selector:
matchLabels:
app: cockroachdb-r5
template:
metadata:
labels:
app: cockroachdb-r5
spec:
containers:
- name: cockroachdb-r5
image: ubuntu:18.04
command: ["/bin/sh", "-c"]
args:
- export DEBIAN_FRONTEND=noninteractive;
sed -i 's/archive.ubuntu.com/us.archive.ubuntu.com/' /etc/apt/sources.list;
apt update;
apt install -y iproute2 iputils-ping locales mtr-tiny net-tools tzdata vim-nox wget;
cd /tmp;
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.3.linux-amd64.tgz | tar xvz;
cp -i cockroach-v2.1.3.linux-amd64/cockroach /usr/local/bin;
sleep 3153600000
resources:
requests:
memory: "15Gi"
env:
- name: LC_ALL
value: en_US.UTF-8
nodeSelector:
instancetype: r5
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: poc-c5
spec:
replicas: 1
serviceName: cockroachdb-c5
selector:
matchLabels:
app: cockroachdb-c5
template:
metadata:
labels:
app: cockroachdb-c5
spec:
containers:
- name: cockroachdb-c5
image: ubuntu:18.04
command: ["/bin/sh", "-c"]
args:
- export DEBIAN_FRONTEND=noninteractive;
sed -i 's/archive.ubuntu.com/us.archive.ubuntu.com/' /etc/apt/sources.list;
apt update;
apt install -y ant default-jdk git iproute2 iputils-ping locales mtr-tiny net-tools openjdk-8-jdk postgresql-client tzdata vim-nox wget;
update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java;
cd /root;
git clone https://github.com/oltpbenchmark/oltpbench.git;
cd oltpbench;
sed -i -e 's/^ALTER TABLE/-- ALTER TABLE/' src/com/oltpbenchmark/benchmarks/tpcc/ddls/tpcc-postgres-ddl.sql;
ant clean;
ant;
sleep 3153600000
resources:
requests:
cpu: "7000m"
env:
- name: LC_ALL
value: en_US.UTF-8
nodeSelector:
instancetype: c5