hello-universe-go-app

command module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

README

hello-universe-go-app

hello-universe-go-app, a simple "Hello-Universe" service written in Go, with built-in Newrelic instrumentation.


Run server

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

Install as Helm chart

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 \
    .

Want to see Newrelic Instrumentation ?

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.


Create a Git Tag

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.


Create a Docker Image

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL