Skip to content

Commit

Permalink
remove pika operator (OpenAtomFoundation#2405)
Browse files Browse the repository at this point in the history
Co-authored-by: Xin.Zh <dragoncharlie@foxmail.com>
  • Loading branch information
2 people authored and brother-jin committed Apr 8, 2024
1 parent bf5e97c commit d7c92a7
Show file tree
Hide file tree
Showing 75 changed files with 42 additions and 5,798 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/operator.yml

This file was deleted.

62 changes: 20 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Users can directly download the latest binary version package from [releases](ht
cd output && make
```
Other components, such as codis and pika_operator, can also be compiled using build.sh.
Other components, such as codis, can also be compiled using build.sh.
```bash
# Compile codis, default target, build-all
Expand All @@ -171,8 +171,6 @@ Users can directly download the latest binary version package from [releases](ht
# Compile codis, but only build codis-proxy
./build.sh codis codis-proxy
# Compile pika_operator
./build.sh operator
```
* #### 2.4 Start Pika
Expand Down Expand Up @@ -235,46 +233,26 @@ Users can directly download the latest binary version package from [releases](ht
./build_docker.sh -p linux/amd64 -t private_registry/pika:latest
```

* #### 3.3 Deployment with Pika-operator

Using pika-operator simplifies the deployment of a single-instance pika in a Kubernetes environment.
* #### 3.3 Running with docker-compose

>Note: Do not use this feature in a production environment.

Local installation:

1. Install [MiniKube](https://minikube.sigs.k8s.io/docs/start/)

2. Deploy Pika-operator

```bash
cd tools/pika_operator
make minikube-up # run this if you don't have a minikube cluster
make local-deploy
```

3. Create a Pika instance

```bash
cd tools/pika_operator
kubectl apply -f examples/pika-sample/
```

4. Check the Pika status

```bash
kubectl get pika pika-sample
```

5. Get Pika instance information

```bash
kubectl run pika-sample-test \
--image redis -it --rm --restart=Never \
-- /usr/local/bin/redis-cli -h pika-sample -p 9221 info
```


docker-compose.yaml
```yaml
pikadb:
image: pikadb/pika:lastest
container_name: pikadb
ports:
- "6379:9221"
volumes:
- ./data/pika:/pika/log
# Specify the configuration file path. If you need to specify a configuration file, specify it here.
# Note: pika.conf should be in the ./deploy/pika directory
#- ./deploy/pika:/pika/conf
- ./data/pika/db:/pika/db
- ./data/pika/dump:/pika/dump
- ./data/pika/dbsync:/pika/dbsync
privileged: true
restart: always
```

## Performance test

Expand Down
65 changes: 22 additions & 43 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,14 @@ Pika 力求在完全兼容 Redis 协议、 继承 Redis 便捷运维设计的前
cd output && make
```

其他子组件,如 `codis` `pika_operator` 也可以用 `build.sh` 进行编译。
其他子组件,如 `codis` 也可以用 `build.sh` 进行编译。

```bash
# 编译 codis, 默认 target,build-all
./build.sh codis
# 编译 codis, 但只构建 codis-proxy
./build.sh codis codis-proxy
# 编译 pika_operator
./build.sh operator
```

* #### 2.4 启动 Pika
Expand Down Expand Up @@ -229,43 +226,26 @@ Pika 力求在完全兼容 Redis 协议、 继承 Redis 便捷运维设计的前
./build_docker.sh -p linux/amd64 -t private_registry/pika:latest
```

* #### 3.3 使用 pika-operator 部署

使用 `pika-operator` 可以简单地在 Kubernetes 环境中部署单实例 `pika`
>注:__请勿在生产环境中使用此功能__。

本地安装:

1. 安装 [MiniKube](https://minikube.sigs.k8s.io/docs/start/)

2. 部署 Pika-operator

```bash
cd tools/pika_operator
make minikube-up # run this if you don't have a minikube cluster
make local-deploy
```

3. 创建 Pika 实例

```bash
cd tools/pika_operator
kubectl apply -f examples/pika-sample/
```

4. 检查 Pika 状态

```bash
kubectl get pika pika-sample
```

5. 获取 Pika 实例信息

```bash
kubectl run pika-sample-test \
--image redis -it --rm --restart=Never \
-- /usr/local/bin/redis-cli -h pika-sample -p 9221 info
```
* #### 3.4 使用 docker-compose

docker-compose.yaml

```yaml
pikadb:
image: pikadb/pika:lastest
container_name: pikadb
ports:
- "6379:9221"
volumes:
- ./data/pika:/pika/log
# 指定配置文件路径,如果有需要指定配置文件则在这里指定 注意: pika.conf 要在./deploy/pika目录中
#- ./deploy/pika:/pika/conf
- ./data/pika/db:/pika/db
- ./data/pika/dump:/pika/dump
- ./data/pika/dbsync:/pika/dbsync
privileged: true
restart: always
```

## Pika 未来工作规划

Expand All @@ -281,8 +261,7 @@ Pika 力求在完全兼容 Redis 协议、 继承 Redis 便捷运维设计的前

* 1. 提升 Slot 迁移速度, 提升 Operator 扩缩容的效率
* 2. 升级 Codis-proxy
* 3. Pika-operator
* 4. Codis-proxy性能指标监控
* 3. Codis-proxy性能指标监控

## Pika 发版特性时间轴

Expand Down
10 changes: 0 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,6 @@ if [[ "${ARGS[0]}" = "codis" ]]; then
exit 0
fi

if [[ "${ARGS[0]}" = "operator" ]]; then
pushd tools/pika_operator
if [[ "${CLEAN_BUILD}" = "true" ]]; then
rm -rf bin
fi
make -j ${CPU_CORE} "${ARGS[@]:1}"
popd
exit 0
fi

source ./utils/Get_OS_Version.sh

function version_compare() {
Expand Down
4 changes: 0 additions & 4 deletions tools/pika_operator/.dockerignore

This file was deleted.

26 changes: 0 additions & 26 deletions tools/pika_operator/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions tools/pika_operator/Dockerfile

This file was deleted.

Loading

0 comments on commit d7c92a7

Please sign in to comment.