mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
remove host port
This commit is contained in:
@@ -23,8 +23,14 @@ helm lint ./HelmChart/public/oneuptime
|
||||
```
|
||||
|
||||
|
||||
### Test Install
|
||||
### Install in Staging
|
||||
|
||||
```
|
||||
helm install oneuptime ./HelmChart/public/oneuptime -f ./HelmChart/public/oneuptime/values.yaml -f ./HelmChart/test.values.yaml
|
||||
```
|
||||
|
||||
### Run tests
|
||||
|
||||
```
|
||||
helm test oneuptime
|
||||
```
|
||||
71
HelmChart/public/oneuptime/scripts/status-check.sh
Normal file
71
HelmChart/public/oneuptime/scripts/status-check.sh
Normal file
@@ -0,0 +1,71 @@
|
||||
HOST_TO_CHECK="$1"
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
HOST_TO_CHECK="localhost"
|
||||
fi
|
||||
|
||||
|
||||
echo "We will need to wait ~5-10 minutes for things to settle down, migrations to finish, and TLS certs to be issued"
|
||||
echo ""
|
||||
echo "⏳ Waiting for OneUptime to boot (this will take a few minutes)"
|
||||
|
||||
echo "Checking API Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/api/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "API is up ✔️"
|
||||
|
||||
echo "Checking Dashboard Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/dashboard/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Dashboard is up ✔️"
|
||||
|
||||
echo "Checking File Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/file/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "File server is up ✔️"
|
||||
|
||||
echo "Checking Status Page Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/status-page/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Status Page Server is up ✔️"
|
||||
|
||||
echo "Checking Home Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Home Server is up ✔️"
|
||||
|
||||
echo "Checking Accounts Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/accounts/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Accounts Server is up ✔️"
|
||||
|
||||
echo "Checking Notification Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/notification/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Notification Server is up ✔️"
|
||||
|
||||
echo "Checking Worker Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/workers/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Worker Server is up ✔️"
|
||||
|
||||
echo "Checking Identity Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/identity/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Identity Server is up ✔️"
|
||||
|
||||
echo "Checking Workflow Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/workflow/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Workflow Server is up ✔️"
|
||||
|
||||
echo "Checking API Docs Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/reference/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "API Docs Server is up ✔️"
|
||||
|
||||
echo "Checking Link Shortener Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/l/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Link Shortener Server is up ✔️"
|
||||
|
||||
echo "Checking Admin Dashboard Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $HOST_TO_CHECK/admin/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Admin Dashboard Server is up ✔️"
|
||||
|
||||
echo "⌛️ OneUptime is up!"
|
||||
echo ""
|
||||
echo "🎉🎉🎉 Done! 🎉🎉🎉"
|
||||
|
||||
echo "We would like to hear your feedback to make this product better for you and for other users, please email us at hello@oneuptime.com."
|
||||
echo " - If you notice a bug, we will fix it for you."
|
||||
echo " - If you need a feature, we will add that to the roadmap and let you know the estimated time to ship."
|
||||
echo "We would love to hear your feedback. Email: hello@oneuptime.com"
|
||||
@@ -114,11 +114,11 @@
|
||||
value: {{ $.Values.secrets.encryption }}
|
||||
|
||||
- name: CLICKHOUSE_USER
|
||||
value: {{ $.Values.clickhouse.user }}
|
||||
value: {{ $.Values.clickhouse.auth.user }}
|
||||
- name: CLICKHOUSE_PASSWORD
|
||||
value: {{ $.Values.clickhouse.password }}
|
||||
value: {{ $.Values.clickhouse.auth.password }}
|
||||
- name: CLICKHOUSE_HOST
|
||||
value: {{ $.Values.clickhouse.host }}
|
||||
value: {{ $.Release.Name }}-clickhouse.{{ $.Release.Namespace }}.svc.cluster.local
|
||||
- name: CLICKHOUSE_PORT
|
||||
value: {{ printf "8123" | squote}}
|
||||
- name: CLICKHOUSE_DATABASE
|
||||
@@ -190,6 +190,11 @@ spec:
|
||||
- port: {{ $.Port }}
|
||||
targetPort: {{ $.Port }}
|
||||
name: port
|
||||
{{- if $.isHTTPSPortEnabled }}
|
||||
- port: 443
|
||||
targetPort: 443
|
||||
name: https
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ printf "%s-%s" $.Release.Name $.ServiceName }}
|
||||
{{- if $.ServiceType }}
|
||||
@@ -253,14 +258,12 @@ spec:
|
||||
{{- if $.Port }}
|
||||
ports:
|
||||
- containerPort: {{ $.Port }}
|
||||
hostPort: {{ $.Port }}
|
||||
protocol: TCP
|
||||
name: http
|
||||
{{- if $.isHTTPSPortEnabled }}
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
protocol: TCP
|
||||
name: https
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
restartPolicy: {{ $.Values.image.restartPolicy }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# OneUptime nginx Service
|
||||
{{- $nginxVolumes := dict "certs" (printf "%s-%s" $.Release.Name "certs") }}
|
||||
{{- $nginxDeploymentArgs :=dict "IsServer" true "ServiceName" "nginx" "Port" $.Values.port.nginx "Release" $.Release "Values" $.Values "Volumes" $nginxVolumes -}}
|
||||
{{- $nginxDeploymentArgs :=dict "isHTTPSPortEnabled" true "IsServer" true "ServiceName" "nginx" "Port" $.Values.port.nginx "Release" $.Release "Values" $.Values "Volumes" $nginxVolumes -}}
|
||||
{{- include "oneuptime.deployment" $nginxDeploymentArgs }}
|
||||
---
|
||||
|
||||
|
||||
13
HelmChart/public/oneuptime/templates/tests/status-check.yaml
Normal file
13
HelmChart/public/oneuptime/templates/tests/status-check.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
# apiVersion: v1
|
||||
# kind: Pod
|
||||
# metadata:
|
||||
# name: {{ printf "%s-%s" $.Release.Name "status-check" }}
|
||||
# annotations:
|
||||
# "helm.sh/hook": test
|
||||
# spec:
|
||||
# containers:
|
||||
# - name: wget
|
||||
# image: busybox
|
||||
# command: ['/bin/sh']
|
||||
# args: ["-c", "scripts/status-check.sh", "{{ $.Release.Name }}-nginx.{{ $.Release.Namespace }}.svc.cluster.local"]
|
||||
# restartPolicy: Never
|
||||
@@ -22,7 +22,7 @@ ingress:
|
||||
postgresql:
|
||||
auth:
|
||||
username: oneuptime
|
||||
password: {{ randAlphaNum 16 | quote }}
|
||||
password: please-change-this-to-random-value
|
||||
database: oneuptimedb
|
||||
architecture: standalone
|
||||
primary:
|
||||
@@ -41,12 +41,12 @@ clickhouse:
|
||||
size: 25Gi
|
||||
auth:
|
||||
username: oneuptime
|
||||
password: {{ randAlphaNum 16 | quote }}
|
||||
password: please-change-this-to-random-value
|
||||
|
||||
redis:
|
||||
architecture: standalone
|
||||
auth:
|
||||
password: {{ randAlphaNum 16 | quote }}
|
||||
password: please-change-this-to-random-value
|
||||
master:
|
||||
persistence:
|
||||
size: 25Gi
|
||||
@@ -107,20 +107,20 @@ statusPage:
|
||||
cnameRecord:
|
||||
|
||||
secrets:
|
||||
oneuptime: {{ randAlphaNum 16 | quote }}
|
||||
encryption: {{ randAlphaNum 16 | quote }}
|
||||
oneuptime: please-change-this-to-random-value
|
||||
encryption: please-change-this-to-random-value
|
||||
|
||||
probes:
|
||||
one:
|
||||
name: "Probe 1"
|
||||
description: "Probe 1"
|
||||
key: {{ randAlphaNum 16 | quote }}
|
||||
key: please-change-this-to-random-value
|
||||
monitoringWorkers: 3
|
||||
monitorFetchLimit: 10
|
||||
two:
|
||||
name: "Probe 2"
|
||||
description: "Probe 2"
|
||||
key: {{ randAlphaNum 16 | quote }}
|
||||
key: please-change-this-to-random-value
|
||||
monitoringWorkers: 3
|
||||
monitorFetchLimit: 10
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
"lint": "ejslint **/*.ejs && eslint '**/*.ts*' -c .eslintrc.json --ignore-path .eslintignore ",
|
||||
"fix-lint": " node --max_old_space_size=18192 ./node_modules/.bin/eslint '**/*.ts*' -c .eslintrc.json --ignore-path .eslintignore --fix --cache",
|
||||
"fix": "npm run fix-lint",
|
||||
"start": "export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d $npm_config_services && bash status-check.sh",
|
||||
"start": "export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d $npm_config_services && bash ./HelmChart/public/oneuptime/scriptsstatus-check.sh",
|
||||
"ps": "docker compose ps",
|
||||
"save-logs": "export $(grep -v '^#' config.env | xargs) && docker compose logs --tail=100000 $npm_config_services > logs.txt",
|
||||
"logs": "export $(grep -v '^#' config.env | xargs) && docker compose logs --tail=100 -f $npm_config_services",
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
echo "We will need to wait ~5-10 minutes for things to settle down, migrations to finish, and TLS certs to be issued"
|
||||
echo ""
|
||||
echo "⏳ Waiting for OneUptime to boot (this will take a few minutes)"
|
||||
|
||||
echo "Checking API Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/api/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "API is up ✔️"
|
||||
|
||||
echo "Checking Dashboard Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/dashboard/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Dashboard is up ✔️"
|
||||
|
||||
echo "Checking File Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/file/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "File server is up ✔️"
|
||||
|
||||
echo "Checking Status Page Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/status-page/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Status Page Server is up ✔️"
|
||||
|
||||
echo "Checking Home Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Home Server is up ✔️"
|
||||
|
||||
echo "Checking Accounts Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/accounts/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Accounts Server is up ✔️"
|
||||
|
||||
echo "Checking Notification Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/notification/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Notification Server is up ✔️"
|
||||
|
||||
echo "Checking Worker Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/workers/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Worker Server is up ✔️"
|
||||
|
||||
echo "Checking Identity Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/identity/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Identity Server is up ✔️"
|
||||
|
||||
echo "Checking Workflow Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/workflow/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Workflow Server is up ✔️"
|
||||
|
||||
echo "Checking API Docs Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/reference/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "API Docs Server is up ✔️"
|
||||
|
||||
echo "Checking Link Shortener Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/l/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Link Shortener Server is up ✔️"
|
||||
|
||||
echo "Checking Admin Dashboard Server Status..."
|
||||
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/admin/status)" != "200" ]]; do sleep 5; done'
|
||||
echo "Admin Dashboard Server is up ✔️"
|
||||
|
||||
echo "⌛️ OneUptime is up!"
|
||||
echo ""
|
||||
echo "🎉🎉🎉 Done! 🎉🎉🎉"
|
||||
|
||||
echo "We would like to hear your feedback to make this product better for you and for other users, please email us at hello@oneuptime.com."
|
||||
echo " - If you notice a bug, we will fix it for you."
|
||||
echo " - If you need a feature, we will add that to the roadmap and let you know the estimated time to ship."
|
||||
echo "We would love to hear your feedback. Email: hello@oneuptime.com"
|
||||
Reference in New Issue
Block a user