Compare commits

..

26 commits
v1.1.7 ... main

Author SHA1 Message Date
caf5d0a7e8 Update .forgejo/workflows/delete.yaml
All checks were successful
build / build (push) Successful in 15s
2025-10-24 07:59:45 +00:00
8076efc80a Update .forgejo/workflows/deploy.yaml
All checks were successful
build / build (push) Successful in 15s
2025-10-24 07:59:29 +00:00
b8844249d4 Update EdgeConnectConfig.yaml
All checks were successful
build / build (push) Successful in 15s
2025-10-24 07:57:25 +00:00
09ad5decdf chore(edgeplatform): using new delete action syntax
All checks were successful
build / build (push) Successful in 14s
2025-10-20 17:15:21 +02:00
f190109025 chore(edgeplatform): switched to orca staging environment
All checks were successful
build / build (push) Successful in 14s
2025-10-20 17:07:06 +02:00
83297a1587 chore(edge-client): updated edge deployment manifest to sdk 2.0.1
All checks were successful
build / build (push) Successful in 13s
2025-10-20 14:56:55 +00:00
e9d4a8acef fix(edgeconnect-delete-action): fix passing of env vars to the delete action
All checks were successful
build / build (push) Successful in 15s
2025-10-15 11:38:58 +02:00
ace8efa150 feat(delete-action): sort the input params in forgejo action
All checks were successful
build / build (push) Successful in 15s
2025-10-15 11:23:22 +02:00
c197daefa0 feat(edgeconnect-demo-delete): added delete action for IPCEICIS-5882
All checks were successful
build / build (push) Successful in 15s
2025-10-15 11:10:15 +02:00
147cea0736 chore(): changed target organisation from dev-framework to edp2
All checks were successful
build / build (push) Successful in 20s
2025-10-15 08:20:43 +00:00
eb74d05765
ci: cleanup
All checks were successful
build / build (push) Successful in 20s
2025-10-02 16:42:52 +02:00
a9f67e4eb0
ci: Fixed sha
All checks were successful
build / build (push) Successful in 16s
2025-10-02 16:39:52 +02:00
06d7f5f980
ci: hardcoded image coordinates
All checks were successful
build / build (push) Successful in 15s
2025-10-02 16:31:48 +02:00
a36a9ed8f6
ci: Changed sha tag name, using docker tag in deployment 2025-10-02 16:28:50 +02:00
81006d192b
ci: Changed workflow to trigger deploy after build using the commit sha in image tags
All checks were successful
build / build (push) Successful in 15s
2025-10-02 16:18:13 +02:00
a5ebeff989 fix(pipeline): added edge connect login data
All checks were successful
build / build (push) Successful in 15s
2025-10-02 14:33:04 +02:00
9cbe3875b9 fix(pipeline): added checkout action
All checks were successful
build / build (push) Successful in 14s
2025-10-02 14:24:45 +02:00
c5cfc9d5c6 fix(action): fixed input parameter name
All checks were successful
build / build (push) Successful in 15s
2025-10-02 14:22:25 +02:00
6ba6a78b12 feat(edgeconnect): Added sdk action
All checks were successful
build / build (push) Successful in 34s
2025-10-02 14:14:37 +02:00
11e8511b64
fix(action): 🚑 fix action url again 2025-09-23 15:31:32 +02:00
ef0335bda0
fix(action): 🚚 Use correct action default url 2025-09-23 15:29:03 +02:00
6279a296bf
fix(action): 🐛 fix action path 2025-09-23 15:22:40 +02:00
b1afc10922
feat(action): Use deploy action 2025-09-23 15:17:09 +02:00
84a4576935 .forgejo/workflows/createapp.yaml aktualisiert 2025-09-15 15:24:19 +00:00
1291e72b6f Update .forgejo/workflows/createapp.yaml 2025-08-29 09:25:36 +00:00
6d8d7548bc Update .forgejo/workflows/createapp.yaml 2025-08-29 09:23:31 +00:00
7 changed files with 135 additions and 252 deletions

View file

@ -26,6 +26,9 @@ jobs:
id: docker
with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
tags: |
type=sha,prefix=
type=ref,event=tag
-
name: Login to registry
uses: docker/login-action@v3

View file

@ -1,136 +0,0 @@
name: createapp
on:
workflow_dispatch:
inputs:
a_app_region:
type: string
description: "Application Region e.g. EU"
default: EU
required: true
b_app_flavor:
type: string
description: "Application Flavor e.g. EU.small"
default: EU.small
required: true
c_cloudlet:
type: choice
options:
- Amsterdam-OTC
- Hamburg
- Leipzig
- Munich
- Berlin
- Frankfurt
- Magdeburg-OTC
- Bonn
- Magdeburg
- crm-vm-2
description: "Cloudlet location"
default: Munich
required: true
env:
EDGEXR_PLATFORM_USERNAME: ${{ secrets.EDGEXR2_PLATFORM_USERNAME }}
EDGEXR_PLATFORM_PASSWORD: ${{ secrets.EDGEXR2_PLATFORM_PASSWORD }}
APP_REGION: ${{ inputs.a_app_region }}
APP_FLAVOR: ${{ inputs.b_app_flavor }}
CLOUDLET: ${{ inputs.c_cloudlet }}
jobs:
build:
runs-on: ubuntu-22.04
steps:
-
name: Repository meta
id: repository
run: |
registry=${{ github.server_url }}
registry=${registry##http*://}
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
echo "registry=${registry}"
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
echo "repository=${repository}"
-
name: Docker meta
uses: docker/metadata-action@v5
id: docker
with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
-
name: Install Dependencies
run: |
sudo apt update
sudo apt install -y curl jq
-
name: Create Edge Connect App
run: |
set -e
echo login
EDGEXR_TOKEN="$(curl -X POST https://mc.orca.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)"
CREATEAPP_JSON=$(cat <<EOF
{
"region": "${APP_REGION}",
"app": {
"key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')",
"version": "${{ steps.docker.outputs.version }}"
},
"deployment": "kubernetes",
"image_type": "Docker",
"image_path": "${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}:${{ steps.docker.outputs.version }}",
"allow_serverless": true,
"defaultFlavor": {
"name": "${APP_FLAVOR}"
},
"serverless_config": {},
"deployment_generator": "kubernetes-basic",
"deployment_manifest": "apiVersion: v1\nkind: Service\nmetadata:\n name: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')-tcp\n labels:\n run: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')\nspec:\n type: LoadBalancer\n ports:\n - name: tcp80\n protocol: TCP\n port: 80\n targetPort: 80\n selector:\n run: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')\n---\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')-deployment\nspec:\n replicas: 1\n selector:\n matchLabels:\n run: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')\n template:\n metadata:\n labels:\n run: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')\n mexDeployGen: kubernetes-basic\n spec:\n volumes:\n containers:\n - name: $(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')\n image: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}:${{ steps.docker.outputs.version }}\n imagePullPolicy: Always\n ports:\n - containerPort: 80\n protocol: TCP\n\n"
}
}
EOF
)
echo $CREATEAPP_JSON
echo create app
curl -X POST https://mc.orca.platform.mg3.mdb.osc.live/api/v1/auth/ctrl/CreateApp -H 'Content-Type: application/json' -H "Authorization: Bearer $EDGEXR_TOKEN" -S --data "$CREATEAPP_JSON" --fail-with-body
-
name: Create Edge Connect App Instance
run: |
set -e
EDGEXR_TOKEN="$(curl -X POST https://mc.orca.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)"
CREATEAPPINSTANCE_JSON=$(cat <<EOF
{
"region": "${APP_REGION}",
"appinst": {
"key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')-instance",
"cloudlet_key": {
"organization": "TelekomOP",
"name": "${CLOUDLET}"
}
},
"app_key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')",
"version": "${{ steps.docker.outputs.version }}"
},
"flavor": {
"name": "${APP_FLAVOR}"
}
}
}
EOF
)
echo $CREATEAPPINSTANCE_JSON
echo create app instance
curl -X POST https://mc.orca.platform.mg3.mdb.osc.live/api/v1/auth/ctrl/CreateAppInst -H 'Content-Type: application/json' -H "Authorization: Bearer $EDGEXR_TOKEN" -S --data "$CREATEAPPINSTANCE_JSON" --fail-with-body

View file

@ -0,0 +1,32 @@
name: delete
on:
workflow_run:
workflows: [build]
types:
- completed
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Replace Image Version
run: |
sha="${{ github.sha }}"
shortSha="${sha:0:7}"
echo "Setting image version to: edp.buildth.ing/devfw-cicd/edgeconnect-action-demo:${shortSha}"
sed -i "s@###IMAGETAG###@edp.buildth.ing/devfw-cicd/edgeconnect-action-demo:${shortSha}@g" ./k8s-deployment.yaml
- name: Delete action
uses: https://edp.buildth.ing/DevFW-CICD/edge-connect-delete-action@main
id: delete
with:
configFile: ./EdgeConnectConfig.yaml
baseUrl: https://hub.apps.edge.platform.mg3.mdb.osc.live
username: ${{ secrets.EDGEXR_PLATFORM_USERNAME }}
password: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }}

View file

@ -1,116 +0,0 @@
name: deleteapp
on:
workflow_dispatch:
inputs:
a_app_region:
type: string
description: "Application Region e.g. EU"
default: EU
b_cloudlet:
type: choice
options:
- Amsterdam-OTC
- Hamburg
- Leipzig
- Munich
- Berlin
- Frankfurt
- Magdeburg-OTC
- Bonn
- Magdeburg
description: "Cloudlet e.g. EU.small"
default: Munich
required: true
env:
EDGEXR_PLATFORM_USERNAME: ${{ secrets.EDGEXR_PLATFORM_USERNAME }}
EDGEXR_PLATFORM_PASSWORD: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }}
APP_REGION: ${{ inputs.a_app_region }}
CLOUDLET: ${{ inputs.b_cloudlet }}
jobs:
build:
runs-on: ubuntu-22.04
steps:
-
name: Repository meta
id: repository
run: |
registry=${{ github.server_url }}
registry=${registry##http*://}
echo "registry=${registry}" >> "$GITHUB_OUTPUT"
echo "registry=${registry}"
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
echo "repository=${repository}"
-
name: Docker meta
uses: docker/metadata-action@v5
id: docker
with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
-
name: Install Dependencies
run: |
sudo apt update
sudo apt install -y curl jq
-
name: Delete Edge Connect App Instance
run: |
set -e
echo login
EDGEXR_TOKEN="$(curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)"
DELETEAPPINSTANCE_JSON=$(cat <<EOF
{
"region": "${APP_REGION}",
"appinst": {
"key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')-instance",
"cloudlet_key": {
"organization": "TelekomOP",
"name": "${CLOUDLET}"
}
},
"app_key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')",
"version": "${{ steps.docker.outputs.version }}"
}
}
}
EOF
)
echo $DELETEAPPINSTANCE_JSON
echo delete app instance
curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/auth/ctrl/DeleteAppInst -H 'Content-Type: application/json' -H "Authorization: Bearer $EDGEXR_TOKEN" -S --data "$DELETEAPPINSTANCE_JSON" --fail-with-body || true
-
name: Delete Edge Connect App
run: |
set -e
echo login
EDGEXR_TOKEN="$(curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/login -H 'Content-Type: application/json' --data '{"password": "'${EDGEXR_PLATFORM_PASSWORD}'","username": "'${EDGEXR_PLATFORM_USERNAME}'"}' -sSf | jq -r .token)"
DELETEAPP_JSON=$(cat <<EOF
{
"App": {
"key": {
"organization": "edp-developer-framework",
"name": "$(echo ${{ steps.repository.outputs.repository }} | sed -e 's|^.*/||')",
"version": "${{ steps.docker.outputs.version }}"
}
},
"Region": "${APP_REGION}"
}
EOF
)
echo $DELETEAPP_JSON
echo delete app
curl -X POST https://hub.apps.edge.platform.mg3.mdb.osc.live/api/v1/auth/ctrl/DeleteApp -H 'Content-Type: application/json' -H "Authorization: Bearer $EDGEXR_TOKEN" -S --data "$DELETEAPP_JSON" --fail-with-body

View file

@ -0,0 +1,32 @@
name: deploy
on:
workflow_run:
workflows: [build]
types:
- completed
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Replace Image Version
run: |
sha="${{ github.sha }}"
shortSha="${sha:0:7}"
echo "Setting image version to: edp.buildth.ing/devfw-cicd/edgeconnect-action-demo:${shortSha}"
sed -i "s@###IMAGETAG###@edp.buildth.ing/devfw-cicd/edgeconnect-action-demo:${shortSha}@g" ./k8s-deployment.yaml
- name: Deploy action
uses: https://edp.buildth.ing/DevFW-CICD/edge-connect-deploy-action@main
id: deploy
with:
configFile: ./EdgeConnectConfig.yaml
baseUrl: https://hub.apps.edge.platform.mg3.mdb.osc.live
username: ${{ secrets.EDGEXR_PLATFORM_USERNAME }}
password: ${{ secrets.EDGEXR_PLATFORM_PASSWORD }}

29
EdgeConnectConfig.yaml Normal file
View file

@ -0,0 +1,29 @@
# Is there a swagger file for the new EdgeConnect API?
# How does it differ from the EdgeXR API?
kind: edgeconnect-deployment
metadata:
name: "edge-app-demo" # name could be used for appName
appVersion: "1.0.0"
organization: "edp2"
spec:
# dockerApp: # Docker is OBSOLETE
# appVersion: "1.0.0"
# manifestFile: "./docker-compose.yaml"
# image: "https://registry-1.docker.io/library/nginx:latest"
k8sApp:
manifestFile: "./k8s-deployment.yaml" # store hash of the manifest file in annotation field. Annotations is a comma separated map of arbitrary key value pairs,
infraTemplate:
- region: "EU"
cloudletOrg: "TelekomOP"
cloudletName: "Munich"
flavorName: "EU.small"
network:
outboundConnections:
- protocol: "tcp"
portRangeMin: 80
portRangeMax: 80
remoteCIDR: "0.0.0.0/0"
- protocol: "tcp"
portRangeMin: 443
portRangeMax: 443
remoteCIDR: "0.0.0.0/0"

39
k8s-deployment.yaml Normal file
View file

@ -0,0 +1,39 @@
apiVersion: v1
kind: Service
metadata:
name: edgeconnect-coder-tcp
labels:
run: edgeconnect-coder
spec:
type: LoadBalancer
ports:
- name: tcp80
protocol: TCP
port: 80
targetPort: 80
selector:
run: edgeconnect-coder
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: edgeconnect-coder-deployment
spec:
replicas: 1
selector:
matchLabels:
run: edgeconnect-coder
template:
metadata:
labels:
run: edgeconnect-coder
mexDeployGen: kubernetes-basic
spec:
volumes:
containers:
- name: edgeconnect-coder
image: ###IMAGETAG###
imagePullPolicy: Always
ports:
- containerPort: 80
protocol: TCP