mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
install oneuptime home
This commit is contained in:
@@ -3,7 +3,15 @@
|
||||
|
||||
### Installation
|
||||
|
||||
Read the [installation guide](https://microk8s.io/docs) for more details.
|
||||
Install Microk8s: Read the [installation guide](https://microk8s.io/docs) for more details.
|
||||
Install Helm
|
||||
|
||||
Run
|
||||
|
||||
```
|
||||
sudo microk8s kubectl config view --raw > ~/.kube/config
|
||||
```
|
||||
|
||||
|
||||
### Unistallation
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ This chart bootstraps a [OneUptime](https://oneuptime.com) deployment on a [Kube
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `oneuptime-release`:
|
||||
To install the chart with the release name `oneuptime`:
|
||||
|
||||
```bash
|
||||
$ helm repo add oneuptime https://oneuptime.com/helm-charts
|
||||
$ helm install oneuptime-release oneuptime/oneuptime
|
||||
$ helm install oneuptime oneuptime/oneuptime
|
||||
```
|
||||
|
||||
These commands deploy OneUptime on the Kubernetes cluster in the default configuration. The [Parameters](#parameters) section lists the parameters that can be configured during installation.
|
||||
@@ -24,10 +24,10 @@ These commands deploy OneUptime on the Kubernetes cluster in the default configu
|
||||
|
||||
## Uninstalling the Chart
|
||||
|
||||
To uninstall/delete the `oneuptime-release` deployment:
|
||||
To uninstall/delete the `oneuptime` deployment:
|
||||
|
||||
```bash
|
||||
$ helm delete oneuptime-release
|
||||
$ helm delete oneuptime
|
||||
```
|
||||
|
||||
The command removes all the Kubernetes components associated with the chart and deletes the release.
|
||||
@@ -73,7 +73,7 @@ The following table lists the configurable parameters of the OneUptime chart and
|
||||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
|
||||
|
||||
```bash
|
||||
$ helm install oneuptime-release \
|
||||
$ helm install oneuptime \
|
||||
--set service.type=LoadBalancer \
|
||||
oneuptime/oneuptime
|
||||
```
|
||||
@@ -83,7 +83,7 @@ The above command sets the OneUptime service type to `LoadBalancer`.
|
||||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
|
||||
|
||||
```bash
|
||||
$ helm install oneuptime-release -f values.yaml oneuptime/oneuptime
|
||||
$ helm install oneuptime -f values.yaml oneuptime/oneuptime
|
||||
```
|
||||
|
||||
> **Tip**: You can use the default [values.yaml](values.yaml)
|
||||
@@ -109,7 +109,7 @@ The following table lists the configurable parameters of the OneUptime chart and
|
||||
```bash
|
||||
|
||||
$ helm repo add oneuptime https://oneuptime.github.io/helm-charts
|
||||
$ helm install oneuptime-release oneuptime/oneuptime
|
||||
$ helm install oneuptime oneuptime/oneuptime
|
||||
```
|
||||
|
||||
#### Using source code
|
||||
@@ -117,7 +117,7 @@ $ helm install oneuptime-release oneuptime/oneuptime
|
||||
```bash
|
||||
$ git clone https://github.com/OneUptime/oneuptime
|
||||
$ cd HelmChart/public/oneuptime
|
||||
$ helm install oneuptime-release .
|
||||
$ helm install oneuptime .
|
||||
```
|
||||
|
||||
## Persistence
|
||||
@@ -127,7 +127,7 @@ The [OneUptime](https://oneuptime.com) image stores the OneUptime data and confi
|
||||
By default a PersistentVolumeClaim is created and mounted into that directory. In order to disable this functionality you can change the values.yaml to disable persistence.
|
||||
|
||||
```bash
|
||||
$ helm install oneuptime-release \
|
||||
$ helm install oneuptime \
|
||||
--set persistence.enabled=false \
|
||||
oneuptime/oneuptime
|
||||
```
|
||||
|
||||
@@ -1,22 +1 @@
|
||||
1. Get the application URL by running these commands:
|
||||
{{- if .Values.ingress.enabled }}
|
||||
{{- range $host := .Values.ingress.hosts }}
|
||||
{{- range .paths }}
|
||||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oneuptime.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oneuptime.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oneuptime.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oneuptime.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
|
||||
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
|
||||
{{- end }}
|
||||
OneUptime is installed
|
||||
@@ -28,18 +28,6 @@ spec:
|
||||
limits:
|
||||
cpu: 500m
|
||||
env:
|
||||
{{- if .Values.saas.isSaasService }}
|
||||
- name: STRIPE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.stripe.publicKey }}
|
||||
- name: BILLING_ENABLED
|
||||
value: 'true'
|
||||
- name: AMPLITUDE_PUBLIC_KEY
|
||||
value: {{ $.Values.saas.amplitude.key }}
|
||||
{{- end }}
|
||||
- name: NODE_ENV
|
||||
value: {{ $.Values.nodeEnv }}
|
||||
- name: DISABLE_SIGNUP
|
||||
value: {{ $.Values.disableSignup | quote }}
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
@@ -61,8 +49,8 @@ spec:
|
||||
fieldRef:
|
||||
fieldPath: spec.serviceAccountName
|
||||
ports:
|
||||
- containerPort: {{ $.Values.host.homePort }}
|
||||
hostPort: {{ $.Values.host.homePort }}
|
||||
- containerPort: {{ $.Values.port.home }}
|
||||
hostPort: {{ $.Values.port.home }}
|
||||
name: {{ printf "%s-%s" $.Release.Name "home" }}
|
||||
restartPolicy: {{ $.Values.image.restartPolicy }}
|
||||
|
||||
@@ -79,8 +67,8 @@ metadata:
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
ports:
|
||||
- port: {{ $.Values.host.homeServicePort }}
|
||||
targetPort: {{ $.Values.host.homePort }}
|
||||
- port: {{ $.Values.port.home }}
|
||||
targetPort: {{ $.Values.port.home }}
|
||||
selector:
|
||||
app: {{ printf "%s-%s" $.Release.Name "home" }}
|
||||
type: ClusterIP
|
||||
@@ -88,19 +76,19 @@ spec:
|
||||
###########################################
|
||||
|
||||
|
||||
{{- if .Values.autoScaler.enabled }}
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v1
|
||||
kind: HorizontalPodAutoscaler
|
||||
kind: HorizontalPodautoscaling
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" $.Release.Name "home" }}
|
||||
namespace: {{ $.Release.Namespace }}
|
||||
spec:
|
||||
maxReplicas: {{ $.Values.autoScaler.maxReplicas }}
|
||||
minReplicas: {{ $.Values.autoScaler.minReplicas }}
|
||||
maxReplicas: {{ $.Values.autoscaling.maxReplicas }}
|
||||
minReplicas: {{ $.Values.autoscaling.minReplicas }}
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ printf "%s-%s" $.Release.Name "home" }}
|
||||
targetCPUUtilizationPercentage: {{ $.Values.autoScaler.averageCpuUtilization }}
|
||||
targetCPUUtilizationPercentage: {{ $.Values.autoscaling.averageCpuUtilization }}
|
||||
---
|
||||
{{- end }}
|
||||
@@ -5,10 +5,10 @@
|
||||
replicaCount: 1
|
||||
|
||||
image:
|
||||
repository: nginx
|
||||
registry: docker.io
|
||||
repository: oneuptime
|
||||
pullPolicy: IfNotPresent
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: release
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
@@ -40,21 +40,6 @@ service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
|
||||
ingress:
|
||||
enabled: false
|
||||
className: ""
|
||||
annotations: {}
|
||||
# kubernetes.io/ingress.class: nginx
|
||||
# kubernetes.io/tls-acme: "true"
|
||||
hosts:
|
||||
- host: chart-example.local
|
||||
paths:
|
||||
- path: /
|
||||
pathType: ImplementationSpecific
|
||||
tls: []
|
||||
# - secretName: chart-example-tls
|
||||
# hosts:
|
||||
# - chart-example.local
|
||||
|
||||
resources: {}
|
||||
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||
@@ -80,3 +65,6 @@ nodeSelector: {}
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
port:
|
||||
home: 1444
|
||||
|
||||
Reference in New Issue
Block a user