hello-universe-go-app
, a simple "Hello-Universe" service written in Go, with built-in Newrelic instrumentation.
go build -o server && ./server
# If you are really conscious about the size. You can run this instead:
go build -ldflags="-s -w" -a -o server && ./server
kubectl create ns hello-universe
cd charts/hello-universe
helm template -v 5 \
--create-namespace \
--namespace hello-universe \
--logtostderr \
--debug \
--values values-default.yaml \
hello-universe \
.
helm upgrade -v 3 \
--create-namespace \
--namespace hello-universe \
--logtostderr \
--debug \
--install \
--atomic \
--timeout 60s \
--debug \
--cleanup-on-fail \
--values values-default.yaml \
hello-universe \
.
Supply the below environment variables with valid values and start the service. Thats all.
NEW_RELIC_APP_NAME
NEW_RELIC_LICENSE_KEY
For example:
export NEW_RELIC_APP_NAME=hello-universe
export NEW_RELIC_LICENSE_KEY="YOUR VALID NEWRELIC INGEST LICENSE KEY"
go build -o server && ./server
Headover to Newrelic and find the application in "APM" screen.
Whenever a new release/tag has to be created, just update version.go
and push it to main
branch. A github workflow is already configured that creates the actual (git) tag, which will be available in https://github.com/none-da/hello-universe-go-app/tags page.
For now Github release creation is still manual.
Whenever a new tag is created (using the above mentioned steps), a github workflow automatically kicks-in, builds the docker images and pushes to Dockerhub.