add idrive
This commit is contained in:
1 parent
5fb9fdaddb
commit
46f2c6197f
7 files changed
+192
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,24 @@
|
||||
apiVersion: v2
|
||||
name: idrive
|
||||
description: A Helm chart for Kubernetes
|
||||
|
||||
# A chart can be either an 'application' or a 'library' chart.
|
||||
#
|
||||
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||
# to be deployed.
|
||||
#
|
||||
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||
type: application
|
||||
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 0.1.0
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.16.0"
|
||||
@@ -0,0 +1,71 @@
|
||||
FROM debian:bookworm-slim
|
||||
|
||||
# Install dependencies (including python3 and procps)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
perl \
|
||||
curl \
|
||||
wget \
|
||||
ca-certificates \
|
||||
sqlite3 \
|
||||
psmisc \
|
||||
procps \
|
||||
cron \
|
||||
unzip \
|
||||
python3 \
|
||||
vim \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
# Download and install with exported LD_LIBRARY_PATH & TERM during build step
|
||||
RUN wget https://www.idrivedownloads.com/downloads/linux/download-for-linux/linux-bin/idriveforlinux.bin && \
|
||||
chmod +x idriveforlinux.bin && \
|
||||
bash -c 'export TERM=xterm; export LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib"; echo -ne "A\n" | ./idriveforlinux.bin --install' && \
|
||||
rm idriveforlinux.bin
|
||||
|
||||
# Create seed template for Kubernetes PVC mounts
|
||||
RUN cp -a /opt/IDriveForLinux/idriveIt /opt/IDriveForLinux/idriveIt.orig
|
||||
|
||||
# Set container environment variables
|
||||
ENV LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib"
|
||||
ENV PATH="/opt/IDriveForLinux/bin:${PATH}"
|
||||
ENV LC_ALL=C.UTF-8
|
||||
|
||||
# Add startup entrypoint script
|
||||
COPY start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
WORKDIR /opt/IDriveForLinux/bin
|
||||
|
||||
CMD ["/start.sh"]
|
||||
#
|
||||
# FROM debian:bookworm-slim
|
||||
#
|
||||
# # Install dependencies
|
||||
# RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# perl \
|
||||
# curl \
|
||||
# wget \
|
||||
# ca-certificates \
|
||||
# sqlite3 \
|
||||
# psmisc \
|
||||
# cron \
|
||||
# && rm -rf /var/lib/apt/lists/*
|
||||
#
|
||||
# WORKDIR /tmp
|
||||
#
|
||||
# ENV LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib"
|
||||
# ENV PATH="/opt/IDriveForLinux/bin:${PATH}"
|
||||
#
|
||||
# RUN wget https://www.idrivedownloads.com/downloads/linux/download-for-linux/linux-bin/idriveforlinux.bin \
|
||||
# && chmod +x idriveforlinux.bin \
|
||||
# && yes A | ./idriveforlinux.bin --install | tee /root/log.txt \
|
||||
# && rm idriveforlinux.bin
|
||||
#
|
||||
# RUN echo 'export LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib:$LD_LIBRARY_PATH"' >> /root/.bashrc \
|
||||
# && echo 'export PATH="/opt/IDriveForLinux/bin:$PATH"' >> /root/.bashrc \
|
||||
# && echo 'LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib"' >> /etc/environment
|
||||
#
|
||||
# WORKDIR /root
|
||||
#
|
||||
# CMD ["tail", "-f", "/dev/null"]
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
export LD_LIBRARY_PATH="/opt/IDriveForLinux/bin/Idrivelib/dependencies/python/lib:$LD_LIBRARY_PATH"
|
||||
|
||||
# Seed empty Kubernetes PVC volume on first startup
|
||||
if [ ! -f /opt/IDriveForLinux/idriveIt/idrivecrontab.json ]; then
|
||||
echo "Initializing persistent volume in /opt/IDriveForLinux/idriveIt..."
|
||||
cp -a /opt/IDriveForLinux/idriveIt.orig/* /opt/IDriveForLinux/idriveIt/
|
||||
fi
|
||||
|
||||
# Start background cron service for scheduled backups
|
||||
cron
|
||||
|
||||
# Keep container running in background
|
||||
tail -f /dev/null
|
||||
@@ -0,0 +1,40 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Namespace }}-deployment
|
||||
labels:
|
||||
app: {{ .Release.Namespace }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Namespace }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Namespace }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ .Release.Namespace }}
|
||||
image: taptap1/idrive:{{ .Values.image.tag }}
|
||||
# env:
|
||||
# - name: TZ
|
||||
# value: .Values.env.timezone | quote }}
|
||||
volumeMounts:
|
||||
- name: {{ .Values.configMount.name }}
|
||||
mountPath: /opt/IDriveForLinux/idriveIt/user_profile
|
||||
{{- range .Values.mounts}}
|
||||
- name: {{ .name }}
|
||||
mountPath: /source/{{ .name }}
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: {{ .Values.configMount.name }}
|
||||
hostPath:
|
||||
path: {{ .Values.configMount.path }}
|
||||
{{- range .Values.mounts }}
|
||||
- name: {{ .name }}
|
||||
hostPath:
|
||||
path: {{ .path }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: {{ .Release.Namespace }}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
tag: "latest"
|
||||
|
||||
# env:
|
||||
# timezone: "Europe/Berlin"
|
||||
|
||||
configMount:
|
||||
name: idrive-config
|
||||
path: /root/kubernetes/idrive/data/config
|
||||
|
||||
mounts:
|
||||
- name: test
|
||||
path: /root/kubernetes/idrive
|
||||
Reference in new issue
Block a user