我试图在kubernetes的docker镜像上运行rundeck。我想知道是否有rundeck.feature.jobLifecyclePlugin.enabled
的env变量要添加到docker compose文件中。我在文档的任何地方都找不到它。希望对此有所帮助。
答案 0 :(得分:0)
我尝试在this之类的撰写文件的“环境”部分使用RUNDECK_FEATURE_JOBLIFECYCLEPLUGIN_ENABLED: 'true'
,但在rundeck-config.properties
文件上创建以下行:rundeck.feature.joblifecycleplugin.enabled=true
(所有小写,需要rundeck.feature.jobLifecyclePlugin.enabled=true
,配置区分大小写)。
您可以使用Remco添加它。看一下this(检查“扩展配置”部分),here是一个很好的示例进行测试。
就我而言,我将其添加到rundeck-config-extra.properties
文件(在mydocker/remco/templates/
路径中)。
# adding extra stuff to rundeck-config.properties file
rundeck.feature.jobLifecyclePlugin.enabled={{ getv("/rundeck/feature/joblifecycleplugin/enabled", "true") }}
这是在rundeck-config.properties-extra.toml
(在mydocker/remco/resources.d/
路径上)
[[template]]
src = "${REMCO_TEMPLATE_DIR}/rundeck-config-extra.properties"
dst = "${REMCO_TMP_DIR}/rundeck-config/rundeck-config-extra.properties"
mode = "0644"
我的docker-compose.yaml
(在mydocker/
路径下):
version: '3'
services:
rundeckserver:
build:
context: .
dockerfile: Dockerfile
args:
url: http://localhost:4440
ports:
- "4440:4440"
restart: always
我的Dockerfile
(在mydocker/
路径上,还复制一个从here获得的示例插件):
FROM rundeck/rundeck:3.2.4
COPY --chown=rundeck:root remco /etc/remco
COPY --chown=rundeck:root volume/job-lifecycle-3.2.3-20200221.jar /home/rundeck/libext/
ARG url=""
ENV RUNDECK_SERVER_ADDRESS=0.0.0.0
ENV RUNDECK_GRAILS_URL=$url
然后您需要做(在mydocker/
路径下):
docker-compose build
后来:
docker-compose up
这会在rundeck-config.properties
文件中添加以下行:
# adding extra stuff to rundeck-config.properties file
rundeck.feature.jobLifecyclePlugin.enabled=true
最后,看看result。