com.github.srujankujmar:dockerfile-gen-services

Hyscale Project

License

License

Categories

Categories

Docker Container Virtualization Tools
GroupId

GroupId

com.github.srujankujmar
ArtifactId

ArtifactId

dockerfile-gen-services
Last Version

Last Version

0.9.8.1
Release Date

Release Date

Type

Type

jar
Description

Description

Hyscale Project

Download dockerfile-gen-services

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.srujankujmar/dockerfile-gen-services/ -->
<dependency>
    <groupId>com.github.srujankujmar</groupId>
    <artifactId>dockerfile-gen-services</artifactId>
    <version>0.9.8.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.srujankujmar/dockerfile-gen-services/
implementation 'com.github.srujankujmar:dockerfile-gen-services:0.9.8.1'
// https://jarcasting.com/artifacts/com.github.srujankujmar/dockerfile-gen-services/
implementation ("com.github.srujankujmar:dockerfile-gen-services:0.9.8.1")
'com.github.srujankujmar:dockerfile-gen-services:jar:0.9.8.1'
<dependency org="com.github.srujankujmar" name="dockerfile-gen-services" rev="0.9.8.1">
  <artifact name="dockerfile-gen-services" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.srujankujmar', module='dockerfile-gen-services', version='0.9.8.1')
)
libraryDependencies += "com.github.srujankujmar" % "dockerfile-gen-services" % "0.9.8.1"
[com.github.srujankujmar/dockerfile-gen-services "0.9.8.1"]

Dependencies

compile (12)

Group / Artifact Type Version
com.github.srujankujmar : dockerfile-gen-core jar 0.9.8.1
com.github.srujankujmar : commons jar 0.9.8.1
com.github.srujankujmar : service-spec-commons jar 0.9.8.1
com.github.docker-java : docker-java jar 3.1.5
org.apache.commons : commons-lang3 jar 3.9
com.google.guava : guava jar 28.2-jre
javax.annotation : javax.annotation-api jar 1.3.2
com.fasterxml.jackson.core : jackson-databind jar 2.10.0
com.fasterxml.jackson.core : jackson-core jar 2.10.0
com.fasterxml.jackson.dataformat : jackson-dataformat-yaml jar 2.10.0
org.slf4j : slf4j-api jar 1.7.26
org.springframework.boot : spring-boot jar 2.2.6.RELEASE

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar 2.2.6.RELEASE

Project Modules

There are no modules declared in this project.

HyScale

Actions Status Security Rating Release


Kubernetes (K8s) is complex. This makes application deployment to K8s challenging, time-consuming, tedious and error-prone. But it doesn't have to be that way.

This project is aimed at building an abstraction framework over K8s (for app deployments) in the same vein as jQuery over Javascript or Spring over servlets.

HyScale takes a simple, short Declarative definition of your service config, given the config it generates Dockerfile, Container Image, Kubernetes Manifests (YAMLs) and deploys to any Kubernetes Cluster returning back the app URL. Also it abstracts & simplifies Deployment Troubleshooting and Runtime Ops.

HyScale can be used to deploy either Monolithic or Microservice Applications.

Table of Contents

Abstracting K8s

Containerizing apps and deploying them to K8s can be tedious and error-prone with having to write & maintain large portions of yaml, dealing with cryptic K8s error messages, challenging new ops and keeping up with new K8s versions. An abstraction brings higher-level objects & actions that are intuitively understood by developers & devops professionals alike making deployments, maintenance & troubleshooting a breeze!

Such an abstraction must:
a) be declarative,
b) intuitive to read, and
c) orders of magnitude smaller to write & maintain



Demo

Watch the video

For more detailed information refer the wiki.

Examples

For instance, if your service requires to persist some data at the path /mydata , all you would need to declare is:

volumes:
    - name: myvol
      path: /mydata
      size: 1G

and leave to the abstraction framework all the details of generating the right yamls & labels for stateful sets, persistent volume templates, with PVCs linked to the storage class, etc.

Similarly, if your service needs auto-scaling, the high-level intent declaration would be something like this:

replicas:
      min: 2
      max: 5
      cpuThreshold: 80%

Of course you can have different profiles to override things for different environments of your app.

To see what other things you could specify in an app-centric declarative way and how to write a complete spec file, check out the tutorial here.

You can also find spec files for a few sample applications here.

App2URL | Deploying to K8s

Once you've written the declaration of your service's requirements (we call it a hspec file), deploying and obtaining a URL is a one-line command:

hyscale deploy service -f '<myservice.hspec>' -n '<my-namespace>' -a '<my-app-name>'

HyScale will generate the dockerfile if necessary, build & push the docker image, generate the required K8s yamls and talk to the K8s cluster specified at $HOME/.kube/config . At the end of this command execution, you should see a URL with which to access your app!

Completing the abstraction | Troubleshooting & Ops

If, say, you got an error message such as CrashLoopBackOff, the abstraction would tell you whether that was due to an erroneous CMD in your dockerfile, a failing health-check or a missing entrypoint for your service.

For more on app-centric automated troubleshooting, see here

And if you wanted to perform some operations such as getting the logs of a service, all you would do is say something like hyscale get service logs -s <service-name>

Download & Try

To run HyScale, you need Docker 18.09.x or above, your Kubernetes cluster token at $HOME/.kube/config and registry credentials at $HOME/.docker/config.json. Make sure you have logged into your docker registry using docker login.

If you are on Linux, install using:

curl -sSL https://get.hyscale.io | bash

For more details on pre-requisites as well as instructions for Windows & Mac, see here.

Community

Let us know your experience with HyScale!

Contribute

Our initial goal is to achieve sufficient abstraction levels to satisfy at least 80% of the app deployment use-cases out there.

Do you have any inputs that can make HyScale better? Say, a bug or a feature request? Please open a new issue here.

To contribute, see our architecture & contributor documentation here.

Versions

Version
0.9.8.1
0.9.6.0.1