Skip to content

(Almost) Zero Config Phoenix release deployments to Kubernetes

License

Notifications You must be signed in to change notification settings

cschiewek/mandrag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandrag

CircleCI

Zero Confing Elixir Deployments to Kubernetes via Helm

Requirements

  • Elixir 1.9 (See the older v0.7.x tags for versions that support > 1.9 via Distillery)
  • Mandrag expects that you have docker, kubectl and helm binaries installed and configured.
  • Currently, It also expects that you have a helm chart in the chart directory.

Installation

If available in Hex, the package can be installed by adding mandrag to your list of dependencies in mix.exs:

def deps do
  [
    {:mandrag, "~> 0.8.0"}
  ]
end

Configure

Mandrag doesn't require configuation, it'll introspect the parent mix config to derive configuration, and use it's own built-in Dockerfile, but you can override those values as seen below.

config :mandrag,
  # The name of the app and release. Defaults to the :app key in the parent mix project.
  app: :app_name,
  # The docker repo to push to. Defaults to `app_name`.
  docker_repo: "docker_user_name/app_name",
  # The path to the Dockerfile to be used.  Defaults to the Dockerfile inside this package.
  dockerfile_path: "Dockerfile",
  # A map of values that are translated to `--build-arg` arguments.
  docker_build_args: %{key: "value"}
  # The kubernetes context, defaults to your current context
  k8s_context: "docker-for-desktop"

TODO for 1.0:

  • Add default Helm chart for zero conifg standup.

TODO for 1.x:

  • Enable clustering for deploys with multiple replicas via libcluster
  • Remove dependency docker, kubectl, and helm binaries by leveraging their respective APIs

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/mandrag.

About

(Almost) Zero Config Phoenix release deployments to Kubernetes

Resources

License

Stars

Watchers

Forks

Packages

No packages published