Skip to content

Commit f30c183

Browse files
committed
HBASE-27831 Introduce zookeeper-single-instance component
1 parent db5cf72 commit f30c183

File tree

17 files changed

+1009
-0
lines changed

17 files changed

+1009
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ linklint-*.zip
2121
linklint/
2222
.checkstyle
2323
**/.checkstyle
24+
25+
# detritus produced by kuttl
26+
kubeconfig*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<!--
6+
/**
7+
* Licensed to the Apache Software Foundation (ASF) under one
8+
* or more contributor license agreements. See the NOTICE file
9+
* distributed with this work for additional information
10+
* regarding copyright ownership. The ASF licenses this file
11+
* to you under the Apache License, Version 2.0 (the
12+
* "License"); you may not use this file except in compliance
13+
* with the License. You may obtain a copy of the License at
14+
*
15+
* http://www.apache.org/licenses/LICENSE-2.0
16+
*
17+
* Unless required by applicable law or agreed to in writing, software
18+
* distributed under the License is distributed on an "AS IS" BASIS,
19+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20+
* See the License for the specific language governing permissions and
21+
* limitations under the License.
22+
*/
23+
-->
24+
<modelVersion>4.0.0</modelVersion>
25+
<parent>
26+
<artifactId>hbase-kubernetes-deployment</artifactId>
27+
<groupId>org.apache.hbase.operator.tools</groupId>
28+
<version>${revision}</version>
29+
<relativePath>..</relativePath>
30+
</parent>
31+
32+
<artifactId>hbase-kubernetes-kustomize</artifactId>
33+
<name>Apache HBase - Kubernetes Kustomize</name>
34+
<description>Kustomize deployment descriptors.</description>
35+
<packaging>pom</packaging>
36+
37+
<dependencies>
38+
<dependency>
39+
<groupId>org.apache.hbase.operator.tools</groupId>
40+
<artifactId>hbase-kubernetes-testing-image</artifactId>
41+
<type>pom</type>
42+
<scope>test</scope>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.codehaus.mojo</groupId>
50+
<artifactId>exec-maven-plugin</artifactId>
51+
<configuration>
52+
<executable>src/test/resources/mvn_exec_run_kuttl.sh</executable>
53+
<useMavenLogger>true</useMavenLogger>
54+
<skip>${skipTests}</skip>
55+
</configuration>
56+
<executions>
57+
<execution>
58+
<id>kuttl-unit-tests</id>
59+
<phase>test</phase>
60+
<goals>
61+
<goal>exec</goal>
62+
</goals>
63+
<configuration>
64+
<arguments>
65+
<argument>--config</argument>
66+
<argument>src/test/resources/kuttl-test-unit.yaml</argument>
67+
<argument>--artifacts-dir</argument>
68+
<argument>target/kuttl-reports</argument>
69+
</arguments>
70+
</configuration>
71+
</execution>
72+
<execution>
73+
<id>kuttl-integration-tests</id>
74+
<phase>verify</phase>
75+
<goals>
76+
<goal>exec</goal>
77+
</goals>
78+
<configuration>
79+
<arguments>
80+
<argument>--config</argument>
81+
<argument>src/test/resources/kuttl-test-integration.yaml</argument>
82+
<argument>--artifacts-dir</argument>
83+
<argument>target/kuttl-reports</argument>
84+
</arguments>
85+
</configuration>
86+
</execution>
87+
</executions>
88+
</plugin>
89+
</plugins>
90+
</build>
91+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
19+
Uses latest image from the apache zookeeper project.
20+
There is then a start script in 'single-instance/start.sh'
21+
which sets parameters for the zookeeper image and process
22+
on startup. Currently only logs to STDOUT/STDERR; there
23+
are no files in /var/log/zookeeper.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
---
17+
apiVersion: kustomize.config.k8s.io/v1alpha1
18+
kind: Component
19+
20+
configMapGenerator:
21+
- name: zookeeper-scripts
22+
files:
23+
- start.sh
24+
# Publish where the zk ensemble can be found.
25+
- name: zookeeper-quorum
26+
literals:
27+
# Hard-coded. Default we expect a simple standalone zk at this location.
28+
# One define is for hbase, the other for hadoop.
29+
- HBASE_ZOOKEEPER_QUORUM="zookeeper-0.zookeeper-headless"
30+
- HA_ZOOKEEPER_QUORUM="zookeeper-0.zookeeper-headless:2181"
31+
options:
32+
disableNameSuffixHash: true
33+
34+
resources:
35+
- zookeeper.yaml

0 commit comments

Comments
 (0)