Remove link-shortener service and related configurations

This commit is contained in:
Simon Larsen
2023-12-11 19:03:04 +00:00
parent 19b717019b
commit a35462b3c9
11 changed files with 1 additions and 182 deletions

View File

@@ -39,20 +39,6 @@ jobs:
- run: cd CommonServer && npm install
- run: cd ApiReference && npm install && npm run compile
compile-link-shortener:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd LinkShortener && npm install && npm run compile
compile-common-server:
runs-on: ubuntu-latest
env:

View File

@@ -25,20 +25,6 @@ jobs:
- name: build docker image
run: sudo docker build -f ./Accounts/Dockerfile .
docker-build-link-shortener:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Preinstall
run: npm run prerun
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./LinkShortener/Dockerfile .
docker-build-otel-collector:
runs-on: ubuntu-latest

View File

@@ -329,21 +329,6 @@ jobs:
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
link-shortener-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/link-shortener
ghcr.io/oneuptime/link-shortener
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 }}
@@ -361,8 +346,6 @@ jobs:
- name: Generate Dockerfile from Dockerfile.tpl
run: npm run prerun
# Build and deploy link-shortener.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:

View File

@@ -265,67 +265,6 @@ jobs:
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
link-shortener-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/link-shortener
ghcr.io/oneuptime/link-shortener
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 link-shortener.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ./LinkShortener/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}}
workers-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest

View File

@@ -29,8 +29,6 @@
value: {{ $.Release.Name }}-dashboard-api.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}
- name: SERVER_WORKFLOW_HOSTNAME
value: {{ $.Release.Name }}-workflow.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}
- name: SERVER_LINK_SHORTENER_HOSTNAME
value: {{ $.Release.Name }}-link-shortener.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}
- name: SERVER_INGESTOR_HOSTNAME
value: {{ $.Release.Name }}-ingestor.{{ $.Release.Namespace }}.svc.{{ $.Values.global.clusterDomain }}
- name: SERVER_TEST_SERVER_HOSTNAME

View File

@@ -1,16 +0,0 @@
# OneUptime linkShortener Deployment
{{- $linkShortenerEnv := dict "PORT" $.Values.port.linkShortener -}}
{{- $linkShortenerDeploymentArgs :=dict "IsServer" true "ServiceName" "link-shortener" "Port" $.Values.port.linkShortener "Release" $.Release "Values" $.Values "Env" $linkShortenerEnv -}}
{{- include "oneuptime.deployment" $linkShortenerDeploymentArgs }}
---
# OneUptime linkShortener Service
{{- $linkShortenerServiceArgs := dict "ServiceName" "link-shortener" "Port" $.Values.port.linkShortener "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.service" $linkShortenerServiceArgs }}
---
# OneUptime linkShortener autoscaler
{{- $linkShortenerAutoScalerArgs := dict "ServiceName" "link-shortener" "Release" $.Release "Values" $.Values -}}
{{- include "oneuptime.autoscaler" $linkShortenerAutoScalerArgs }}
---

View File

@@ -18,12 +18,6 @@ upstream workflow {
server ${SERVER_WORKFLOW_HOSTNAME}:${WORKFLOW_PORT} weight=10 max_fails=3 fail_timeout=30s;
}
upstream link-shortener {
server ${SERVER_LINK_SHORTENER_HOSTNAME}:${LINK_SHORTENER_PORT} weight=10 max_fails=3 fail_timeout=30s;
}
upstream api-reference {
server ${SERVER_API_REFERENCE_HOSTNAME}:${API_REFERENCE_PORT} weight=10 max_fails=3 fail_timeout=30s;
}
@@ -551,7 +545,7 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://link-shortener/;
proxy_pass http://dashboard-api/api/link-shortner;
client_max_body_size 50M;
}

View File

@@ -78,7 +78,6 @@ SERVER_ACCOUNTS_HOSTNAME=accounts
SERVER_REALTIME_HOSTNAME=realtime
SERVER_DASHBOARD_API_HOSTNAME=dashboard-api
SERVER_WORKFLOW_HOSTNAME=workflow
SERVER_LINK_SHORTENER_HOSTNAME=link-shortener
SERVER_ALERT_HOSTNAME=alert
SERVER_INGESTOR_HOSTNAME=ingestor
SERVER_TEST_SERVER_HOSTNAME=test-server

View File

@@ -20,7 +20,6 @@ x-common-variables: &common-variables
SERVER_REALTIME_HOSTNAME: realtime
SERVER_DASHBOARD_API_HOSTNAME: dashboard-api
SERVER_WORKFLOW_HOSTNAME: workflow
SERVER_LINK_SHORTENER_HOSTNAME: link-shortener
SERVER_ALERT_HOSTNAME: alert
SERVER_INGESTOR_HOSTNAME: ingestor
SERVER_TEST_SERVER_HOSTNAME: test-server
@@ -241,21 +240,6 @@ services:
- postgres
- notification
link-shortener:
networks:
- oneuptime
restart: always
environment:
<<: *common-server-variables
PORT: ${LINK_SHORTENER_PORT}
depends_on:
- redis
- postgres
links:
- redis
- postgres
workflow:

View File

@@ -221,32 +221,6 @@ services:
network: host
context: .
dockerfile: ./DashboardAPI/Dockerfile
link-shortener:
volumes:
- ./LinkShortener:/usr/src/app
# Use node modules of the container and not host system.
# https://stackoverflow.com/questions/29181032/add-a-volume-to-docker-but-exclude-a-sub-folder
- /usr/src/app/node_modules/
- ./Common:/usr/src/Common
- ./Model:/usr/src/Model
- ./CommonServer:/usr/src/CommonServer
- ./CommonUI:/usr/src/CommonUI
- /usr/src/Common/node_modules/
- /usr/src/CommonUI/node_modules/
- /usr/src/CommonServer/node_modules/
- /usr/src/Model/node_modules/
extends:
file: ./docker-compose.base.yml
service: link-shortener
ports:
- '9826:9229' # Debugging port.
build:
network: host
context: .
dockerfile: ./LinkShortener/Dockerfile
workflow:

View File

@@ -71,14 +71,6 @@ services:
extends:
file: ./docker-compose.base.yml
service: dashboard-api
link-shortener:
image: oneuptime/link-shortener:${APP_TAG}
extends:
file: ./docker-compose.base.yml
service: link-shortener
workflow: