Skip to content

Commit

Permalink
script fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbnr committed Oct 2, 2024
1 parent 1c1ef2b commit 8e841a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/otel-astro/install_demo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
VERSION="20241002"
DEMOVERSION="20241002"

main() {
# Check if the script has been run before
Expand Down Expand Up @@ -152,7 +152,7 @@ deploy_demo () {
hbhostversion=$(. /etc/os-release; echo "$VERSION" | tr -d '[:blank:]')
hbhostname=$(. /etc/os-release; echo "$NAME" | tr -d '[:blank:]')
# Applies if does not exist or warns if exists, this is intentional to avoid uid being replaced on each time it runs
kubectl create configmap nrheartbeat --from-literal=hbdemoversion=$(VERSION) --from-literal=hbuid=$(uuidgen) --from-literal=hbhostversion=$hbhostversion --from-literal=hbhostname=$hbhostname --from-literal=hbselfhosted=$hbselfhosted --from-literal=hbstarttime=$hbstarttime
kubectl create configmap nrheartbeat --from-literal=hbdemoversion=$DEMOVERSION --from-literal=hbuid=$(uuidgen) --from-literal=hbhostversion=$hbhostversion --from-literal=hbhostname=$hbhostname --from-literal=hbselfhosted=$hbselfhosted --from-literal=hbstarttime=$hbstarttime
kubectl apply -f ./hbcronjob.yaml

if [ -d "/workspace" ]; then
Expand All @@ -163,6 +163,7 @@ deploy_demo () {
echo -e "\nAccess frontend via "https://$CODESPACE_NAME-3000.app.github.dev/""
else
kubectl --address 0.0.0.0 port-forward --pod-running-timeout=24h svc/newrelic-otel-frontendproxy 8080:8080 >> /dev/null &
clear
echo -e "\nAccess frontend via "http://your-vm-ip:8080""
fi

Expand Down
2 changes: 1 addition & 1 deletion otel-astro-demo/hbcronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ spec:
command:
- /bin/sh
- -c
- curl -k "https://f6zxc2425pz4vbuidpknebsz7q0viifd.lambda-url.eu-west-2.on.aws/?hbDemoVersion=hbdemoversion&identifier=$hbuid&hbhostversion=$hbhostversion&hbhostname=$hbhostname&hbselfhosted=$hbselfhosted&hbstarttime=$hbstarttime"
- curl -k "https://f6zxc2425pz4vbuidpknebsz7q0viifd.lambda-url.eu-west-2.on.aws/?hbDemoVersion=$hbdemoversion&identifier=$hbuid&hbhostversion=$hbhostversion&hbhostname=$hbhostname&hbselfhosted=$hbselfhosted&hbstarttime=$hbstarttime"
restartPolicy: OnFailure

0 comments on commit 8e841a3

Please sign in to comment.