GithubHelp home page GithubHelp logo

hocuspocus00 / walhall-debug Goto Github PK

View Code? Open in Web Editor NEW

This project forked from corporate-org/walhall-debug

0.0 1.0 0.0 9 KB

Simple module to debug Walhall

Dockerfile 5.97% HTML 27.42% JavaScript 66.61%

walhall-debug's Introduction

walhall-debug

A container that excercises functionality in Walhall to aid with debugging issues.

NOTE: This module will expose all the environment to the user including secrets.

Running on Walhall

  1. Fork this repository into your organization linked to Walhall.
  2. Create a new application and add this module as the only module.
  3. In the module details, ensure that the expose on external URL is selected with inboud port to 8080 and outboud to 80.
  4. Deploy the application
  5. Click the generated url to see the debug report.

Functionality

Environment Summary

  • The module exposes a human readable HTML report on / and a machine readable JSON report on /json

Generate Container Logs

  • The module produces log messages at INFO and ERROR levels for every request (visible in container logs.)
  • The entire query string of both endpoints is included in the INFO and ERROR logs. For example:
GET /json?SomeStringXYZ
...
This is an INFO level message. [SomeStringXYZ]
This is an ERROR level message. [SomeStringXYZ]

Initiate HTTP requests from container

  • An HTTP GET request can be generated from the container. The URL requested is the query string on the /fetch/get endpoint.
GET /fetch/get?http://some-in-cluster-service:3981/resource

Will make an HTTP GET request for /resource on port 3981 to the service that resolves from the name some-in-cluster-service.

Database connectivity test

  • A connection is made to the database and a simple query is executed.

Configure exposed port on container

  • The port the container runs on can be configured by the PORT environmental variable.

Running Locally

Before the code can be run, dependancies need to be installed via npm:

npm install

The tool can then be run locally with this command:

node index.js

The frontend can be accessed in a browser with the following URL:

http://localhost:8080/

Building & Running the Docker Image

To build the docker image, use the following command in the root of the repository:

docker build . -t walhall-debug

The container can then be run with the command:

docker run \
	-p8080:8080 \
	--name walhall-debug \
	walhall-debug

The container can be stopped with the following command:

docker stop walhall-debug

walhall-debug's People

Contributors

chrishumanitec avatar nilsty avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.