-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
6,287 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1216,11 +1216,82 @@ jobs: | |
|
||
|
||
|
||
|
||
workflow-docker-image-deploy: | ||
needs: generate-build-number | ||
strategy: | ||
fail-fast: false | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
oneuptime/workflow | ||
ghcr.io/oneuptime/workflow | ||
tags: | | ||
type=raw,value=release,enable=true | ||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.3.0 | ||
|
||
# - name: Setup Git LFS | ||
# run: git lfs install | ||
|
||
# # Cannot do this, no space on the gitHub standard runner. We need to use the large runner which is selfhosted | ||
# - name: Download the Model from Hugging Face | ||
# run: mkdir -p ./LLM/Models && cd ./LLM/Models && git clone https://${{ secrets.HUGGING_FACE_USERNAME }}:${{ secrets.HUGGING_FACE_PASSWORD }}@huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Generate Dockerfile from Dockerfile.tpl | ||
run: npm run prerun | ||
|
||
# Build and deploy nginx. | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./Workflow/Dockerfile | ||
context: ./Workflow | ||
# arm64 is not supported by the base image of the LLM | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
test-e2e-release-saas: | ||
runs-on: ubuntu-latest | ||
needs: [copilot-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
needs: [copilot-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
@@ -1273,7 +1344,7 @@ jobs: | |
test-e2e-release-self-hosted: | ||
runs-on: ubuntu-latest | ||
# After all the jobs runs | ||
needs: [copilot-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
needs: [copilot-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1085,7 +1085,7 @@ jobs: | |
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.copilot-docker-image-deploybuild_number}} | ||
copilot-docker-image-deploy: | ||
needs: generate-build-number | ||
|
@@ -1148,10 +1148,74 @@ jobs: | |
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
workflow-docker-image-deploy: | ||
needs: generate-build-number | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Docker Meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: | | ||
oneuptime/workflow | ||
ghcr.io/oneuptime/workflow | ||
tags: | | ||
type=raw,value=test,enable=true | ||
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}}-test,pattern={{version}},enable=true | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 18.3.0 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Generate Dockerfile from Dockerfile.tpl | ||
run: npm run prerun | ||
|
||
# Build and deploy accounts. | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
file: ./Workflow/Dockerfile | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GIT_SHA=${{ github.sha }} | ||
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}} | ||
|
||
|
||
test-helm-chart: | ||
runs-on: ubuntu-latest | ||
needs: [llm-docker-image-deploy, copilot-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy] | ||
needs: [llm-docker-image-deploy, copilot-docker-image-deploy, workflow-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy] | ||
env: | ||
CI_PIPELINE_ID: ${{github.run_number}} | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# OneUptime workflow Deployment | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ printf "%s-%s" $.Release.Name "workflow" }} | ||
namespace: {{ $.Release.Namespace }} | ||
labels: | ||
app: {{ printf "%s-%s" $.Release.Name "workflow" }} | ||
app.kubernetes.io/part-of: oneuptime | ||
app.kubernetes.io/managed-by: Helm | ||
appname: oneuptime | ||
date: "{{ now | unixEpoch }}" | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: {{ printf "%s-%s" $.Release.Name "workflow" }} | ||
replicas: {{ $.Values.deployment.replicaCount }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ printf "%s-%s" $.Release.Name "workflow" }} | ||
date: "{{ now | unixEpoch }}" | ||
appname: oneuptime | ||
spec: | ||
{{- if $.Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml $.Values.imagePullSecrets | nindent 8 }} | ||
{{- end }} | ||
{{- if $.Values.podSecurityContext }} | ||
securityContext: {{- $.Values.podSecurityContext | toYaml | nindent 8 }} | ||
{{- end }} | ||
{{- if $.Values.affinity }} | ||
affinity: {{- $.Values.affinity | toYaml | nindent 8 }} | ||
{{- end }} | ||
{{- if $.Values.tolerations }} | ||
tolerations: {{- $.Values.tolerations | toYaml | nindent 8 }} | ||
{{- end }} | ||
{{- if $.Values.nodeSelector }} | ||
nodeSelector: {{- $.Values.nodeSelector | toYaml | nindent 8 }} | ||
{{- end }} | ||
containers: | ||
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "workflow" $.Values.image.tag }} | ||
name: {{ printf "%s-%s" $.Release.Name "workflow" }} | ||
# Liveness probe | ||
livenessProbe: | ||
httpGet: | ||
path: /status/live | ||
port: {{ $.Values.port.workflow }} | ||
initialDelaySeconds: 300 | ||
periodSeconds: 10 | ||
timeoutSeconds: 30 | ||
# Readyness Probe | ||
readinessProbe: | ||
httpGet: | ||
path: /status/ready | ||
port: {{ $.Values.port.workflow }} | ||
initialDelaySeconds: 300 | ||
periodSeconds: 10 | ||
timeoutSeconds: 30 | ||
{{- if $.Values.containerSecurityContext }} | ||
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }} | ||
{{- end }} | ||
imagePullPolicy: {{ $.Values.image.pullPolicy }} | ||
env: | ||
{{- include "oneuptime.env.common" . | nindent 12 }} | ||
{{- include "oneuptime.env.commonServer" . | nindent 12 }} | ||
{{- include "oneuptime.env.oneuptimeSecret" . | nindent 12 }} | ||
- name: PORT | ||
value: {{ $.Values.port.workflow | quote }} | ||
ports: | ||
- containerPort: {{ $.Values.port.workflow }} | ||
protocol: TCP | ||
name: http | ||
restartPolicy: {{ $.Values.image.restartPolicy }} | ||
|
||
--- | ||
|
||
# OneUptime app Service | ||
{{- $workflowPorts := dict "port" $.Values.port.workflow -}} | ||
{{- $workflowServiceArgs := dict "ServiceName" "workflow" "Ports" $workflowPorts "Release" $.Release "Values" $.Values -}} | ||
{{- include "oneuptime.service" $workflowServiceArgs }} | ||
--- | ||
|
||
# OneUptime app autoscaler | ||
{{- $workflowAutoScalerArgs := dict "ServiceName" "workflow" "Release" $.Release "Values" $.Values -}} | ||
{{- include "oneuptime.autoscaler" $workflowAutoScalerArgs }} | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ port: | |
isolatedVM: 4572 | ||
home: 1444 | ||
worker: 1445 | ||
|
||
workflow: 3099 | ||
|
||
testServer: | ||
enabled: false | ||
|
Oops, something went wrong.