Giter VIP home page Giter VIP logo

eduk8s-hub's Introduction

eduk8s hub (hub.eduk8s.io)

Site for eduk8s hub.

Deploy

Use kapp for deploying your app

TODO We find kapp to be a better tool than kubectl for deployment of your application in Kubernetes. If you have kapp installed, you can easily try this application:

kapp deploy -a hub -f ./k8s/deploy.yaml -y

Use ytt for deploying your app

ytt is a fantastic templating engine for Kubernetes that gives us a lot of flexibility. If you have ytt installed, you can easily customize your deployment:

ytt -f k8s | kapp deploy -y --diff-changes -a eduk8shub -f-

Customize any value

If you want to customize any of the possible values you can, either provide a values.yml file or provide specific values via command line:

ytt -f k8s --data-value-yaml namespace.name=eduk8shub | kapp deploy -y --diff-changes -a eduk8shub -f-

Use kbld to build your container image

If you're in the building process, and you want to use the image you're building in the the deployment, kbld is your tool. If you have kbld installed, you can use it very easily:

ytt -f k8s --data-value-yaml namespace.name=eduk8shub  --data-value-yaml image.build=true | kbld -f - | kapp deploy -y --diff-changes -a eduk8shub -f-

If you want to build your container by compiling locally your java application (faster), use:

mvn package
ytt -f k8s --data-value-yaml namespace.name=eduk8shub  --data-value-yaml image.build=true --data-value-yaml dockerfile=docker/Dockerfile.innerloop | kbld -f - | kapp deploy -y --diff-changes -a eduk8shub -f-

If you don't have maven locally, or you want to build your application archive (.jar file) it in a container, use:

ytt -f k8s --data-value-yaml namespace.name=eduk8shub  --data-value-yaml image.build=true --data-value-yaml dockerfile=docker/Dockerfile.outerloop | kbld -f - | kapp deploy -y --diff-changes -a eduk8shub -f-

Delete your application

If you want to delete your application, it can be done in an easy command, anywhere:

kapp delete -a eduk8shub

Build your container

There's 4 ways to build your container image:

  • Build your application locally using maven and the SpringBoot Cloud Native Buildpacks (CNB).
  • Build your application locally and then create the container image with a Docker multi-stage build. This will mostly be used for local development as it benefits from maven cache
  • Build your application and container image with a Docker multi-stage build. This will be slower, but it doesn't depend on having maven installed.
  • Build your application and image with a Buildpack

Option 1: Spring-Boot maven build plugin

mvn package spring-boot:build-image
docker tag k8s/eduk8shub:cnb k8s/eduk8shub:latest

Option 2: Inner loop build

mvn package
docker build -t "k8s/eduk8shub:innerloop" -f docker/Dockerfile.innerloop .
docker tag k8s/eduk8shub:innerloop k8s/eduk8shub:latest

Option 3: Outer loop build

docker build -t "k8s/eduk8shub:outerloop" -f docker/Dockerfile.outerloop .
docker tag k8s/eduk8shub:outerloop k8s/eduk8shub:latest

Option 4: Inner/Outer loop build

mvn clean package spring-boot:build-image
docker tag docker.io/library/wildwest:1.0 k8s/eduk8shub:latest

Split configuration

Currently we have 2 profiles:

  • development profile: application-default.yaml
  • production profile: application.yaml

In development, we have the hub configuration in application-default.yaml although you can split configuration into multiple files and start your Boot application this way:

java -jar hub-0.0.1-SNAPSHOT.jar --spring.config.location=classpath:/application.yaml,classpath:/hub.yaml

Although in Kubernetes, you only need to place the files in file:./config/*/ and they will be automatically loaded

eduk8s-hub's People

Contributors

jorgemoralespou avatar

Watchers

 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.