Skip to content

consider non-binary deployment use case #22

Description

@wey-gu

Now, the agent calls the service script with bash with the assumptions that the agent is running together with the service:

  1. with same hostname
  2. sharing same filesystem, home path & service was started with scripts/nebula.service stop

func (d *ServiceDaemon) Stop() error {
cmdStr := fmt.Sprintf("cd %s && scripts/nebula.service stop %s", d.s.dir, d.s.name)
log.WithField("cmd", cmdStr).Debug("Try to stop service...")
cmd := exec.Command("bash", "-c", cmdStr)
err := cmd.Run()
if err != nil {

For 1. it's do able like a sidecar design in both docker and k8s:

https://github.com/wey-gu/nebula-up/blob/9bd28601f9cb156d77009c724f09164b02f07393/backup_restore/docker-compose.yaml#L54-L59

While for 2. it's really hard to mitigate, introducing hooks to make this work is too hacky.

We need to revisit the design to enable service stop/start w/o assuming leveraging scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementType: make the code neat or more efficient

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions