无法在stackstorm HA(K8)上安装包

时间:2020-05-06 22:45:41

标签: kubernetes kubernetes-helm

我一直试图使用这些链接在单个节点K8群集上安装自定义包。

https://github.com/StackStorm/st2packs-dockerfiles/

https://github.com/stackstorm/stackstorm-ha

Stackstorm已使用默认的仪表板成功安装,但是当我尝试构建自定义包并进行头盔升级时,它无法正常工作。

这是我的stackstorm包目录和映像Dockerfile:

/home/manisha.tanwar/st2packs-dockerfiles # ll st2packs-image/packs/st2_chef/
total 28
drwxr-xr-x. 4 manisha.tanwar domain users 4096 Apr 28 16:11 actions
drwxr-xr-x. 2 manisha.tanwar domain users 4096 Apr 28 16:11 aliases
-rwxr-xr-x. 1 manisha.tanwar domain users  211 Apr 28 16:11 pack.yaml
-rwxr-xr-x. 1 manisha.tanwar domain users   65 Apr 28 16:11 README.md
-rwxr-xr-x. 1 manisha.tanwar domain users  293 Apr 28 17:47 requirements.txt
drwxr-xr-x. 2 manisha.tanwar domain users 4096 Apr 28 16:11 rules
drwxr-xr-x. 2 manisha.tanwar domain users 4096 Apr 28 16:11 sensors

/home/manisha.tanwar/st2packs-dockerfiles#cat st2packs-image / Dockerfile

ARG PACKS="file:///tmp/stackstorm-st2"
FROM stackstorm/st2packs:builder AS builder

COPY packs/st2_chef /tmp/stackstorm-st2/
RUN ls -la /tmp/stackstorm-st2
RUN git config --global http.sslVerify false

# Install custom packs
RUN /opt/stackstorm/st2/bin/st2-pack-install ${PACKS}

###########################
# Minimize the image size. Start with alpine:3.8,
# and add only packs and virtualenvs from builder.
FROM stackstorm/st2packs:runtime

使用命令创建图像 docker build -t st2_chef:v0.0.2 st2packs-image

然后我如下更改了values.yaml:

  packs:
    configs:
      packs.yaml: |
        ---
        # chef pack
    image:
      name: st2_chef
      tag: 0.0.1
      pullPolicy: Always

然后运行 helm upgrade <release-name>. 但它不会在仪表板和cmd上显示任何内容。

请帮助,我们正计划从独立的stackstorm升级到Stackstorm HA,我需要为此完成POC。

提前谢谢!

1 个答案:

答案 0 :(得分:1)

在社区的帮助下进行了努力。如果有人想关注,这里是链接:

https://github.com/StackStorm/stackstorm-ha/issues/128

我没有使用docker registery推送图像并将其用于掌舵配置。

将values.yaml更新为:

  packs:
    # Custom StackStorm pack configs. Each record creates a file in '/opt/stackstorm/configs/'
    # https://docs.stackstorm.com/reference/pack_configs.html#configuration-file
    configs:
      core.yaml: |
        ---
    image:
      # Uncomment the following block to make the custom packs image available to the necessary pods
      #repository: your-remote-docker-registry.io
      repository: manishatanwar
      name: st2_nagios
      tag: "0.0.1"
      pullPolicy: Always
相关问题