Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: infamousjoeg/rundeck-playground
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: jsboak/rundeck-playground
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 5 commits
  • 13 files changed
  • 2 contributors

Commits on Aug 4, 2021

  1. Updated makefile to use latest bootstrap and place tools in easier to…

    … access directories
    Jake Cohen committed Aug 4, 2021
    Copy the full SHA
    94c23bf View commit details
  2. fixing minor inconveniences with Dockerfiles

    Jake Cohen committed Aug 4, 2021
    Copy the full SHA
    296ea94 View commit details
  3. Adding remco files to automatically add private repository to Rundeck…

    … server
    Jake Cohen committed Aug 4, 2021
    Copy the full SHA
    c2b4f6a View commit details
  4. Update README.md

    jsboak authored Aug 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    997a3e7 View commit details
  5. Update README.md

    jsboak authored Aug 4, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f50d532 View commit details
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ NETWORK_NAME := $(CONTAINER_PREFIX)default
NUM_WEB := 2

# Command to call the Rundeck client from outside of the container
RD := tools/rd-0.1.0-SNAPSHOT/bin/rd
RD := tools/bin/rd

# RD env vars
export RD_URL ?= http://127.0.0.1:4440
@@ -62,7 +62,7 @@ $(RD_MAKE_STATE_DIR)/%.scriptplugin: $(PLUGIN_OUTPUT_DIR)/%.zip $(RD)
echo "Version already exists for $<"; \
exit 1; \
else \
$(RD) plugins upload -f "$<" && echo "$$NEW_VERSION" > $@ && rm -f $(RD_PLUGIN_INSTALLED_STATE); \
$(RD) plugins upload -r private -f "$<" && echo "$$NEW_VERSION" > $@ && rm -f $(RD_PLUGIN_INSTALLED_STATE); \
fi

# Creates the Rundeck project and sets its config properties
@@ -96,18 +96,20 @@ $(RD_MAKE_STATE_DIR)/%.key: $(RD_KEYS_DIR)/% $(RD)
keys: $(RD_KEYS_STATES)

# Tools
PLUGIN_BOOTSTRAP := tools/rundeck-plugin-bootstrap-0.1.0-SNAPSHOT/bin/rundeck-plugin-bootstrap
PLUGIN_BOOTSTRAP := tools/tools/rundeck-plugin-bootstrap-0.1.0-SNAPSHOT/bin/rundeck-plugin-bootstrap
tools: $(RD) $(PLUGIN_BOOTSTRAP)
# tools: $(RD)

$(PLUGIN_BOOTSTRAP):
@echo "====[rundeck-plugin-bootstrap] Installing"
@docker-compose up --build rundeck-plugin-bootstrap
@docker cp rundeck-playground_rundeck-plugin-bootstrap_1:/root/tools/ .
@docker cp rundeck-playground_rundeck-plugin-bootstrap_1:/root/tools/ ./tools

$(RD):
@echo "====[rd] Installing"
@docker-compose up --build rundeck-cli
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/ .
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/bin ./tools
@docker cp rundeck-playground_rundeck-cli_1:/root/tools/lib ./tools

