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

chore: fix formatting #5

Merged
merged 1 commit into from
Oct 23, 2024
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
4 changes: 2 additions & 2 deletions content/articles/2023-05-12_progressive_web_apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ It seems that push notifications are currently not supported on iOS ([https://ww

- Example with next-pwa and push notifications: [https://github.com/shadowwalker/next-pwa/tree/master/examples/web-push](https://github.com/shadowwalker/next-pwa/tree/master/examples/web-push)
- How to turn a Webapp into a PWA? The bare minimum you need:
- 1) Use HTTPS
- 2) Your app needs to register a service worker with a fetch event handler (e.g. to deal with caching, have the site respond with 200 when the user is offline and send push notifications) 3) a manifest file with a set of home screen icons in different sizes (attention: specifying icons in the standard way might not work on older versions of iOS. Instead, logos need to be specified in the publig index.html)
- 1. Use HTTPS
- 2. Your app needs to register a service worker with a fetch event handler (e.g. to deal with caching, have the site respond with 200 when the user is offline and send push notifications) 3) a manifest file with a set of home screen icons in different sizes (attention: specifying icons in the standard way might not work on older versions of iOS. Instead, logos need to be specified in the publig index.html)

## Publishing PWAs to App Stores

Expand Down
5 changes: 4 additions & 1 deletion content/cloud/azure-blob-storage.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
title: Azure Blob Storage
---

# What is Azure Blob Storage?

> ...

# Further Resources
- ...

- ...
5 changes: 4 additions & 1 deletion content/cloud/azure-container-apps.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
title: Azure Container Apps
---

# What are Azure Container Apps?

> ...

# Further Resources
- ...

- ...
20 changes: 19 additions & 1 deletion content/cloud/azure-cost-efficiency.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
---
title: Azure Cost Efficiency
---

# Virtual Machines

- Ensure that the storage attached to a VM has a sensible size and tier, as especially premium storage can become very expensive. Use small disks and standard storage for VMs where storage is not critical.
- ...

# Kubernetes

- Use ARM-based virtual machines for node pools if the image architecture of the applications allows for it
- Enable ephemeral storage for virtual machines, as having attached storage is very expensive and unnecessary in the majority of cases (as storage is handled through Azure Storage anyways)
- ...

# Log Analytics

- Log analytics can become very expensive, especially when logs from, e.g., Kubernetes are ingested, as there can be hundreds of containers that do not even belong to own applications. Restrict the data that is logged to log analytics on the source services (if possible) or define a cap for logging if retention is not critical.
- ...

# Functions

