Skip to content

Commit

Permalink
Merge pull request #29 from alkem-io/develop
Browse files Browse the repository at this point in the history
[0.4.0] Whiteboard server-side master
  • Loading branch information
hero101 authored Sep 30, 2024
2 parents 1ed1783 + 3051276 commit 373e184
Show file tree
Hide file tree
Showing 62 changed files with 1,913 additions and 1,101 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-deploy-k8s-dev-azure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Migrate & Deploy to Dev
name: Build & Deploy to Dev on Azure

on:
push:
Expand All @@ -25,6 +25,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/build-deploy-k8s-dev-hetzner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build & Deploy to Dev on Hetzner

on:
push:
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: 'Login into ACR'
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: 'Build & Push image'
run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: Install Kubectl
uses: azure/[email protected]
with:
version: 'v1.27.6' # Ensure this matches the version used in your cluster

- name: Set up Kubeconfig for Hetzner k3s
run: |
mkdir -p $HOME/.kube # Ensure the .kube directory exists
echo "${{ secrets.KUBECONFIG_SECRET_HETZNER_DEV }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Create Image Pull Secret
run: |
kubectl create secret docker-registry alkemio-whiteboard-collaboration-service-secret \
--docker-server=${{ secrets.REGISTRY_LOGIN_SERVER }} \
--docker-username=${{ secrets.REGISTRY_USERNAME }} \
--docker-password=${{ secrets.REGISTRY_PASSWORD }} \
--dry-run=client -o yaml | kubectl apply -f -
- uses: Azure/[email protected]
with:
manifests: |
manifests/25-whiteboard-collaboration-service-deployment-dev.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
imagepullsecrets: |
alkemio-whiteboard-collaboration-service-secret
3 changes: 2 additions & 1 deletion .github/workflows/build-deploy-k8s-sandbox-azure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Migrate & Deploy to Sandbox on Azure
name: Build & Deploy to Sandbox on Azure

on:
workflow_dispatch:
Expand All @@ -23,6 +23,7 @@ jobs:
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/build-deploy-k8s-sandbox-hetzner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build & Deploy to Sandbox on Hetzner

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: 'Login into ACR'
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: 'Build & Push image'
run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: Install Kubectl
uses: azure/[email protected]
with:
version: 'v1.27.6' # Ensure this matches the version used in your cluster

- name: Set up Kubeconfig for Hetzner k3s
run: |
mkdir -p $HOME/.kube # Ensure the .kube directory exists
echo "${{ secrets.KUBECONFIG_SECRET_HETZNER_SANDBOX }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Create Image Pull Secret
run: |
kubectl create secret docker-registry alkemio-whiteboard-collaboration-service-secret \
--docker-server=${{ secrets.REGISTRY_LOGIN_SERVER }} \
--docker-username=${{ secrets.REGISTRY_USERNAME }} \
--docker-password=${{ secrets.REGISTRY_PASSWORD }} \
--dry-run=client -o yaml | kubectl apply -f -
- uses: Azure/[email protected]
with:
manifests: |
manifests/25-whiteboard-collaboration-service-deployment-dev.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
imagepullsecrets: |
alkemio-whiteboard-collaboration-service-secret
3 changes: 2 additions & 1 deletion .github/workflows/build-deploy-k8s-test-azure.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Migrate & Deploy to Test on Azure
name: Build & Deploy to Test on Azure

on:
workflow_dispatch:
Expand All @@ -24,6 +24,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/build-deploy-k8s-test-hetzner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build & Deploy to Test on Hetzner

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: 'Login into ACR'
uses: azure/docker-login@v2
with:
login-server: ${{ secrets.REGISTRY_LOGIN_SERVER }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: 'Build & Push image'
run: |
docker build -f Dockerfile . -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }} -t ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:latest
docker push ${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: 'Checkout GitHub Action'
uses: actions/[email protected]

- name: Install Kubectl
uses: azure/[email protected]
with:
version: 'v1.27.6' # Ensure this matches the version used in your cluster

- name: Set up Kubeconfig for Hetzner k3s
run: |
mkdir -p $HOME/.kube # Ensure the .kube directory exists
echo "${{ secrets.KUBECONFIG_SECRET_HETZNER_TEST }}" > $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Create Image Pull Secret
run: |
kubectl create secret docker-registry alkemio-whiteboard-collaboration-service-secret \
--docker-server=${{ secrets.REGISTRY_LOGIN_SERVER }} \
--docker-username=${{ secrets.REGISTRY_USERNAME }} \
--docker-password=${{ secrets.REGISTRY_PASSWORD }} \
--dry-run=client -o yaml | kubectl apply -f -
- uses: Azure/[email protected]
with:
manifests: |
manifests/25-whiteboard-collaboration-service-deployment-dev.yaml
images: |
${{ secrets.REGISTRY_LOGIN_SERVER }}/alkemio-whiteboard-collaboration-service:${{ github.sha }}
imagepullsecrets: |
alkemio-whiteboard-collaboration-service-secret
14 changes: 5 additions & 9 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ settings:
# application level settings
application:
# queue
queue: ${QUEUE}:auth
queue: ${QUEUE}:alkemio-whiteboards
# MILLISECONDS wait time for a response after a request on the message queue
queue_response_timeout: ${QUEUE_RESPONSE_TIMEOUT}:10000
# the collaboration experience
Expand All @@ -41,13 +41,9 @@ settings:
# the window in which contributions are accepted to be counted towards a single contribution event;
# time is in SECONDS
contribution_window: ${CONTRIBUTION_WINDOW}:600
# SECONDS between auto saves
save_interval: ${AUTOSAVE_INTERVAL}:15
# SECONDS to wait for an acknowledgment that the save is successful, before retrying
save_timeout: ${AUTOSAVE_TIMEOUT}:20
# Amount of consecutive failed attempts to save before a collaborator is not picked for auto save
# This is useful when you want to avoid a lot of errors, or to mark a client not being reliable to save
save_consecutive_failed_attempts: ${SAVE_CONSECUTIVE_FAILED_ATTEMPTS}:5
# MILLISECONDS after the first change was made to the whiteboard before it's autosaved.
# This is preventing saving on every change - instead, all the changes done in the last interval are saved only once.
save_interval: ${AUTOSAVE_INTERVAL}:2000
# SECONDS of inactivity before a collaborator is made view-only
collaborator_inactivity: ${COLLABORATOR_INACTIVITY}:1800
# how often the inactivity timer is reset;
Expand All @@ -56,4 +52,4 @@ settings:
reset_collaborator_mode_debounce: ${INACTIVITY_DEBOUNCE}:1000
rest:
# the REST API
port: ${REST_PORT}:4005
port: ${REST_PORT}:4005
Loading

0 comments on commit 373e184

Please sign in to comment.