env:
@echo 'export RD_URL="$(RD_URL)";'
@@ -180,5 +182,5 @@ $(RD_MAKE_STATE_DIR)/%.javaplugin: $(PLUGINS_SRC_DIR)/%/gradlew $(PLUGINS_SRC_DI
echo "====[$* Java plugin] ERROR: Version $$NEW_VERSION already exists. Update plugin version in $(PLUGINS_SRC_DIR)/$*/build.gradle"; \
exit 1; \
else \
$(PWD)/$(RD) plugins upload -f "$$JARFILE" && echo "$$NEW_VERSION" > $(PWD)/$@ && rm -f $(PWD)/$(RD_PLUGIN_INSTALLED_STATE); \
$(PWD)/$(RD) plugins upload -r private -f "$$JARFILE" && echo "$$NEW_VERSION" > $(PWD)/$@ && rm -f $(PWD)/$(RD_PLUGIN_INSTALLED_STATE); \
fi
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Rundeck playground

### Note:
Gradle build of bootstrapped plugins may not work depending on your gradle version. After creating the bootstrapped plugin, I change "compile" -> "implementation" and "testCompile" to "testImplementation."

## Overview

This is a Docker environment to help you develop and test Rundeck plugins in a distributed system.
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ services:
build:
context: rundeck-cli
args:
COMMIT: f20b69dc8e43462bf71a78dcb549997c86a51995
VERSION: "1.3.10"
image: playground-rundeck-cli

# plugin bootstrap tool
@@ -22,13 +22,15 @@ services:
build:
context: rundeck-plugin-bootstrap
args:
COMMIT: c3ebc59c35eb824d359c04370127aff4e64e6d70
COMMIT: 2349c5d285801b241d7d4fee041e2d26d13cc8fb
image: playground-rundeck-plugin-bootstrap

# backend
database:
build: database
image: playground-database
environment:
POSTGRES_PASSWORD: theSecret3st1
volumes:
- db-data:/var/lib/postgresql/data

@@ -68,4 +70,4 @@ services:

volumes:
rundeck-data:
db-data:
db-data:
16 changes: 9 additions & 7 deletions rundeck-cli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

FROM openjdk:8-jdk
COPY --from=gradle:jdk8 /opt/gradle /opt/gradle
RUN ln -s /opt/gradle/bin/gradle /usr/bin/gradle
ARG COMMIT
RUN mkdir /root/rd && curl -sL https://github.com/rundeck/rundeck-cli/archive/${COMMIT}.zip > /root/rd/rd.zip
ARG VERSION
RUN mkdir /root/tools/
RUN mkdir /root/rd && curl -sL https://github.com/rundeck/rundeck-cli/releases/download/v${VERSION}/rd-${VERSION}.zip > /root/rd/rd.zip
RUN cd /root/rd/ \
&& unzip rd.zip \
&& cd rundeck-cli-${COMMIT} \
&& gradle --no-daemon :distZip
RUN unzip -d /root/tools /root/rd/rundeck-cli-${COMMIT}/build/distributions/rd-0.1.0-SNAPSHOT.zip \
&& rm -rf /root/rd
&& unzip rd.zip
RUN cp -r /root/rd/rd-${VERSION}/bin /root/tools/ && cp -r /root/rd/rd-${VERSION}/lib /root/tools/

# && mv root/rd/rd-${VERSION} /root/tools \
# && rm -rf /root/rd
4 changes: 2 additions & 2 deletions rundeck-plugin-bootstrap/Dockerfile
Original file line number Diff line number Diff line change
@@ -7,6 +7,6 @@ RUN cd /root/plugin-bootstrap \
&& unzip plugin-bootstrap.zip \
&& rm plugin-bootstrap.zip \
&& cd plugin-bootstrap-${COMMIT} \
&& gradle --no-daemon build :distZip
&& ./gradlew --no-daemon build :distZip -x test
RUN unzip -d /root/tools/ /root/plugin-bootstrap/plugin-bootstrap-${COMMIT}/build/distributions/rundeck-plugin-bootstrap-0.1.0-SNAPSHOT.zip \
&& rm -rf /root/plugin-bootstrap
&& rm -rf /root/plugin-bootstrap
2 changes: 2 additions & 0 deletions rundeck/Dockerfile
Original file line number Diff line number Diff line change
@@ -5,3 +5,5 @@ RUN chmod 0700 /home/rundeck/.ssh \
&& chmod 0600 /home/rundeck/.ssh/* \
&& chmod 0644 /home/rundeck/.ssh/*.pub
COPY --chown=rundeck:rundeck nodes.yaml /home/rundeck/

COPY --chown=rundeck:root remco /etc/remco
Binary file added rundeck/remco/.DS_Store
Binary file not shown.
Binary file added rundeck/remco/resources.d/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[template]]
src = "${REMCO_TEMPLATE_DIR}/artifact-repositories-private.yaml"
dst = "${REMCO_TMP_DIR}/artifact-repositories/artifact-repositories-private.yaml"
mode = "0644"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[template]]
src = "${REMCO_TEMPLATE_DIR}/rundeck-config-features.properties"
dst = "${REMCO_TMP_DIR}/rundeck-config/rundeck-config-features.properties"
mode = "0644"
Binary file added rundeck/remco/templates/.DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions rundeck/remco/templates/artifact-repositories-private.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repositories:
- repositoryName: Official
enabled: true
type: HTTP
owner: RUNDECK
- repositoryName: private
type: STORAGE_TREE
4 changes: 4 additions & 0 deletions rundeck/remco/templates/rundeck-config-features.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rundeck.feature.repository.enabled=true
# rundeck.repository.artifacts.provider.1.type=file
# rundeck.repository.artifacts.provider.1.path=/artifacts
# rundeck.repository.artifacts.provider.1.config.baseDir=/repository