- Use the [consumption plan](https://learn.microsoft.com/en-us/azure/azure-functions/consumption-plan) for real usage-based pricing. However, this is only possible if features restricted to the [premium plan](https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan) are not required (e.g., virtual network integration is not required and cold starts can be tolerated). The premium plan always has a minimum of one running instance (even if the application is unused), while the consumption plan causes no cost if the application is not in use.
- ...

# Container Apps

- Define a HTTP scaling rule that enables scale-to-zero (if possible). Otherwise, container apps become more expensive than containers/apps hosted with other approaches.
- ...

# Static Web Apps

- For simple applications and also less complex [[next-js]] applications, use Azure Static Web Apps, as they offer the cheapest way of hosting web applications.
- ...

# Bastion

Recommendation: Instead of Azure Bastion, use a self-made virtual machine ("Jumbox") within the virtual network that can be turned off/on when necessary (and only causes storage cost when turned off) -> Azure Bastion is very expensive, can only be deleted and not stopped, and only allows SSH access to virtual machines, but does not allow for access to databases.

# Storage Accounts

- ...

# App Service
Recommendation: Evaluate another dynamically scalable container-based hosting service, as app service is very expensive in terms of resources (e.g., container apps or container instances).

Recommendation: Evaluate another dynamically scalable container-based hosting service, as app service is very expensive in terms of resources (e.g., container apps or container instances).
17 changes: 11 additions & 6 deletions content/cloud/azure-functions.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
---
title: Azure Functions
---

# What are Azure Functions?

> Azure Functions is a serverless compute service provided by Microsoft Azure that allows developers to run event-triggered code without the need to provision or manage infrastructure [1](https://www.serverless360.com/azure-functions). This service is designed to execute a piece of code or script in response to a variety of events, making it ideal for tasks that need to be performed quickly, often within seconds or less [2](https://www.azureguru.org/some-key-features-of-azure-functions/).
>
>
> Azure Functions supports multiple programming languages, including C#, F#, JavaScript, Java, PowerShell, Python, and TypeScript, among others [1](https://www.serverless360.com/azure-functions). The service is designed to be scalable, automatically allocating necessary resources when the demand for code execution increases, and disposing of any leftover resources when the demand decreases [3](https://revdebug.com/blog/azure-functions-overview-use-cases/).
>
> Azure Functions can be triggered by a variety of events, such as HTTP requests, timers, or messages from other Azure services [1](https://www.serverless360.com/azure-functions). They are commonly used for tasks like reminders and notifications, scheduled tasks, file processing, and data stream processing [3](https://revdebug.com/blog/azure-functions-overview-use-cases/). They can also be used to build web APIs, respond to database changes, process IoT streams, manage message queues, and more [9](https://learn.microsoft.com/en-us/azure/azure-functions/).
>
>
> Azure Functions can be triggered by a variety of events, such as HTTP requests, timers, or messages from other Azure services [1](https://www.serverless360.com/azure-functions). They are commonly used for tasks like reminders and notifications, scheduled tasks, file processing, and data stream processing [3](https://revdebug.com/blog/azure-functions-overview-use-cases/). They can also be used to build web APIs, respond to database changes, process IoT streams, manage message queues, and more [9](https://learn.microsoft.com/en-us/azure/azure-functions/).
>
> Azure Functions offers several hosting options, including the Consumption plan where you only pay for execution time, and the Premium plan which provides always warm instances for faster response times [4](https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview). The service integrates with various Azure services and offers a high level of hardware abstraction, allowing developers to focus on core business logic [7](https://azure.microsoft.com/en-us/products/functions).
>
>
> Source: perplexity.ai with the prompt "what are azure functions?"

# Examples

- KlickerUZH: Azure Function with an HTTP trigger that adds a message to [[azure-service-bus]] (queue) for asynchronous further processing (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-incoming-responses
- KlickerUZH: Azure Function with an [[azure-service-bus]] trigger that processes the message and updates state in a Redis cache (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-response-processor
- KlickerUZH: Azure Function with an [[azure-service-bus]] trigger that reads from MongoDB and stores a new file on [[azure-blob-storage]] (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-migration-v2-export
- KlickerUZH: Azure Function with an [[azure-blob-storage]] trigger that processes a JSON blob and updates data in PostgreSQL (in [[typescript]]) -> https://github.com/uzh-bf/klicker-uzh/tree/v3/apps/func-migration-v3-import
- KlickerUZH: [[github-actions]] workflow for automated deployment of an Azure Function -> https://github.com/uzh-bf/klicker-uzh/blob/v3/.github/workflows/v3_klickeruzhprod-responses.yml

# Further Resources

- Azure Functions Documentation: https://learn.microsoft.com/en-us/azure/azure-functions/
- Azure Functions Best Practice: https://learn.microsoft.com/en-us/azure/azure-functions/functions-best-practices
- Integrating Azure Functions with Container Apps: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deploy-container-apps?tabs=acr%2Cbash&pivots=programming-language-typescript
- Github Actions for Azure Functions Deployment: https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-github-actions?tabs=windows%252Cdotnet
- Github Actions for Azure Functions Deployment: https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-github-actions?tabs=windows%252Cdotnet
5 changes: 4 additions & 1 deletion content/cloud/azure-service-bus.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
title: Azure Service Bus
---

# What is Azure Service Bus?

> ...

# Further Resources
- ...

- ...
2 changes: 1 addition & 1 deletion content/concepts/secret-ops.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ title: SecretOps
# What is SecretOps / Secrets Management?

> Secrets management is the process of securely handling and protecting sensitive information such as passwords, API keys, encryption keys, and access tokens that are used in computer systems and applications. This involves securely storing, managing, and accessing these secrets to prevent unauthorized use and minimize security risks. It includes practices like dynamic secret generation, encryption, access control, secret rotation, and auditing to ensure that sensitive data is only accessible to authorized entities and remains protected both at rest and in transit.
>
>
> Source: GPT-4 summary of https://infisical.com/blog/what-is-vault

# Tools
Expand Down
3 changes: 2 additions & 1 deletion content/concepts/serverless.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
title: Serverless Computing
---

# What is Serverless Computing?

> Serverless computing is a cloud computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. It is a form of utility computing.
>
>
> Source: GPT-4 summary of https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview

# Tools
Expand Down
16 changes: 8 additions & 8 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Welcome to our developer knowledge base and project overview.

# Latest Projects and Articles

| Projects | Articles |
| --- | --- |
| [Automated Grading](projects/automated-grading.md) | [Progressive Web Apps](articles/2023-05-12_progressive_web_apps.md) |
| [Design System](projects/design-system.md) | [Intro to Github Actions](articles/2023-04-26_intro_github_actions.md) |
| [EscapeUZH](projects/escape-uzh.md) | [Testing Web Apps with Cypress](articles/2022-12-30_testing_web_apps.md) |
| [GBL@UZH](projects/gbl-uzh.md) | [NLP with Python](articles/2022-12-30_nlp_with_python.md) |
| [KlickerUZH](projects/klicker-uzh.md) | |
| [Thesis Platform](projects/thesis-platform.md) | |
| Projects | Articles |
| -------------------------------------------------- | ------------------------------------------------------------------------ |
| [Automated Grading](projects/automated-grading.md) | [Progressive Web Apps](articles/2023-05-12_progressive_web_apps.md) |
| [Design System](projects/design-system.md) | [Intro to Github Actions](articles/2023-04-26_intro_github_actions.md) |
| [EscapeUZH](projects/escape-uzh.md) | [Testing Web Apps with Cypress](articles/2022-12-30_testing_web_apps.md) |
| [GBL@UZH](projects/gbl-uzh.md) | [NLP with Python](articles/2022-12-30_nlp_with_python.md) |
| [KlickerUZH](projects/klicker-uzh.md) | |
| [Thesis Platform](projects/thesis-platform.md) | |

# About our Department

Expand Down
Loading