├── .github
├── FUNDING.yml
├── ct.yaml
├── kubeval.sh
└── workflows
│ ├── ci.yaml
│ └── release.yaml
├── Dockerfile
├── LICENSE
├── README.md
├── charts
└── genieacs
│ ├── .helmignore
│ ├── Chart.yaml
│ ├── templates
│ ├── NOTES.txt
│ ├── _helpers.tpl
│ ├── deployment.yaml
│ ├── ingress.yaml
│ ├── pvc.yaml
│ ├── services.yaml
│ └── tests
│ │ └── test-connection.yaml
│ └── values.yaml
├── docker-compose.yml
├── extra
└── logo.png
├── genieacs-deploy-helmfile
├── genieacs.yaml
├── helmfile.yaml
├── mongo-secret.yaml
└── mongo.yaml
└── genieacs.logrotate
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: geiser # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12 | polar: # Replace with a single Polar username
13 | buy_me_a_coffee: geiser # Replace with a single Buy Me a Coffee username
14 | thanks_dev: # Replace with a single thanks.dev username
15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 |
--------------------------------------------------------------------------------
/.github/ct.yaml:
--------------------------------------------------------------------------------
1 | helm-extra-args: --timeout 600
2 | check-version-increment: true
3 | debug: true
--------------------------------------------------------------------------------
/.github/kubeval.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -euo pipefail
3 |
4 | CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/master -- charts | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')"
5 | KUBEVAL_VERSION="0.14.0"
6 | SCHEMA_LOCATION="https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/"
7 |
8 | # install kubeval
9 | curl --silent --show-error --fail --location --output /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/"${KUBEVAL_VERSION}"/kubeval-linux-amd64.tar.gz
10 | tar -xf /tmp/kubeval.tar.gz kubeval
11 |
12 | # validate charts
13 | for CHART_DIR in ${CHART_DIRS}; do
14 | helm template "${CHART_DIR}" | ./kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
15 | done
--------------------------------------------------------------------------------
/.github/workflows/ci.yaml:
--------------------------------------------------------------------------------
1 | name: Lint and Test Charts
2 |
3 | on:
4 | pull_request:
5 | paths:
6 | - 'charts/**'
7 |
8 | jobs:
9 |
10 | lint-chart:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout
14 | uses: actions/checkout@v1
15 | - name: Run chart-testing (lint)
16 | uses: helm/chart-testing-action@master
17 | with:
18 | command: lint
19 | config: .github/ct.yaml
20 |
21 |
22 | kubeval-chart:
23 | runs-on: ubuntu-latest
24 | needs:
25 | - lint-chart
26 | - lint-docs
27 | strategy:
28 | matrix:
29 | k8s:
30 | - v1.12.10
31 | - v1.13.12
32 | - v1.14.10
33 | - v1.15.11
34 | - v1.16.8
35 | - v1.17.4
36 | steps:
37 | - name: Checkout
38 | uses: actions/checkout@v1
39 | - name: Run kubeval
40 | env:
41 | KUBERNETES_VERSION: ${{ matrix.k8s }}
42 | run: .github/kubeval.sh
43 |
44 | install-chart:
45 | name: install-chart
46 | runs-on: ubuntu-latest
47 | needs:
48 | - lint-chart
49 | - kubeval-chart
50 | strategy:
51 | matrix:
52 | k8s:
53 | - v1.12.10
54 | - v1.13.12
55 | - v1.14.10
56 | - v1.15.7
57 | - v1.16.4
58 | - v1.17.2
59 | steps:
60 | - name: Checkout
61 | uses: actions/checkout@v1
62 | - name: Create kind ${{ matrix.k8s }} cluster
63 | uses: helm/kind-action@master
64 | with:
65 | node_image: kindest/node:${{ matrix.k8s }}
66 | - name: Run chart-testing (install)
67 | uses: helm/chart-testing-action@master
68 | with:
69 | command: install
70 | config: .github/ct.yaml
--------------------------------------------------------------------------------
/.github/workflows/release.yaml:
--------------------------------------------------------------------------------
1 | name: Release Charts
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | paths:
8 | - 'charts/**'
9 |
10 | jobs:
11 | release:
12 | runs-on: ubuntu-latest
13 | steps:
14 | - name: Checkout
15 | uses: actions/checkout@v1
16 | - name: Configure Git
17 | run: |
18 | git config user.name "$GITHUB_ACTOR"
19 | git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
20 | - name: Run chart-releaser
21 | uses: helm/chart-releaser-action@master
22 | env:
23 | CR_TOKEN: '${{ secrets.CR_TOKEN }}'
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | # syntax=docker/dockerfile:1
2 | ############################
3 | # GenieACS v1.2 Dockerfile #
4 | ####################################################################
5 | # docker buildx build --platform linux/amd64,linux/arm64 \ #
6 | # -t drumsergio/genieacs:version -t drumsergio/genieacs:latest \ #
7 | # --push . #
8 | ####################################################################
9 | FROM node:24-bookworm AS build
10 | LABEL maintainer="acsdesk@protonmail.com"
11 |
12 | # packages needed only to build genieacs
13 | RUN apt-get update \
14 | && apt-get install -y git python3 make g++ \
15 | && rm -rf /var/lib/apt/lists/*
16 |
17 | # Install GenieACS
18 | WORKDIR /opt
19 | ARG GENIEACS_VERSION=v1.2.13
20 | RUN git clone --depth 1 --single-branch \
21 | --branch "${GENIEACS_VERSION}" \
22 | https://github.com/genieacs/genieacs.git
23 | #RUN npm install -g --unsafe-perm genieacs@1.2.13
24 |
25 | WORKDIR /opt/genieacs
26 | RUN npm ci --unsafe-perm
27 | #RUN npm i -D tslib
28 | RUN npm run build
29 |
30 | ###########################################
31 | # ----- helper stage: service files ------#
32 | ###########################################
33 |
34 | FROM debian:bookworm-slim AS services
35 | RUN apt-get update && \
36 | apt-get install -y --no-install-recommends git ca-certificates && \
37 | rm -rf /var/lib/apt/lists/*
38 | WORKDIR /tmp
39 | RUN git clone --depth 1 --single-branch --branch 1.2.13 \
40 | https://github.com/GeiserX/genieacs-services.git
41 |
42 | ##################################
43 | # -------- Final image ----------#
44 | ##################################
45 | FROM debian:bookworm-slim
46 |
47 | RUN apt-get update \
48 | && apt-get install -y --no-install-recommends \
49 | supervisor ca-certificates iputils-ping logrotate \
50 | && rm -rf /var/lib/apt/lists/*
51 |
52 | # Copy Node runtime and GenieACS artefacts from the build stage
53 | COPY --from=build /usr/local /usr/local
54 | COPY --from=build /opt/genieacs /opt/genieacs
55 |
56 | # supervisor + helper scripts from the services repo
57 | COPY --from=services /tmp/genieacs-services/supervisord.conf \
58 | /etc/supervisor/conf.d/genieacs.conf
59 | COPY --from=services /tmp/genieacs-services/run_with_env.sh \
60 | /usr/local/bin/run_with_env.sh
61 | RUN chmod +x /usr/local/bin/run_with_env.sh
62 |
63 | # logrotate rule
64 | COPY genieacs.logrotate /etc/logrotate.d/genieacs
65 |
66 | # create runtime user
67 | RUN useradd --system --no-create-home --home /opt/genieacs genieacs \
68 | && mkdir -p /opt/genieacs/ext /var/log/genieacs \
69 | && chown -R genieacs:genieacs /opt/genieacs /var/log/genieacs
70 |
71 | USER genieacs
72 | WORKDIR /opt/genieacs
73 |
74 | EXPOSE 7547 7557 7567 3000
75 | CMD ["/usr/bin/supervisord","-c","/etc/supervisor/conf.d/genieacs.conf"]
76 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU LESSER GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 |
9 | This version of the GNU Lesser General Public License incorporates
10 | the terms and conditions of version 3 of the GNU General Public
11 | License, supplemented by the additional permissions listed below.
12 |
13 | 0. Additional Definitions.
14 |
15 | As used herein, "this License" refers to version 3 of the GNU Lesser
16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU
17 | General Public License.
18 |
19 | "The Library" refers to a covered work governed by this License,
20 | other than an Application or a Combined Work as defined below.
21 |
22 | An "Application" is any work that makes use of an interface provided
23 | by the Library, but which is not otherwise based on the Library.
24 | Defining a subclass of a class defined by the Library is deemed a mode
25 | of using an interface provided by the Library.
26 |
27 | A "Combined Work" is a work produced by combining or linking an
28 | Application with the Library. The particular version of the Library
29 | with which the Combined Work was made is also called the "Linked
30 | Version".
31 |
32 | The "Minimal Corresponding Source" for a Combined Work means the
33 | Corresponding Source for the Combined Work, excluding any source code
34 | for portions of the Combined Work that, considered in isolation, are
35 | based on the Application, and not on the Linked Version.
36 |
37 | The "Corresponding Application Code" for a Combined Work means the
38 | object code and/or source code for the Application, including any data
39 | and utility programs needed for reproducing the Combined Work from the
40 | Application, but excluding the System Libraries of the Combined Work.
41 |
42 | 1. Exception to Section 3 of the GNU GPL.
43 |
44 | You may convey a covered work under sections 3 and 4 of this License
45 | without being bound by section 3 of the GNU GPL.
46 |
47 | 2. Conveying Modified Versions.
48 |
49 | If you modify a copy of the Library, and, in your modifications, a
50 | facility refers to a function or data to be supplied by an Application
51 | that uses the facility (other than as an argument passed when the
52 | facility is invoked), then you may convey a copy of the modified
53 | version:
54 |
55 | a) under this License, provided that you make a good faith effort to
56 | ensure that, in the event an Application does not supply the
57 | function or data, the facility still operates, and performs
58 | whatever part of its purpose remains meaningful, or
59 |
60 | b) under the GNU GPL, with none of the additional permissions of
61 | this License applicable to that copy.
62 |
63 | 3. Object Code Incorporating Material from Library Header Files.
64 |
65 | The object code form of an Application may incorporate material from
66 | a header file that is part of the Library. You may convey such object
67 | code under terms of your choice, provided that, if the incorporated
68 | material is not limited to numerical parameters, data structure
69 | layouts and accessors, or small macros, inline functions and templates
70 | (ten or fewer lines in length), you do both of the following:
71 |
72 | a) Give prominent notice with each copy of the object code that the
73 | Library is used in it and that the Library and its use are
74 | covered by this License.
75 |
76 | b) Accompany the object code with a copy of the GNU GPL and this license
77 | document.
78 |
79 | 4. Combined Works.
80 |
81 | You may convey a Combined Work under terms of your choice that,
82 | taken together, effectively do not restrict modification of the
83 | portions of the Library contained in the Combined Work and reverse
84 | engineering for debugging such modifications, if you also do each of
85 | the following:
86 |
87 | a) Give prominent notice with each copy of the Combined Work that
88 | the Library is used in it and that the Library and its use are
89 | covered by this License.
90 |
91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license
92 | document.
93 |
94 | c) For a Combined Work that displays copyright notices during
95 | execution, include the copyright notice for the Library among
96 | these notices, as well as a reference directing the user to the
97 | copies of the GNU GPL and this license document.
98 |
99 | d) Do one of the following:
100 |
101 | 0) Convey the Minimal Corresponding Source under the terms of this
102 | License, and the Corresponding Application Code in a form
103 | suitable for, and under terms that permit, the user to
104 | recombine or relink the Application with a modified version of
105 | the Linked Version to produce a modified Combined Work, in the
106 | manner specified by section 6 of the GNU GPL for conveying
107 | Corresponding Source.
108 |
109 | 1) Use a suitable shared library mechanism for linking with the
110 | Library. A suitable mechanism is one that (a) uses at run time
111 | a copy of the Library already present on the user's computer
112 | system, and (b) will operate properly with a modified version
113 | of the Library that is interface-compatible with the Linked
114 | Version.
115 |
116 | e) Provide Installation Information, but only if you would otherwise
117 | be required to provide such information under section 6 of the
118 | GNU GPL, and only to the extent that such information is
119 | necessary to install and execute a modified version of the
120 | Combined Work produced by recombining or relinking the
121 | Application with a modified version of the Linked Version. (If
122 | you use option 4d0, the Installation Information must accompany
123 | the Minimal Corresponding Source and Corresponding Application
124 | Code. If you use option 4d1, you must provide the Installation
125 | Information in the manner specified by section 6 of the GNU GPL
126 | for conveying Corresponding Source.)
127 |
128 | 5. Combined Libraries.
129 |
130 | You may place library facilities that are a work based on the
131 | Library side by side in a single library together with other library
132 | facilities that are not Applications and are not covered by this
133 | License, and convey such a combined library under terms of your
134 | choice, if you do both of the following:
135 |
136 | a) Accompany the combined library with a copy of the same work based
137 | on the Library, uncombined with any other library facilities,
138 | conveyed under the terms of this License.
139 |
140 | b) Give prominent notice with the combined library that part of it
141 | is a work based on the Library, and explaining where to find the
142 | accompanying uncombined form of the same work.
143 |
144 | 6. Revised Versions of the GNU Lesser General Public License.
145 |
146 | The Free Software Foundation may publish revised and/or new versions
147 | of the GNU Lesser General Public License from time to time. Such new
148 | versions will be similar in spirit to the present version, but may
149 | differ in detail to address new problems or concerns.
150 |
151 | Each version is given a distinguishing version number. If the
152 | Library as you received it specifies that a certain numbered version
153 | of the GNU Lesser General Public License "or any later version"
154 | applies to it, you have the option of following the terms and
155 | conditions either of that published version or of any later version
156 | published by the Free Software Foundation. If the Library as you
157 | received it does not specify a version number of the GNU Lesser
158 | General Public License, you may choose any version of the GNU Lesser
159 | General Public License ever published by the Free Software Foundation.
160 |
161 | If the Library as you received it specifies that a proxy can decide
162 | whether future versions of the GNU Lesser General Public License shall
163 | apply, that proxy's public statement of acceptance of any version is
164 | permanent authorization for you to choose that version for the
165 | Library.
166 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Deployment tools for GenieACS
4 |
5 | 
6 | [](https://github.com/GeiserX/genieacs-docker/blob/main/LICENSE)
7 |
8 | This project contains two methods to deploy GenieACS in your environment:
9 | 1. Docker compose method
10 | 2. Helm chart (Helmfile) method
11 |
12 |
13 | ## Table of Contents
14 |
15 | - [Background](#background)
16 | - [Install](#install)
17 | - [Maintainers](#maintainers)
18 | - [Contributing](#contributing)
19 |
20 | ## Background
21 |
22 | This project was conceived long time ago with the idea of easing the deploment of GenieACS, and especially enabling it to run in Red Hat Linux. The project evolved and now it is the default method to install GenieACS (community version).
23 |
24 | ## Install
25 |
26 | This project uses a [Docker container](https://hub.docker.com/repository/docker/drumsergio/genieacs) to deploy GenieACS. Use docker compose to deploy it seamlessly.
27 |
28 | ```sh
29 | $ docker compose up -d
30 | ```
31 |
32 | As an alternative, for Kubernetes clusters, there is the option to deploy it via Helm chart. The example from the repository uses Helmfile:
33 |
34 | ```bash
35 | helmfile -f genieacs-deploy-helmfile/helmfile.yaml -i apply
36 | ```
37 |
38 | ## Maintainers
39 |
40 | [@GeiserX](https://github.com/GeiserX).
41 |
42 | ## Contributing
43 |
44 | Feel free to dive in! [Open an issue](https://github.com/GeiserX/genieacs-docker/issues/new) or submit PRs.
45 |
46 | GenieACS-Docker follows the [Contributor Covenant](http://contributor-covenant.org/version/2/1/) Code of Conduct.
47 |
--------------------------------------------------------------------------------
/charts/genieacs/.helmignore:
--------------------------------------------------------------------------------
1 | # Patterns to ignore when building packages.
2 | # This supports shell glob matching, relative path matching, and
3 | # negation (prefixed with !). Only one pattern per line.
4 | .DS_Store
5 | # Common VCS dirs
6 | .git/
7 | .gitignore
8 | .bzr/
9 | .bzrignore
10 | .hg/
11 | .hgignore
12 | .svn/
13 | # Common backup files
14 | *.swp
15 | *.bak
16 | *.tmp
17 | *.orig
18 | *~
19 | # Various IDEs
20 | .project
21 | .idea/
22 | *.tmproj
23 | .vscode/
24 |
--------------------------------------------------------------------------------
/charts/genieacs/Chart.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v2
2 | name: genieacs
3 | description: A Helm chart for GenieACS app
4 | type: application
5 | version: 0.1.0
6 | appVersion: "1.2.13"
7 | maintainers:
8 | - name: Sergio Fernandez
9 | email: acsdesk@protonmail.com
--------------------------------------------------------------------------------
/charts/genieacs/templates/NOTES.txt:
--------------------------------------------------------------------------------
1 | GenieACS has been deployed successfully!
2 |
3 | 1. To access the GenieACS UI, follow these instructions:
4 |
5 | {{- if .Values.ingress.enabled }}
6 | The GenieACS UI is accessible at:
7 |
8 | {{- range .Values.ingress.hosts }}
9 | http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}{{ (index .paths 0).path }}
10 | {{- end }}
11 | {{- else }}
12 | NOTE: The ingress is disabled, and you might need to use port-forwarding to access the UI.
13 |
14 | Run the following command to forward the port:
15 |
16 | kubectl --namespace {{ .Release.Namespace }} port-forward svc/{{ include "genieacs.fullname" . }}-http 8080:{{ .Values.service_http.port_http }}
17 |
18 | Then access the UI at: http://127.0.0.1:8080/
19 | {{- end }}
20 |
21 | 2. Ensure that the MongoDB database is running and accessible. If you enabled the bundled MongoDB chart, it should be running within your cluster.
22 |
23 | 3. For further configuration and customization, refer to the GenieACS Docker documentation and modify the `values.yaml` as needed.
--------------------------------------------------------------------------------
/charts/genieacs/templates/_helpers.tpl:
--------------------------------------------------------------------------------
1 | {{/*
2 | Expand the name of the chart.
3 | */}}
4 | {{- define "genieacs.name" -}}
5 | {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6 | {{- end }}
7 |
8 | {{/*
9 | Create a default fully qualified app name.
10 | We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11 | If release name contains chart name it will be used as a full name.
12 | */}}
13 | {{- define "genieacs.fullname" -}}
14 | {{- if .Values.fullnameOverride }}
15 | {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16 | {{- else }}
17 | {{- $name := default .Chart.Name .Values.nameOverride }}
18 | {{- if contains $name .Release.Name }}
19 | {{- .Release.Name | trunc 63 | trimSuffix "-" }}
20 | {{- else }}
21 | {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22 | {{- end }}
23 | {{- end }}
24 | {{- end }}
25 |
26 | {{/*
27 | Create chart name and version as used by the chart label.
28 | */}}
29 | {{- define "genieacs.chart" -}}
30 | {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31 | {{- end }}
32 |
33 | {{/*
34 | Common labels
35 | */}}
36 | {{- define "genieacs.labels" -}}
37 | helm.sh/chart: {{ include "genieacs.chart" . }}
38 | {{ include "genieacs.selectorLabels" . }}
39 | {{- if .Chart.AppVersion }}
40 | app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41 | {{- end }}
42 | app.kubernetes.io/managed-by: {{ .Release.Service }}
43 | {{- end }}
44 |
45 | {{/*
46 | Selector labels
47 | */}}
48 | {{- define "genieacs.selectorLabels" -}}
49 | app.kubernetes.io/name: {{ include "genieacs.name" . }}
50 | app.kubernetes.io/instance: {{ .Release.Name }}
51 | {{- end }}
52 |
53 | {{/*
54 | Create the name of the service account to use
55 | */}}
56 | {{- define "genieacs.serviceAccountName" -}}
57 | {{- if .Values.serviceAccount.create }}
58 | {{- default (include "genieacs.fullname" .) .Values.serviceAccount.name }}
59 | {{- else }}
60 | {{- default "default" .Values.serviceAccount.name }}
61 | {{- end }}
62 | {{- end }}
63 |
--------------------------------------------------------------------------------
/charts/genieacs/templates/deployment.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: {{ include "genieacs.fullname" . }}
5 | labels:
6 | {{- include "genieacs.labels" . | nindent 4 }}
7 | spec:
8 | replicas: {{ .Values.replicaCount }}
9 | selector:
10 | matchLabels:
11 | {{- include "genieacs.selectorLabels" . | nindent 6 }}
12 | template:
13 | metadata:
14 | labels:
15 | {{- include "genieacs.selectorLabels" . | nindent 8 }}
16 | spec:
17 | containers:
18 | - name: {{ .Chart.Name }}
19 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
20 | imagePullPolicy: {{ .Values.image.pullPolicy }}
21 | env:
22 | {{- range $key, $value := .Values.env }}
23 | - name: {{ $key }}
24 | value: "{{ $value }}"
25 | {{- end }}
26 | - name: GENIEACS_MONGODB_CONNECTION_URL
27 | value: "{{ .Values.mongodb.connectionURL | default (printf "mongodb://%s-mongodb/%s" (include "genieacs.fullname" .) "genieacs") }}"
28 | ports:
29 | - name: http
30 | containerPort: {{ .Values.service_http.port_http }}
31 | - name: cwmp
32 | containerPort: {{ .Values.service_cwmp.port_cwmp }}
33 | - name: nbi
34 | containerPort: {{ .Values.service_nbi.port_nbi }}
35 | - name: fs
36 | containerPort: {{ .Values.service_fs.port_fs }}
37 | volumeMounts:
38 | - name: opt-volume
39 | mountPath: /opt
40 | resources:
41 | limits:
42 | {{- toYaml .Values.resources.limits | nindent 12 }}
43 | requests:
44 | {{- toYaml .Values.resources.requests | nindent 12 }}
45 | volumes:
46 | - name: opt-volume
47 | persistentVolumeClaim:
48 | claimName: {{ include "genieacs.fullname" . }}-pvc
49 | restartPolicy: Always
--------------------------------------------------------------------------------
/charts/genieacs/templates/ingress.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.ingress.enabled }}
2 | apiVersion: networking.k8s.io/v1
3 | kind: Ingress
4 | metadata:
5 | name: {{ include "genieacs.fullname" . }}
6 | labels:
7 | {{- include "genieacs.labels" . | nindent 4 }}
8 | annotations:
9 | {{- toYaml .Values.ingress.annotations | nindent 4 }}
10 | spec:
11 | {{- if .Values.ingress.tls }}
12 | tls:
13 | {{- range .Values.ingress.tls }}
14 | - hosts:
15 | {{- toYaml .hosts | nindent 8 }}
16 | secretName: {{ .secretName }}
17 | {{- end }}
18 | {{- end }}
19 | rules:
20 | {{- range .Values.ingress.hosts }}
21 | - host: {{ .host }}
22 | http:
23 | paths:
24 | {{- range .paths }}
25 | - path: {{ .path }}
26 | pathType: {{ .pathType }}
27 | backend:
28 | service:
29 | name: {{ include "genieacs.fullname" $. }}
30 | port:
31 | number: {{ $.Values.service_http.port_http }}
32 | {{- end }}
33 | {{- end }}
34 | {{- end }}
--------------------------------------------------------------------------------
/charts/genieacs/templates/pvc.yaml:
--------------------------------------------------------------------------------
1 | {{- if .Values.persistence.enabled }}
2 | apiVersion: v1
3 | kind: PersistentVolumeClaim
4 | metadata:
5 | name: {{ include "genieacs.fullname" . }}-pvc
6 | labels:
7 | {{- include "genieacs.labels" . | nindent 4 }}
8 | spec:
9 | accessModes: {{- toJson .Values.persistence.accessModes }}
10 | resources:
11 | requests:
12 | storage: {{ .Values.persistence.size }}
13 | {{- if .Values.persistence.storageClass }}
14 | storageClassName: {{ .Values.persistence.storageClass }}
15 | {{- end }}
16 | {{- end }}
--------------------------------------------------------------------------------
/charts/genieacs/templates/services.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apiVersion: v1
3 | kind: Service
4 | metadata:
5 | name: {{ include "genieacs.fullname" . }}-http
6 | labels:
7 | {{- include "genieacs.labels" . | nindent 4 }}
8 | spec:
9 | type: {{ .Values.service_http.type }}
10 | ports:
11 | - port: {{ .Values.service_http.port_http }}
12 | targetPort: http
13 | protocol: TCP
14 | name: http
15 | selector:
16 | {{- include "genieacs.selectorLabels" . | nindent 4 }}
17 | ---
18 | apiVersion: v1
19 | kind: Service
20 | metadata:
21 | name: {{ include "genieacs.fullname" . }}-cwmp
22 | labels:
23 | {{- include "genieacs.labels" . | nindent 4 }}
24 | spec:
25 | type: {{ .Values.service_cwmp.type }}
26 | ports:
27 | - port: {{ .Values.service_cwmp.port_cwmp }}
28 | targetPort: cwmp
29 | protocol: TCP
30 | name: cwmp
31 | selector:
32 | {{- include "genieacs.selectorLabels" . | nindent 4 }}
33 | ---
34 | apiVersion: v1
35 | kind: Service
36 | metadata:
37 | name: {{ include "genieacs.fullname" . }}-nbi
38 | labels:
39 | {{- include "genieacs.labels" . | nindent 4 }}
40 | spec:
41 | type: {{ .Values.service_nbi.type }}
42 | ports:
43 | - port: {{ .Values.service_nbi.port_nbi }}
44 | targetPort: nbi
45 | protocol: TCP
46 | name: nbi
47 | selector:
48 | {{- include "genieacs.selectorLabels" . | nindent 4 }}
49 | ---
50 | apiVersion: v1
51 | kind: Service
52 | metadata:
53 | name: {{ include "genieacs.fullname" . }}-fs
54 | labels:
55 | {{- include "genieacs.labels" . | nindent 4 }}
56 | spec:
57 | type: {{ .Values.service_fs.type }}
58 | ports:
59 | - port: {{ .Values.service_fs.port_fs }}
60 | targetPort: fs
61 | protocol: TCP
62 | name: fs
63 | selector:
64 | {{- include "genieacs.selectorLabels" . | nindent 4 }}
--------------------------------------------------------------------------------
/charts/genieacs/templates/tests/test-connection.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Pod
3 | metadata:
4 | name: "{{ include "genieacs.fullname" . }}-test-connection"
5 | labels:
6 | {{- include "genieacs.labels" . | nindent 4 }}
7 | annotations:
8 | "helm.sh/hook": test
9 | spec:
10 | containers:
11 | - name: wget
12 | image: busybox
13 | command: ['wget']
14 | args: ['{{ include "genieacs.fullname" . }}:{{ .Values.service.port }}']
15 | restartPolicy: Never
16 |
--------------------------------------------------------------------------------
/charts/genieacs/values.yaml:
--------------------------------------------------------------------------------
1 | image:
2 | repository: drumsergio/genieacs
3 | pullPolicy: IfNotPresent
4 | tag: "1.2.13"
5 |
6 | replicaCount: 1
7 |
8 | service_http:
9 | type: ClusterIP
10 | port_http: 3000
11 |
12 | service_cwmp:
13 | type: ClusterIP
14 | port_cwmp: 7547
15 |
16 | service_nbi:
17 | type: ClusterIP
18 | port_nbi: 7557
19 |
20 | service_fs:
21 | type: ClusterIP
22 | port_fs: 7567
23 |
24 | ingress:
25 | enabled: false
26 | annotations: {}
27 | hosts:
28 | - host: genieacs.local
29 | paths:
30 | - path: /
31 | pathType: ImplementationSpecific
32 | tls: []
33 |
34 | env:
35 | GENIEACS_UI_JWT_SECRET: changeme
36 | GENIEACS_CWMP_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-cwmp-access.log
37 | GENIEACS_NBI_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-nbi-access.log
38 | GENIEACS_FS_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-fs-access.log
39 | GENIEACS_UI_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-ui-access.log
40 | GENIEACS_DEBUG_FILE: /var/log/genieacs/genieacs-debug.yaml
41 | GENIEACS_EXT_DIR: /opt/genieacs/ext
42 |
43 | resources:
44 | limits:
45 | memory: 4Gi
46 | requests:
47 | cpu: 500m
48 | memory: 2Gi
49 |
50 | mongodb:
51 | enabled: true
52 | connectionURL: ""
53 |
54 | persistence:
55 | enabled: true
56 | accessModes:
57 | - ReadWriteOnce
58 | size: 5Gi
59 | # storageClass: ""
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | services:
2 | ### GenieACS Docker ###
3 | # Dockerfile: https://hub.docker.com/r/drumsergio/genieacs/Dockerfile
4 | genieacs:
5 | depends_on:
6 | - 'mongo'
7 | image: drumsergio/genieacs:latest
8 | restart: always
9 | container_name: "genieacs"
10 | environment:
11 | GENIEACS_UI_JWT_SECRET: changeme
12 | GENIEACS_CWMP_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-cwmp-access.log
13 | GENIEACS_NBI_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-nbi-access.log
14 | GENIEACS_FS_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-fs-access.log
15 | GENIEACS_UI_ACCESS_LOG_FILE: /var/log/genieacs/genieacs-ui-access.log
16 | GENIEACS_DEBUG_FILE: /var/log/genieacs/genieacs-debug.yaml
17 | GENIEACS_EXT_DIR: /opt/genieacs/ext
18 | GENIEACS_MONGODB_CONNECTION_URL: mongodb://mongo/genieacs?authSource=admin
19 | ports:
20 | - "7547:7547"
21 | - "7557:7557"
22 | - "7567:7567"
23 | - "3000:3000"
24 | volumes:
25 | - opt_volume:/opt
26 | networks:
27 | - genieacs_network
28 |
29 | ### Main GenieACS DB: MongoDB ###
30 | # Dockerfile: https://github.com/dockerfile/mongodb/blob/master/Dockerfile
31 | mongo:
32 | image: mongo:8.0
33 | restart: always
34 | container_name: "mongo-genieacs"
35 | environment:
36 | # MONGO_INITDB_ROOT_USERNAME: userchange
37 | # MONGO_INITDB_ROOT_PASSWORD: passwordchange
38 | MONGO_DATA_DIR: /data/db
39 | MONGO_LOG_DIR: /var/log/mongodb
40 | volumes:
41 | - data_db:/data/db
42 | - data_configdb:/data/configdb
43 | expose:
44 | - 27017
45 | networks:
46 | - genieacs_network
47 |
48 | ### THIS SERVICE IS JUST FOR TESTING ###
49 | # Dockerfile here: https://hub.docker.com/r/drumsergio/genieacs-sim/Dockerfile
50 | genieacs-sim:
51 | depends_on:
52 | - 'genieacs'
53 | image: drumsergio/genieacs-sim:latest
54 | container_name: "genieacs-sim"
55 | networks:
56 | - genieacs_network
57 |
58 | ### GenieACS MCP Server (AI) ###
59 | # Dockerfile here: https://hub.docker.com/r/drumsergio/genieacs-mcp/Dockerfile
60 | genieacs-mcp:
61 | depends_on:
62 | - 'genieacs'
63 | image: drumsergio/genieacs-mcp:latest
64 | container_name: "genieacs-mcp"
65 | environment:
66 | ACS_URL: http://genieacs:7557
67 | ACS_USER: admin
68 | ACS_PASS: admin # Set by default after the wizard, please change
69 | ports:
70 | - "8080:8080"
71 | networks:
72 | - genieacs_network
73 |
74 | volumes:
75 | data_db:
76 | data_configdb:
77 | opt_volume:
78 |
79 | networks:
80 | genieacs_network:
81 |
--------------------------------------------------------------------------------
/extra/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GeiserX/genieacs-docker/e4d99c4d449bc993e463000a1d7a3033a3573375/extra/logo.png
--------------------------------------------------------------------------------
/genieacs-deploy-helmfile/genieacs.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | # Check ../charts/genieacs/values.yaml in the chart
3 |
--------------------------------------------------------------------------------
/genieacs-deploy-helmfile/helmfile.yaml:
--------------------------------------------------------------------------------
1 | context: test-cluster
2 |
3 | repositories:
4 | - name: bitnami
5 | url: https://charts.bitnami.com/bitnami
6 | - name: genieacs
7 | url: https://geiserx.github.io/genieacs-docker
8 |
9 | releases:
10 | - name: mongodb-genieacs
11 | namespace: genieacs
12 | chart: bitnami/mongodb
13 | version: 10.31.4
14 | labels:
15 | app: mongodb
16 | release: genieacs
17 | values:
18 | - mongo.yaml
19 |
20 | - name: genieacs
21 | namespace: genieacs
22 | chart: genieacs/genieacs
23 | version: 0.1.1
24 | labels:
25 | app: genieacs
26 | release: genieacs
27 | values:
28 | - genieacs.yaml
--------------------------------------------------------------------------------
/genieacs-deploy-helmfile/mongo-secret.yaml:
--------------------------------------------------------------------------------
1 | apiVersion: v1 #Store this file apart from the main deployment in a safe location. Must be deployed before the rest.
2 | data:
3 | mongodb-password: Z2VuaWVhY3NwYXNzd29yZDEyMw== #genieacspassword123 , please change and encode base64
4 | mongodb-root-password: Z2VuaWVhY3Nyb290cGFzc3dvcmQxMjM= #genieacsrootpassword123 , please change and encode base64
5 | kind: Secret
6 | metadata:
7 | name: genieacs-mongo
8 | namespace: genieacs # Change if you deploy to another namespace
9 | type: Opaque
10 |
--------------------------------------------------------------------------------
/genieacs-deploy-helmfile/mongo.yaml:
--------------------------------------------------------------------------------
1 | global:
2 | imageRegistry: ""
3 | imagePullSecrets: []
4 | storageClass: ""
5 | namespaceOverride: ""
6 | nameOverride: ""
7 | fullnameOverride: ""
8 | clusterDomain: cluster.local
9 | extraDeploy: []
10 | commonLabels: {}
11 | commonAnnotations: {}
12 |
13 | diagnosticMode:
14 | enabled: false
15 | command:
16 | - sleep
17 | args:
18 | - infinity
19 |
20 | image:
21 | registry: docker.io
22 | repository: bitnami/mongodb
23 | tag: 4.4.11-debian-10-r12
24 | pullPolicy: IfNotPresent
25 | pullSecrets: []
26 | debug: false
27 |
28 | schedulerName: ""
29 | architecture: standalone #Change to replicaset in case you want sharding
30 | useStatefulSet: false
31 | auth:
32 | enabled: true
33 | rootUser: root
34 | rootPassword: ""
35 | usernames: [genieacs]
36 | passwords: []
37 | databases: [genieacs] #Default genieacs db
38 | replicaSetKey: ""
39 | existingSecret: "genieacs-mongo" #mongo-secret.yaml file
40 | tls:
41 | enabled: false
42 | autoGenerated: true
43 | existingSecret: ""
44 | caCert: ""
45 | caKey: ""
46 | extraDnsNames: []
47 | mode: requireTLS
48 |
49 | hostAliases: []
50 | replicaSetName: rs0
51 | replicaSetHostnames: true
52 | enableIPv6: false
53 | directoryPerDB: false
54 | systemLogVerbosity: 0
55 | disableSystemLog: false
56 | disableJavascript: false
57 | enableJournal: true
58 | configuration: ""
59 | replicaSetConfigurationSettings:
60 | enabled: false
61 | configuration: {}
62 | existingConfigmap: ""
63 | initdbScripts: {}
64 | initdbScriptsConfigMap: ""
65 | command: []
66 | args: []
67 | extraFlags: []
68 | extraEnvVars: []
69 | extraEnvVarsCM: ""
70 | extraEnvVarsSecret: ""
71 |
72 | annotations: {}
73 | labels: {}
74 | replicaCount: 2
75 | strategyType: RollingUpdate
76 | podManagementPolicy: OrderedReady
77 | podAffinityPreset: ""
78 | podAntiAffinityPreset: soft
79 | nodeAffinityPreset:
80 | type: ""
81 | key: ""
82 | values: []
83 | affinity: {}
84 | nodeSelector: {}
85 | tolerations: []
86 | topologySpreadConstraints: []
87 | podLabels: {}
88 | podAnnotations: {}
89 | priorityClassName: ""
90 | runtimeClassName: ""
91 | podSecurityContext:
92 | enabled: true
93 | fsGroup: 1001
94 | sysctls: []
95 | containerSecurityContext:
96 | enabled: true
97 | runAsUser: 1001
98 | runAsNonRoot: true
99 | resources:
100 | limits: {}
101 | requests: {}
102 | livenessProbe:
103 | enabled: true
104 | initialDelaySeconds: 30
105 | periodSeconds: 10
106 | timeoutSeconds: 5
107 | failureThreshold: 6
108 | successThreshold: 1
109 | readinessProbe:
110 | enabled: true
111 | initialDelaySeconds: 5
112 | periodSeconds: 10
113 | timeoutSeconds: 5
114 | failureThreshold: 6
115 | successThreshold: 1
116 | startupProbe:
117 | enabled: false
118 | initialDelaySeconds: 5
119 | periodSeconds: 10
120 | timeoutSeconds: 5
121 | successThreshold: 1
122 | failureThreshold: 30
123 | customLivenessProbe: {}
124 | customReadinessProbe: {}
125 | customStartupProbe: {}
126 |
127 | initContainers: []
128 | sidecars: []
129 | extraVolumeMounts: []
130 | extraVolumes: []
131 | pdb:
132 | create: false
133 | minAvailable: 1
134 | maxUnavailable: ""
135 |
136 | service:
137 | nameOverride: ""
138 | type: ClusterIP
139 | port: 27017
140 | portName: mongodb
141 | nodePort: ""
142 | clusterIP: ""
143 | externalIPs: []
144 | loadBalancerIP: ""
145 | loadBalancerSourceRanges: []
146 | annotations: {}
147 | externalAccess:
148 | enabled: false
149 | autoDiscovery:
150 | enabled: false
151 | image:
152 | registry: docker.io
153 | repository: bitnami/kubectl
154 | tag: 1.23.1-debian-10-r23
155 | pullPolicy: IfNotPresent
156 | pullSecrets: []
157 | resources:
158 | limits: {}
159 | requests: {}
160 | service:
161 | type: LoadBalancer
162 | port: 27017
163 | loadBalancerIPs: []
164 | loadBalancerSourceRanges: []
165 | nodePorts: []
166 | domain: ""
167 | annotations: {}
168 | hidden:
169 | enabled: false
170 | service:
171 | type: LoadBalancer
172 | port: 27017
173 | loadBalancerIPs: []
174 | loadBalancerSourceRanges: []
175 | nodePorts: []
176 | domain: ""
177 | annotations: {}
178 |
179 | persistence:
180 | enabled: true
181 | medium: ""
182 | existingClaim: ""
183 | storageClass: "" # default provisioner, check which provisioner you have available
184 | accessModes:
185 | - ReadWriteOnce
186 | size: 10Gi # Modify with expected usage
187 | annotations: {}
188 | mountPath: /bitnami/mongodb
189 | subPath: ""
190 | volumeClaimTemplates:
191 | selector: {}
192 | requests: {}
193 | dataSource: {}
194 |
195 | serviceAccount:
196 | create: true
197 | name: ""
198 | annotations: {}
199 | rbac:
200 | create: false
201 | role:
202 | rules: []
203 | podSecurityPolicy:
204 | create: false
205 | allowPrivilegeEscalation: false
206 | privileged: false
207 | spec: {}
208 | volumePermissions:
209 | enabled: false
210 | image:
211 | registry: docker.io
212 | repository: bitnami/bitnami-shell
213 | tag: 10-debian-10-r304
214 | pullPolicy: IfNotPresent
215 | pullSecrets: []
216 | resources:
217 | limits: {}
218 | requests: {}
219 | securityContext:
220 | runAsUser: 0
221 |
222 | arbiter:
223 | enabled: true
224 | configuration: ""
225 | hostAliases: []
226 | existingConfigmap: ""
227 | command: []
228 | args: []
229 | extraFlags: []
230 | extraEnvVars: []
231 | extraEnvVarsCM: ""
232 | extraEnvVarsSecret: ""
233 | annotations: {}
234 | labels: {}
235 | podAffinityPreset: ""
236 | podAntiAffinityPreset: soft
237 | nodeAffinityPreset:
238 | type: ""
239 | key: ""
240 | values: []
241 | affinity: {}
242 | nodeSelector: {}
243 | tolerations: []
244 | podLabels: {}
245 | podAnnotations: {}
246 | priorityClassName: ""
247 | runtimeClassName: ""
248 | podSecurityContext:
249 | enabled: true
250 | fsGroup: 1001
251 | sysctls: []
252 | containerSecurityContext:
253 | enabled: true
254 | runAsUser: 1001
255 | resources:
256 | limits: {}
257 | requests: {}
258 | livenessProbe:
259 | enabled: true
260 | initialDelaySeconds: 30
261 | periodSeconds: 10
262 | timeoutSeconds: 5
263 | failureThreshold: 6
264 | successThreshold: 1
265 | readinessProbe:
266 | enabled: true
267 | initialDelaySeconds: 5
268 | periodSeconds: 10
269 | timeoutSeconds: 5
270 | failureThreshold: 6
271 | successThreshold: 1
272 | customLivenessProbe: {}
273 | customReadinessProbe: {}
274 | initContainers: []
275 | sidecars: []
276 | extraVolumeMounts: []
277 | extraVolumes: []
278 | pdb:
279 | create: false
280 | minAvailable: 1
281 | maxUnavailable: ""
282 | service:
283 | nameOverride: ""
284 |
285 | hidden:
286 | enabled: false
287 | configuration: ""
288 | existingConfigmap: ""
289 | command: []
290 | args: []
291 | extraFlags: []
292 | extraEnvVars: []
293 | extraEnvVarsCM: ""
294 | extraEnvVarsSecret: ""
295 | annotations: {}
296 | labels: {}
297 | replicaCount: 1
298 | strategyType: RollingUpdate
299 | podManagementPolicy: OrderedReady
300 | podAffinityPreset: ""
301 | podAntiAffinityPreset: soft
302 | nodeAffinityPreset:
303 | type: ""
304 | key: ""
305 | values: []
306 | affinity: {}
307 | nodeSelector: {}
308 | tolerations: []
309 | podLabels: {}
310 | podAnnotations: {}
311 | priorityClassName: ""
312 | runtimeClassName: ""
313 | resources:
314 | limits: {}
315 | requests: {}
316 | livenessProbe:
317 | enabled: true
318 | initialDelaySeconds: 30
319 | periodSeconds: 10
320 | timeoutSeconds: 5
321 | failureThreshold: 6
322 | successThreshold: 1
323 | readinessProbe:
324 | enabled: true
325 | initialDelaySeconds: 5
326 | periodSeconds: 10
327 | timeoutSeconds: 5
328 | failureThreshold: 6
329 | successThreshold: 1
330 | customLivenessProbe: {}
331 | customReadinessProbe: {}
332 | initContainers: []
333 | sidecars: []
334 | extraVolumeMounts: []
335 | extraVolumes: []
336 | pdb:
337 | create: false
338 | minAvailable: 1
339 | maxUnavailable: ""
340 | persistence:
341 | enabled: true
342 | medium: ""
343 | storageClass: ""
344 | accessModes:
345 | - ReadWriteOnce
346 | size: 8Gi
347 | annotations: {}
348 | mountPath: /bitnami/mongodb
349 | subPath: ""
350 | volumeClaimTemplates:
351 | selector: {}
352 | dataSource: {}
353 |
354 | metrics:
355 | enabled: false #Enable if you have Prometheus stack installed
356 | image:
357 | registry: docker.io
358 | repository: bitnami/mongodb-exporter
359 | tag: 0.11.2-debian-10-r393
360 | pullPolicy: IfNotPresent
361 | pullSecrets: []
362 | username: ""
363 | password: ""
364 | extraFlags: ""
365 | extraUri: ""
366 | resources:
367 | limits: {}
368 | requests: {}
369 | containerPort: 9216
370 | service:
371 | annotations:
372 | prometheus.io/scrape: "true"
373 | prometheus.io/port: "{{ .Values.metrics.service.port }}"
374 | prometheus.io/path: "/metrics"
375 | type: ClusterIP
376 | port: 9216
377 | livenessProbe:
378 | enabled: true
379 | initialDelaySeconds: 15
380 | periodSeconds: 5
381 | timeoutSeconds: 5
382 | failureThreshold: 3
383 | successThreshold: 1
384 | readinessProbe:
385 | enabled: true
386 | initialDelaySeconds: 5
387 | periodSeconds: 5
388 | timeoutSeconds: 1
389 | failureThreshold: 3
390 | successThreshold: 1
391 | serviceMonitor:
392 | enabled: false
393 | namespace: ""
394 | interval: 30s
395 | scrapeTimeout: ""
396 | relabellings: []
397 | metricRelabelings: []
398 | additionalLabels: {}
399 | prometheusRule:
400 | enabled: false
401 | additionalLabels: {}
402 | namespace: ""
403 | rules: {}
--------------------------------------------------------------------------------
/genieacs.logrotate:
--------------------------------------------------------------------------------
1 | /var/log/genieacs/*.{log,yaml} {
2 | daily
3 | rotate 30
4 | compress
5 | delaycompress
6 | dateext
7 | }
--------------------------------------------------------------------------------