Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation 7 deployment view #20

Merged
merged 4 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: gatewayservice

deploy:
name: Deploy over SSH
runs-on: ubuntu-latest
Expand Down
Binary file added docs/images/07_overview.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 22 additions & 23 deletions docs/src/07_deployment_view.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ifndef::imagesdir[:imagesdir: ../images]

[[section-deployment-view]]


== Deployment View

ifdef::arc42help[]
Expand Down Expand Up @@ -44,6 +43,8 @@ See https://docs.arc42.org/section-7/[Deployment View] in the arc42 documentatio
****
endif::arc42help[]

Our system infrastructure consists of a single virtual machine running Ubuntu 22.04 LTS. This server hosts a Node.js application inside a Docker container and includes a MongoDB database to store application data. The application also interacts with the Wikidata API to generate dynamic content. Additionally, we use a Large Language Model (LLM) that leverages context from the application to provide user hints.

=== Infrastructure Level 1

ifdef::arc42help[]
Expand All @@ -60,41 +61,39 @@ For multiple environments or alternative deployments please copy and adapt this
****
endif::arc42help[]

_**<Overview Diagram>**_
image::07_overview.drawio.png[]

Motivation::

_<explanation in text form>_
The choice of this infrastructure is driven by the flexibility of a dockerized microservice architecture. Containerization simplifies deployment and ensures consistency across different environments. Additionally, Docker's platform-agnostic nature allows the application to run on virtually any machine, making scaling and maintenance more efficient.

Quality and/or Performance Features::

_<explanation in text form>_
- _Scalability_: The system can be easily scaled horizontally by adding more service instances, leveraging the container orchestrator for efficient load distribution.

Mapping of Building Blocks to Infrastructure::
_<description of the mapping>_
- _Portability_: The application can be deployed in any environment that supports Docker containers, enabling seamless migration to different cloud providers if needed.

- _Maintainability_: Each container operates independently, allowing for individual updates and maintenance. By replacing containers with new application versions, the system remains up-to-date with minimal disruption.

=== Infrastructure Level 2
- _Security_: The system is hosted in a secure environment on the Azure cloud platform. Each container runs in isolation, minimizing the impact of potential security breaches and ensuring high availability.

ifdef::arc42help[]
[role="arc42help"]
****
Here you can include the internal structure of (some) infrastructure elements from level 1.

Please copy the structure from level 1 for each selected element.
****
endif::arc42help[]

==== _<Infrastructure Element 1>_
Mapping of Building Blocks to Infrastructure::
|===
| Component | Description

_<diagram + explanation>_
| User agent
| The client that accesses the system through the web application.

==== _<Infrastructure Element 2>_
| Virtual Machine
| The server hosting the system.

_<diagram + explanation>_
| Docker
| Containerization platform used for deploying and managing the system.

...
| Wikidata API
| External service that provides dynamic content for the application.

==== _<Infrastructure Element n>_
| Large Language Model (LLM)
| AI-powered component that analyzes application context to assist users with relevant hints.

_<diagram + explanation>_
|===
4 changes: 2 additions & 2 deletions llmservice/llm-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ const llmConfigs = {
transformResponse: (response) => response.data.candidates[0]?.content?.parts[0]?.text
},
empathy: {
url: () => 'https://empathyai.prod.empathy.co/v1/chat/completions',
url: () => 'https://empathyai.staging.empathy.co/v1/chat/completions',
transformRequest: (question) => ({
model: "mistralai/Mistral-7B-Instruct-v0.3",
model: "qwen/Qwen2.5-Coder-7B-Instruct",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: question }
Expand Down