Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.87 KB

README.md

File metadata and controls

62 lines (46 loc) · 1.87 KB

FLAMEGigalixirBackend

A FLAME Backend for Gigalixir, Elixir’s Platform as a Service.

Module Version Last Updated

Hex Docs Total Download License

Installation

def deps do
  [
    {:flame_gigalixir_backend, "~> 0.1.0"}
  ]
end

Usage

Configure the FLAME backend

Configure the flame backend in our configuration or application setup:

  # config/prod.exs
  config :flame, :backend, FLAMEGigalixirBackend

Configure clustering

The backend relies on libcluster to communicate between the FLAME Parent and the FLAME workers.

  # config/runtime.exs
  config :libcluster,
    topologies: [
      k8s_example: [
        strategy: Cluster.Strategy.Kubernetes,
        config: [
          kubernetes_selector: System.get_env("LIBCLUSTER_KUBERNETES_SELECTOR"),
          kubernetes_node_basename: System.get_env("LIBCLUSTER_KUBERNETES_NODE_BASENAME")]]]

Be sure to start up libclustering:

  # application.ex
  def start(_type, _args) do
    topologies = Application.get_env(:libcluster, :topologies) || []

    children = [
      {Cluster.Supervisor, [topologies, [name: MyApplication.ClusterSupervisor]]},
      ...
    ]
    ...
  end