Skip to content

Commit

Permalink
update devfile for pelorus-api dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Charro Gruver committed Oct 17, 2023
1 parent fa752e7 commit 622ae9c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Pelorus DORA Metrics API and Dashboard
5 changes: 5 additions & 0 deletions dev-init/env-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,17 @@ fi

APP_URL=https://$(${OC} --kubeconfig=/home/user/.kube/config get route ${DEVWORKSPACE_ID}-dev-tools-3000-pelorus-metrics -o jsonpath={.spec.host})
KEYCLOAK_URL=https://$(${OC} --kubeconfig=/home/user/.kube/config get route ${DEVWORKSPACE_ID}-keycloak-8081-keycloak -o jsonpath={.spec.host})
PELORUS_API_URL=https://$(${OC} --kubeconfig=/home/user/.kube/config get route ${DEVWORKSPACE_ID}-dev-tools-8080-pelorus-api -o jsonpath={.spec.host})
${OC} --kubeconfig=/home/user/.kube/config whoami -t > /tmp/token

echo "export NEXTAUTH_URL=${APP_URL}" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export APP_ROOT=${APP_URL}" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export PELORUS_API_URL=${PELORUS_API_URL}" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export NEXTAUTH_SECRET=\"+03/pWr4sFvxrcm29hwnXLREWjFfmW2toTCUyNcLytc=\"" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export KEYCLOAK_ISSUER=${KEYCLOAK_URL}/realms/pelorus" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export KEYCLOAK_ID=pelorus-client" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export KEYCLOAK_SECRET=null" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export KCADM=/opt/keycloak/bin/kcadm.sh" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export KCADM_CONFIG=/tmp/kcadm.config" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export AUTH_TOKEN=/tmp/token" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
echo "export PELORUS_URL=https://prometheus-pelorus.pelorus.svc:9091/api/v1" >> ${PROJECTS_ROOT}/env-tmp/set-env.sh
16 changes: 15 additions & 1 deletion devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ projects:
remote: origin
revision: main
remotes:
origin: https://github.com/etsauer/pelorus-api.git
origin: https://github.com/lab-monkeys/pelorus-api.git
- name: developer-intelligence-prototype
git:
checkoutFrom:
Expand Down Expand Up @@ -48,6 +48,14 @@ components:
protocol: https
name: pelorus-metrics
targetPort: 3000
- exposure: public
protocol: https
name: pelorus-api
targetPort: 8080
- exposure: internal
protocol: https
name: quarkus-debug
targetPort: 5005
- volume:
size: 10Gi
name: projects
Expand Down Expand Up @@ -126,6 +134,12 @@ commands:
workingDir: "${PROJECTS_ROOT}/developer-intelligence-prototype"
label: "Developer Intelligence Dev Mode"
id: dev-intel-run
- exec:
commandLine: ". ${PROJECTS_ROOT}/env-tmp/set-env.sh ; quarkus dev -Dquarkus.tls.trust-all=true -Dquarkus.http.host=0.0.0.0"
component: dev-tools
workingDir: "${PROJECTS_ROOT}/pelorus-api"
label: "Pelorus API Dev Mode"
id: pelorus-api-run
- exec:
commandLine: "nohup ${PROJECT_SOURCE}/dev-init/env-init.sh > ${PROJECTS_ROOT}/env-init.log 2>&1 &"
component: dev-tools
Expand Down

0 comments on commit 622ae9c

Please sign in to comment.