-
-
Notifications
You must be signed in to change notification settings - Fork 4
test(omid): added omid kuttl test #515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
09e2817
test(omid): added omid kuttl test
razvan 7633917
fix: settle on the minimal TSO memory limits
razvan 7168a85
fix: successful omid test run in kind
razvan c0ae3e6
fix: yaml lint
razvan 6366474
add imagePullPolicy for omid
razvan dfcac3d
Update tests/templates/kuttl/omid/00-limit-range.yaml
razvan ffc0d60
Update tests/templates/kuttl/omid/10-assert.yaml
razvan 22b34de
Update tests/templates/kuttl/omid/20-assert.yaml
razvan deb2072
Update tests/templates/kuttl/omid/40-assert.yaml
razvan 5a84255
Update tests/templates/kuttl/omid/50-setup-example-tx-table.yaml
razvan 902268c
Update tests/templates/kuttl/omid/50-assert.yaml
razvan 04de048
test with latest zk and hdfs
razvan ec31074
clean up hbase installation
razvan 3f9a077
Merge branch 'main' into test/omid-2
razvan aadb2bf
use official image (not sandbox)
razvan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: LimitRange | ||
metadata: | ||
name: limit-request-ratio | ||
spec: | ||
limits: | ||
- type: "Container" | ||
maxLimitRequestRatio: | ||
cpu: 5 | ||
memory: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% if test_scenario['values']['openshift'] == 'true' %} | ||
# see https://github.com/stackabletech/issues/issues/566 | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' | ||
timeout: 120 | ||
{% endif %} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vector-aggregator-discovery | ||
{% endif %} |
9 changes: 9 additions & 0 deletions
9
tests/templates/kuttl/omid/01-install-vector-aggregator-discovery-configmap.yaml.j2
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: vector-aggregator-discovery | ||
data: | ||
ADDRESS: {{ lookup('env', 'VECTOR_AGGREGATOR') }} | ||
{% endif %} |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-zk-server-default | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
apiVersion: zookeeper.stackable.tech/v1alpha1 | ||
kind: ZookeeperCluster | ||
metadata: | ||
name: test-zk | ||
spec: | ||
image: | ||
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %} | ||
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}" | ||
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}" | ||
{% else %} | ||
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" | ||
{% endif %} | ||
pullPolicy: IfNotPresent | ||
clusterConfig: | ||
listenerClass: cluster-internal | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
vectorAggregatorConfigMapName: vector-aggregator-discovery | ||
{% endif %} | ||
servers: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 | ||
--- | ||
apiVersion: zookeeper.stackable.tech/v1alpha1 | ||
kind: ZookeeperZnode | ||
metadata: | ||
name: test-znode | ||
spec: | ||
clusterRef: | ||
name: test-zk |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hdfs-namenode-default | ||
status: | ||
readyReplicas: 2 | ||
replicas: 2 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hdfs-journalnode-default | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hdfs-datanode-default | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
apiVersion: hdfs.stackable.tech/v1alpha1 | ||
kind: HdfsCluster | ||
metadata: | ||
name: test-hdfs | ||
spec: | ||
image: | ||
{% if test_scenario['values']['hdfs-latest'].find(",") > 0 %} | ||
custom: "{{ test_scenario['values']['hdfs-latest'].split(',')[1] }}" | ||
productVersion: "{{ test_scenario['values']['hdfs-latest'].split(',')[0] }}" | ||
{% else %} | ||
productVersion: "{{ test_scenario['values']['hdfs-latest'] }}" | ||
{% endif %} | ||
pullPolicy: IfNotPresent | ||
clusterConfig: | ||
zookeeperConfigMapName: test-znode | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
vectorAggregatorConfigMapName: vector-aggregator-discovery | ||
{% endif %} | ||
nameNodes: | ||
config: | ||
listenerClass: cluster-internal | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 2 | ||
dataNodes: | ||
config: | ||
listenerClass: cluster-internal | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 | ||
journalNodes: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
metadata: | ||
name: install-hbase | ||
timeout: 600 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hbase-master-default | ||
spec: | ||
template: | ||
spec: | ||
terminationGracePeriodSeconds: 1200 | ||
status: | ||
readyReplicas: 2 | ||
replicas: 2 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hbase-regionserver-default | ||
spec: | ||
template: | ||
spec: | ||
terminationGracePeriodSeconds: 3600 | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: test-hbase-restserver-default | ||
spec: | ||
template: | ||
spec: | ||
terminationGracePeriodSeconds: 300 | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
apiVersion: hbase.stackable.tech/v1alpha1 | ||
kind: HbaseCluster | ||
metadata: | ||
name: test-hbase | ||
spec: | ||
image: | ||
{% if test_scenario['values']['hbase'].find(",") > 0 %} | ||
custom: "{{ test_scenario['values']['hbase'].split(',')[1] }}" | ||
productVersion: "{{ test_scenario['values']['hbase'].split(',')[0] }}" | ||
{% else %} | ||
productVersion: "{{ test_scenario['values']['hbase'] }}" | ||
{% endif %} | ||
pullPolicy: IfNotPresent | ||
clusterConfig: | ||
hdfsConfigMapName: test-hdfs | ||
zookeeperConfigMapName: test-znode | ||
listenerClass: cluster-internal | ||
{% if lookup('env', 'VECTOR_AGGREGATOR') %} | ||
vectorAggregatorConfigMapName: vector-aggregator-discovery | ||
{% endif %} | ||
masters: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 2 | ||
regionServers: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 | ||
restServers: | ||
config: | ||
logging: | ||
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} | ||
roleGroups: | ||
default: | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
timeout: 240 | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: omid-tso-server | ||
status: | ||
readyReplicas: 1 | ||
replicas: 1 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: omid-examples-client-config | ||
data: | ||
hbase-omid-client-config.yml: | | ||
# Secure HBase credentials, core-site.xml and hbase-site.xml are expected to be in the classpath | ||
# It's used for secure HBase only and ignored otherwise | ||
# principal: omid_hbase_client | ||
# keytab: /path/to/hbase/client/keytab | ||
omidClientConfiguration: !!org.apache.omid.tso.client.OmidClientConfiguration | ||
connectionString: "localhost:54758" | ||
log4j2.properties: | | ||
status = warn | ||
dest = err | ||
name = PropertiesConfig | ||
|
||
# console | ||
appender.console.type = Console | ||
appender.console.target = SYSTEM_OUT | ||
appender.console.name = console | ||
appender.console.layout.type = PatternLayout | ||
appender.console.layout.pattern = %d{ISO8601} %-5p [%t] %c{2}: %m%n | ||
|
||
rootLogger = WARN,console | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
name: omid-tso-server | ||
labels: | ||
app: omid-tso-server | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: omid-tso-server | ||
template: | ||
metadata: | ||
labels: | ||
app: omid-tso-server | ||
spec: | ||
containers: | ||
- name: omid-tso-server | ||
{% if test_scenario['values']['omid'].find(",") > 0 %} | ||
image: "{{ test_scenario['values']['omid'].split(',')[1] }}" | ||
{% else %} | ||
image: docker.stackable.tech/stackable/omid:"{{ test_scenario['values']['omid'] }}"-stackable0.0.0-dev | ||
{% endif %} | ||
imagePullPolicy: IfNotPresent | ||
command: | ||
- /bin/bash | ||
- -x | ||
- -euo | ||
- pipefail | ||
- -c | ||
args: | ||
- ./bin/omid.sh create-hbase-commit-table && ./bin/omid.sh create-hbase-timestamp-table && ./bin/omid.sh tso | ||
resources: | ||
# The TSO server seems to be extremely memory hungry. | ||
# We arrived at these (minimal) settings after much trial and error. | ||
# See also the JVM_FLAGS environment variable below. | ||
requests: | ||
memory: "4Gi" | ||
cpu: "500m" | ||
limits: | ||
memory: "4Gi" | ||
cpu: "1" | ||
volumeMounts: | ||
- name: hbase-config | ||
mountPath: /stackable/conf/hbase | ||
- name: hdfs-config | ||
mountPath: /stackable/conf/hdfs | ||
- name: omid-examples-client-config | ||
mountPath: /stackable/omid-examples/conf | ||
env: | ||
- name: HBASE_CONF_DIR | ||
value: /stackable/conf/hbase | ||
- name: HADOOP_CONF_DIR | ||
value: /stackable/conf/hdfs | ||
- name: JVM_FLAGS | ||
value: "-Xmx3g -Xms3g" | ||
ports: | ||
# See also hbase-omid-client-config.yml above where the client is configured with this port | ||
- containerPort: 54758 | ||
name: tso | ||
protocol: TCP | ||
readinessProbe: | ||
# The tso server takes a while to start up, so we need to be patient. | ||
failureThreshold: 3 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
tcpSocket: | ||
port: tso | ||
timeoutSeconds: 2 | ||
volumes: | ||
- name: hbase-config | ||
configMap: | ||
name: test-hbase | ||
- name: hdfs-config | ||
configMap: | ||
name: test-hdfs | ||
- name: omid-examples-client-config | ||
configMap: | ||
name: omid-examples-client-config |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestAssert | ||
commands: | ||
- script: kubectl exec --namespace=$NAMESPACE omid-tso-server-0 -- bash -c "/stackable/omid-examples/run.sh basic" | ||
timeout: 240 |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
apiVersion: kuttl.dev/v1beta1 | ||
kind: TestStep | ||
commands: | ||
- script: kubectl exec --namespace=$NAMESPACE test-hbase-master-default-0 -- bash -c "echo -e \"create 'MY_TX_TABLE', {NAME => 'MY_CF', VERSIONS => '2147483647', TTL => '2147483647'}\" | /stackable/hbase/bin/hbase shell" | ||
timeout: 240 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave the review of this file to @soenkeliebau, as it differs from the one our customer is using and I have no clue about omid.