-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the control-node wiki!
Assumptions
- Elixir release tar.gz file is available
A registry will allow users to upload an archive as a new release. This archive can then later be used to deploy the version.
In the first iteration support only local registry i.e. an archive is directly uploaded to control node which then stores it locally onto the filesystem.
%ControlNode.Registry.Local{
path: "/path/to/local/archive/folder"
}
Host is a machine where the release is deployed.
SSH is used to upload the release to the host
%ControlNode.Host.SSH{
host: "host-vm",
user: "username"
}
Application configuration defines the deployment configuration for the releases of a given application.
%ControlNode.ApplicationSpec{
name: :my_production_app,
registry: %ControlNode.Registry.Local{},
boot_strategy: :restart,
}
rollout_strategy
: Directs how to deploy the release and remove the existing nodes.
-
:incremental_replace
will deploy the release using theboot_strategy
one-by-one to existing nodes.
boot_strategy
: defines how the service is to be upgraded to the new version.
A logical unit which contains an application deployment definition for the given Namespace. It mainly defines the hosts where the application should be deployed to and the environment variables.
%ControlNode.NamespaceSpec{
tag: :staging,
host_path_prefix: "/opt/some/path",
hosts: [%ControlNode.Host.SSH{}],
release_type: :incremental_replace,
release_trigger: :manual,
environment: "TODO",
application_spec: %ControlNode.ApplicationSpec{},
}
deployment_trigger :: :manual | :new_release
Checks
It is essential to ensure that there is only 1 release config for an application per namespace
TODO
API
@type tar_file :: binary
@spec upload_release(%DeploymentConfig{}, host, tar_file) :: :ok | {:error, term()}