From 972047a12c235fbb6f98c0b85ea6b13e2af4eee4 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:38:56 -0700 Subject: [PATCH 01/19] add build and release github action, Dockerfile and dockerhub build hook --- .github/workflows/build-release.yaml | 53 ++++++++++++++++++++++++++++ ninjam/server/Dockerfile | 11 ++++++ ninjam/server/hooks/build | 3 ++ 3 files changed, 67 insertions(+) create mode 100644 .github/workflows/build-release.yaml create mode 100644 ninjam/server/Dockerfile create mode 100644 ninjam/server/hooks/build diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml new file mode 100644 index 00000000..e8d21e38 --- /dev/null +++ b/.github/workflows/build-release.yaml @@ -0,0 +1,53 @@ +name: C/C++ CI + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: make + run: make + working-directory: ./ninjam/server + - name: target + run: mkdir target + working-directory: ./ninjam/server + - name: copy-ninjamsrv + run: cp ninjamsrv ./target/ + working-directory: ./ninjam/server + - name: copy-cfg + run: cp example.cfg ./target/config.cfg + working-directory: ./ninjam/server + - name: tar-gz + run: tar -czvf ninjam.tar.gz -C target . + working-directory: ./ninjam/server/ + - uses: actions/upload-artifact@v1 + with: + name: ninjamsrv + path: ./ninjam/server/target + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./ninjam/server/ninjam.tar.gz + asset_name: ninjam.tar.gz + asset_content_type: application/zip diff --git a/ninjam/server/Dockerfile b/ninjam/server/Dockerfile new file mode 100644 index 00000000..1fcb09be --- /dev/null +++ b/ninjam/server/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:latest + +ENV PATH /usr/local/ninjam:$PATH +ARG TAG +ADD https://github.com/zeppelinux/ninjam/releases/download/${TAG}/ninjam.tar.gz /var/tmp/ + +RUN mkdir -p /var/tmp/ninjam && tar -xzf /var/tmp/ninjam.tar.gz -C /var/tmp/ninjam && rm /var/tmp/ninjam.tar.gz && mv /var/tmp/ninjam /usr/local/ +WORKDIR /usr/local/ninjam + +EXPOSE 2049 +CMD ["ninjamsrv", "config.cfg"] diff --git a/ninjam/server/hooks/build b/ninjam/server/hooks/build new file mode 100644 index 00000000..9e489568 --- /dev/null +++ b/ninjam/server/hooks/build @@ -0,0 +1,3 @@ +#!/bin/bash + +docker build --build-arg TAG=$DOCKER_TAG -t $IMAGE_NAME . From b34d8868fd6cc6dff76901f05964093abcf7a94d Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:43:50 -0700 Subject: [PATCH 02/19] rename github action file --- .github/workflows/{build-release.yaml => build-release.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-release.yaml => build-release.yml} (100%) diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yml similarity index 100% rename from .github/workflows/build-release.yaml rename to .github/workflows/build-release.yml From d83b3ced4441622d8ff59335ccfda2801bd28116 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:46:30 -0700 Subject: [PATCH 03/19] Create ccpp.yml --- .github/workflows/ccpp.yml | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml new file mode 100644 index 00000000..31f8fc5b --- /dev/null +++ b/.github/workflows/ccpp.yml @@ -0,0 +1,53 @@ +name: Build & Release + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: make + run: make + working-directory: ./ninjam/server + - name: target + run: mkdir target + working-directory: ./ninjam/server + - name: copy-ninjamsrv + run: cp ninjamsrv ./target/ + working-directory: ./ninjam/server + - name: copy-cfg + run: cp example.cfg ./target/config.cfg + working-directory: ./ninjam/server + - name: tar-gz + run: tar -czvf ninjam.tar.gz -C target . + working-directory: ./ninjam/server/ + - uses: actions/upload-artifact@v1 + with: + name: ninjamsrv + path: ./ninjam/server/target + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./ninjam/server/ninjam.tar.gz + asset_name: ninjam.tar.gz + asset_content_type: application/zip From b3d1ecc39d329cdcb01bfb331206aa71c903977b Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:47:20 -0700 Subject: [PATCH 04/19] Update ccpp.yml --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 31f8fc5b..3051bce1 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -1,4 +1,4 @@ -name: Build & Release +name: Release on: push: From c3f29536bce25b4030be8452ec52b0d5e95f1a1c Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:49:01 -0700 Subject: [PATCH 05/19] Create release.yml --- .github/workflows/release.yml | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..3051bce1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,53 @@ +name: Release + +on: + push: + tags: + - '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: make + run: make + working-directory: ./ninjam/server + - name: target + run: mkdir target + working-directory: ./ninjam/server + - name: copy-ninjamsrv + run: cp ninjamsrv ./target/ + working-directory: ./ninjam/server + - name: copy-cfg + run: cp example.cfg ./target/config.cfg + working-directory: ./ninjam/server + - name: tar-gz + run: tar -czvf ninjam.tar.gz -C target . + working-directory: ./ninjam/server/ + - uses: actions/upload-artifact@v1 + with: + name: ninjamsrv + path: ./ninjam/server/target + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + asset_path: ./ninjam/server/ninjam.tar.gz + asset_name: ninjam.tar.gz + asset_content_type: application/zip From 201e209fad7dc8d164d3ec87f4f82be690787f5c Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:49:40 -0700 Subject: [PATCH 06/19] Delete build-release.yml --- .github/workflows/build-release.yml | 53 ----------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/build-release.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml deleted file mode 100644 index e8d21e38..00000000 --- a/.github/workflows/build-release.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: C/C++ CI - -on: - push: - tags: - - '*' - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: make - run: make - working-directory: ./ninjam/server - - name: target - run: mkdir target - working-directory: ./ninjam/server - - name: copy-ninjamsrv - run: cp ninjamsrv ./target/ - working-directory: ./ninjam/server - - name: copy-cfg - run: cp example.cfg ./target/config.cfg - working-directory: ./ninjam/server - - name: tar-gz - run: tar -czvf ninjam.tar.gz -C target . - working-directory: ./ninjam/server/ - - uses: actions/upload-artifact@v1 - with: - name: ninjamsrv - path: ./ninjam/server/target - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./ninjam/server/ninjam.tar.gz - asset_name: ninjam.tar.gz - asset_content_type: application/zip From 3f231506e3f5b56a915e6ea4cf6e3dd83bb3e03a Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 20:49:52 -0700 Subject: [PATCH 07/19] Delete ccpp.yml --- .github/workflows/ccpp.yml | 53 -------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index 3051bce1..00000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Release - -on: - push: - tags: - - '*' - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: make - run: make - working-directory: ./ninjam/server - - name: target - run: mkdir target - working-directory: ./ninjam/server - - name: copy-ninjamsrv - run: cp ninjamsrv ./target/ - working-directory: ./ninjam/server - - name: copy-cfg - run: cp example.cfg ./target/config.cfg - working-directory: ./ninjam/server - - name: tar-gz - run: tar -czvf ninjam.tar.gz -C target . - working-directory: ./ninjam/server/ - - uses: actions/upload-artifact@v1 - with: - name: ninjamsrv - path: ./ninjam/server/target - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - asset_path: ./ninjam/server/ninjam.tar.gz - asset_name: ninjam.tar.gz - asset_content_type: application/zip From 23d82bb18f7dcb03f087d6535402b2bfcb45130b Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Thu, 26 Mar 2020 21:25:27 -0700 Subject: [PATCH 08/19] Update release.yml --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3051bce1..b6a9bac8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,9 @@ jobs: - name: copy-cfg run: cp example.cfg ./target/config.cfg working-directory: ./ninjam/server + - name: copy-licence + run: cp cclicense.txt ./target/cclicense.txt + working-directory: ./ninjam/server - name: tar-gz run: tar -czvf ninjam.tar.gz -C target . working-directory: ./ninjam/server/ From 8275aa435b154a946b68d0d6ff8a0b6d187db2c5 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 28 Mar 2020 13:17:57 -0700 Subject: [PATCH 09/19] Update release.yml --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6a9bac8..c13b7245 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,3 +54,10 @@ jobs: asset_path: ./ninjam/server/ninjam.tar.gz asset_name: ninjam.tar.gz asset_content_type: application/zip + - name: Docker Hub Description + uses: peter-evans/dockerhub-description@v2.1.0 + env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + DOCKERHUB_REPOSITORY: zeppelinux/ninjam-server + README_FILEPATH: ./ninjam/server/DOCKERHUB.md From f035c17216634a5e922a6f0c178edc43f46d0b84 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 28 Mar 2020 13:30:01 -0700 Subject: [PATCH 10/19] Update release.yml --- .github/workflows/release.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c13b7245..b6a9bac8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,10 +54,3 @@ jobs: asset_path: ./ninjam/server/ninjam.tar.gz asset_name: ninjam.tar.gz asset_content_type: application/zip - - name: Docker Hub Description - uses: peter-evans/dockerhub-description@v2.1.0 - env: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - DOCKERHUB_REPOSITORY: zeppelinux/ninjam-server - README_FILEPATH: ./ninjam/server/DOCKERHUB.md From efd7f4daaa54e853378a1ae7fdd7b929a7b9b2e6 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 4 Apr 2020 16:30:56 -0700 Subject: [PATCH 11/19] Update Dockerfile --- ninjam/server/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ninjam/server/Dockerfile b/ninjam/server/Dockerfile index 1fcb09be..d75874e4 100644 --- a/ninjam/server/Dockerfile +++ b/ninjam/server/Dockerfile @@ -8,4 +8,4 @@ RUN mkdir -p /var/tmp/ninjam && tar -xzf /var/tmp/ninjam.tar.gz -C /var/tmp/ninj WORKDIR /usr/local/ninjam EXPOSE 2049 -CMD ["ninjamsrv", "config.cfg"] +ENTRYPOINT ["ninjamsrv", "config.cfg"] From 18ac3f0fca416b213dcbed7059c8ef09bdce301e Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 4 Apr 2020 16:33:52 -0700 Subject: [PATCH 12/19] add helm charts --- ninjam/server/helm/Chart.yaml | 5 ++ ninjam/server/helm/templates/NOTES.txt | 0 ninjam/server/helm/templates/_helpers.tpl | 32 +++++++++ ninjam/server/helm/templates/config-map.yaml | 72 ++++++++++++++++++++ ninjam/server/helm/templates/deployment.yaml | 51 ++++++++++++++ ninjam/server/helm/templates/service.yaml | 19 ++++++ ninjam/server/helm/values.yaml | 29 ++++++++ 7 files changed, 208 insertions(+) create mode 100755 ninjam/server/helm/Chart.yaml create mode 100755 ninjam/server/helm/templates/NOTES.txt create mode 100755 ninjam/server/helm/templates/_helpers.tpl create mode 100644 ninjam/server/helm/templates/config-map.yaml create mode 100755 ninjam/server/helm/templates/deployment.yaml create mode 100755 ninjam/server/helm/templates/service.yaml create mode 100755 ninjam/server/helm/values.yaml diff --git a/ninjam/server/helm/Chart.yaml b/ninjam/server/helm/Chart.yaml new file mode 100755 index 00000000..e4f0eda5 --- /dev/null +++ b/ninjam/server/helm/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: ninjam-server +version: 0.1.0 diff --git a/ninjam/server/helm/templates/NOTES.txt b/ninjam/server/helm/templates/NOTES.txt new file mode 100755 index 00000000..e69de29b diff --git a/ninjam/server/helm/templates/_helpers.tpl b/ninjam/server/helm/templates/_helpers.tpl new file mode 100755 index 00000000..783b5b1e --- /dev/null +++ b/ninjam/server/helm/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ninjam-server.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ninjam-server.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ninjam-server.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/ninjam/server/helm/templates/config-map.yaml b/ninjam/server/helm/templates/config-map.yaml new file mode 100644 index 00000000..1277d03f --- /dev/null +++ b/ninjam/server/helm/templates/config-map.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ template "ninjam-server.fullname" . }} + labels: + app: {{ template "ninjam-server.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +data: + config.cfg: | + # only one port line allowed (last one will be used) + # these are comments + Port 2049 + + # limit connections of normal users to 10 + MaxUsers 10 + + # limit normal users to 32 channels each, anonymous users to 2 + MaxChannels 32 2 + + ServerLicense cclicense.txt + + #anonymoususers yes or no, or multi (to allow multiple users of the same name from the same IP) + AnonymousUsers no + AnonymousUsersCanChat yes + AnonymousMaskIP yes # shows just the nn.nn.nn.x instead of full IP. + + + AllowHiddenUsers no # set to yes to allow people without channels to not appear in the user list + + + #ACL list lets you specify in order a list, first match is used + ACL 10.0.0.0/8 deny + ACL 192.168.0.0/16 reserve # reserve slots for local + ACL 0.0.0.0/0 allow # allow all + + + #user/password/permissions sets + User administrator myadminpass * # allow all functions + User booga anotherpass CBTKRM # allow chat, bpm/bpi, topic changing, and kicking, a reserved slot, and multiple logins + User myuser mypass # allow default functions (chat, no topic) + + # optional user/pass with simple status retrieving permissions (this also has the advantage of having the server do less work) + # StatusUserPass username password + + DefaultTopic "Welcome to NINJAM. Please play nicely." + DefaultBPM 120 + DefaultBPI 8 + + # two parameters: path to log to, and session length (in minutes). 0 for length means 30 seconds. + # if the first parameter (path) is empty, no logging is done + # SessionArchive . 15 + + + # these two require a full restart to update: + + # write PID file (non-windows version only) + # PIDFile ninjamserver.pid + + # LogFile ninjamserver.log + + + # set keep-alive interval in seconds. should probably not bother + # specifying this, the default is 3, which is adequate. + # SetKeepAlive 3 + + # voting system: + # SetVotingThreshold 50 # sets threshold to 50%. can be 1-100%, or >100 to disable + # SetVotingVoteTimeout 60 # sets timeout before votes are reset, in seconds + + # MOTDFile motd.txt # send this text as a privmsg to all users when they connect diff --git a/ninjam/server/helm/templates/deployment.yaml b/ninjam/server/helm/templates/deployment.yaml new file mode 100755 index 00000000..4b5db705 --- /dev/null +++ b/ninjam/server/helm/templates/deployment.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "ninjam-server.fullname" . }} + labels: + app: {{ template "ninjam-server.name" . }} + chart: {{ template "ninjam-server.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: 1 + selector: + matchLabels: + app: {{ template "ninjam-server.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "ninjam-server.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - name: config-volume + mountPath: /usr/local/ninjam/config.cfg + subPath: config.cfg + ports: + - name: ninjam-tcp + containerPort: 2049 + protocol: TCP + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} + volumes: + - name: config-volume + configMap: + name: {{ template "ninjam-server.fullname" . }} diff --git a/ninjam/server/helm/templates/service.yaml b/ninjam/server/helm/templates/service.yaml new file mode 100755 index 00000000..e4b71344 --- /dev/null +++ b/ninjam/server/helm/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "ninjam-server.fullname" . }} + labels: + app: {{ template "ninjam-server.name" . }} + chart: {{ template "ninjam-server.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: ninjam-tcp + protocol: TCP + name: open + selector: + app: {{ template "ninjam-server.fullname" . }} + release: {{ .Release.Name }} diff --git a/ninjam/server/helm/values.yaml b/ninjam/server/helm/values.yaml new file mode 100755 index 00000000..9f2e6b3b --- /dev/null +++ b/ninjam/server/helm/values.yaml @@ -0,0 +1,29 @@ +# Default values for teamcity. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +image: + repository: zeppelinux/ninjam-server + tag: v0.080 + pullPolicy: IfNotPresent + +service: + type: ClusterIP + port: 2049 + +# We usually recommend not to specify default resources and to leave this as a conscious +# choice for the user. This also increases chances charts run on environments with little +# resources, such as Minikube. If you do want to specify resources, uncomment the following +# lines, adjust them as necessary, and remove the curly braces after 'resources:'. +# limits: +# cpu: 800m +# memory: 968Mi +# requests: +# cpu: 600m +# memory: 968Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} From 210c3985cb3f4f9032a2a96d105fe3f5d6862338 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 4 Apr 2020 17:03:10 -0700 Subject: [PATCH 13/19] Update example.cfg --- ninjam/server/example.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ninjam/server/example.cfg b/ninjam/server/example.cfg index c16dd635..c5fcad5d 100644 --- a/ninjam/server/example.cfg +++ b/ninjam/server/example.cfg @@ -49,7 +49,7 @@ DefaultBPI 8 # write PID file (non-windows version only) # PIDFile ninjamserver.pid -# LogFile ninjamserver.log +LogFile ninjamserver.log # set keep-alive interval in seconds. should probably not bother From bc6020e5972e5abd1ec5db5b96f6ba0f44733554 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 4 Apr 2020 17:05:11 -0700 Subject: [PATCH 14/19] Update Dockerfile --- ninjam/server/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ninjam/server/Dockerfile b/ninjam/server/Dockerfile index d75874e4..32ad5ee6 100644 --- a/ninjam/server/Dockerfile +++ b/ninjam/server/Dockerfile @@ -6,6 +6,8 @@ ADD https://github.com/zeppelinux/ninjam/releases/download/${TAG}/ninjam.tar.gz RUN mkdir -p /var/tmp/ninjam && tar -xzf /var/tmp/ninjam.tar.gz -C /var/tmp/ninjam && rm /var/tmp/ninjam.tar.gz && mv /var/tmp/ninjam /usr/local/ WORKDIR /usr/local/ninjam +# forward request and error logs to docker log collector +RUN ln -sf /dev/stdout ./ninjamserver.log EXPOSE 2049 ENTRYPOINT ["ninjamsrv", "config.cfg"] From 54ffa67ae3970c79c19cc7e2c9adc77369219506 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Sat, 4 Apr 2020 17:17:26 -0700 Subject: [PATCH 15/19] revert forced redirect to stdout --- ninjam/server/Dockerfile | 2 +- ninjam/server/helm/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ninjam/server/Dockerfile b/ninjam/server/Dockerfile index 32ad5ee6..ed85718f 100644 --- a/ninjam/server/Dockerfile +++ b/ninjam/server/Dockerfile @@ -7,7 +7,7 @@ ADD https://github.com/zeppelinux/ninjam/releases/download/${TAG}/ninjam.tar.gz RUN mkdir -p /var/tmp/ninjam && tar -xzf /var/tmp/ninjam.tar.gz -C /var/tmp/ninjam && rm /var/tmp/ninjam.tar.gz && mv /var/tmp/ninjam /usr/local/ WORKDIR /usr/local/ninjam # forward request and error logs to docker log collector -RUN ln -sf /dev/stdout ./ninjamserver.log +#RUN ln -sf /dev/stdout ./ninjamserver.log EXPOSE 2049 ENTRYPOINT ["ninjamsrv", "config.cfg"] diff --git a/ninjam/server/helm/values.yaml b/ninjam/server/helm/values.yaml index 9f2e6b3b..f4a8d214 100755 --- a/ninjam/server/helm/values.yaml +++ b/ninjam/server/helm/values.yaml @@ -4,7 +4,7 @@ image: repository: zeppelinux/ninjam-server - tag: v0.080 + tag: v0.081 pullPolicy: IfNotPresent service: From b0c2c0ac849bf61b6e5bbe2ebe84cb16e17285e5 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Mon, 9 Feb 2026 00:04:55 -0800 Subject: [PATCH 16/19] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b6a9bac8..aa6a1424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,7 +30,7 @@ jobs: - name: tar-gz run: tar -czvf ninjam.tar.gz -C target . working-directory: ./ninjam/server/ - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v4 with: name: ninjamsrv path: ./ninjam/server/target From 56f92ab467921be717321662ef1bf1ba81b4b831 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Mon, 9 Feb 2026 00:16:43 -0800 Subject: [PATCH 17/19] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aa6a1424..3f27560d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: path: ./ninjam/server/target - name: Create Release id: create_release - uses: actions/create-release@v1 + uses: actions/create-release@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -46,7 +46,7 @@ jobs: prerelease: false - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v1 + uses: actions/upload-release-asset@v4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 59d10c8921fa1fcaecd84c026134a09e3a60c809 Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Mon, 9 Feb 2026 00:21:02 -0800 Subject: [PATCH 18/19] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f27560d..c49c9874 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -46,7 +46,7 @@ jobs: prerelease: false - name: Upload Release Asset id: upload-release-asset - uses: actions/upload-release-asset@v4 + uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From 125d6f72fbe9fead6d2a8e053d8bccb1eda9b0de Mon Sep 17 00:00:00 2001 From: Dmitry Shultz Date: Mon, 9 Feb 2026 00:27:15 -0800 Subject: [PATCH 19/19] Update release.yml --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c49c9874..aa6a1424 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: path: ./ninjam/server/target - name: Create Release id: create_release - uses: actions/create-release@v4 + uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: