Git Product home page Git Product logo

ads-infra-localdev's Introduction

Local minikube development tools

Overview

This project is a collection of tools targetting local container development using a Minikube. The intent is to let you run a local trimmed down version of what is being deployed to integration/staging/production.

A few standard tools are required beyond the minikube setup itself:

Exposing services

A common workflow is to run a few things in your local minikube and develop your code against them. The service-env.sh script will modify your environment to route traffic to any valid service running in the minikube. Each named port defined on a service will be exposed as a environment variable whose name is a concatenation of the service and port identifiers. Its value will be the usual IP address / TCP port combination.

The attached local.yml sample will setup a trivial environment made of a single pod running a HTTP server and a service called test exposing it on TCP 80. Go ahead and setup both the minikube and this manifest:

$ bash
bash-3.2$ cd ads-infra-localdev
bash-3.2$ minikube start
bash-3.2$ kubectl create -f local.yaml

You are ready to now tweak your minikube to expose and access its services by sourcing service-env.sh:

bash-3.2$ source service-env.sh setup
Setting up KUBERNETES_HTTPS - 10.0.2.15:443
Setting up TEST_HTTP - 172.17.0.3:80

At this point the service test exposing a port called http is exposed as $TEST_HTTP. This IP address will be routed to the proxy running in the minikube VM. Let's try to reach it:

bash-3.2$ curl $TEST_HTTP
OK

You can at any moment refresh the variables, typically if you deploy or modify your services by using the sync command. Once you are done make sure to undo the tweaks by sourcing with the teardown command.

Caveats

The service-env.sh script will require root access and must be sourced in a bash shell. Please make sure to first source with the teardown command before scrapping the minikube.

Support

Contact [email protected] for more information about this project.

ads-infra-localdev's People

Contributors

opaugam-unity 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.