Code Monkey home page Code Monkey logo

sample_web_app's Introduction

Go Sample web app

This repo contains a go sample web app to demonstrate deployment of go application in k8s environment

Requirements to run the application

  • git cli
  • kubectl cli
  • helm chart
  • minikube (for testing)

Build the application

Docker image for this application is already available on docker registry https://hub.docker.com/r/allloush92/travix_test

You can build the image locally using the following command

git pull https://github.com/Ali-Dalal/sample_web_app.git
docker build -t {TAG} . //replace tag with desired value

Running the application

by default, helm chart will pull the image directly from docker registry, you can modify web_api/templates/deployment.yml to use a local image if built locally

install the application

to install the app, run the following command

helm install web web_api/

the previous command will install k8s templates that include:

  • namespace
  • deployment
  • service

Configuration variables are written in web_api/values.yaml and can be updated on demand (number of replicas, the name of namespace, ..etc)

after installing the helm chart, if you query the number of available pods, kubectl will print the following

kubectl get pods -n travix-dev

get pods

test the application

if the installation process passes successfully, you can test the service using minikube by running the following cmd

minikube service web-travix-test-service -n travix-dev 

the previous command will produce the following and open the app in the browser minikube run service

sample_web_app's People

Contributors

ali-dalal avatar

Watchers

James Cloos avatar  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.