Skip to content

refactor: Provisioner handles unpacking template to file system, not daemon #9165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spikecurtis opened this issue Aug 18, 2023 · 2 comments · Fixed by #9264
Closed

refactor: Provisioner handles unpacking template to file system, not daemon #9165

spikecurtis opened this issue Aug 18, 2023 · 2 comments · Fixed by #9264
Assignees

Comments

@spikecurtis
Copy link
Contributor

We want to split provisioner daemon and provisioners so they can run on separate workloads. Right now provisioner daemon unpacks the template and sends the directory path to provisioner, but that can't work if they're separate.

We need to refactor so that the provisioner daemon sends the template archive to the provisioner, and the provisioner unpacks it.

@spikecurtis spikecurtis self-assigned this Aug 18, 2023
@Emyrk
Copy link
Member

Emyrk commented Aug 18, 2023

For those who might not know...

What is the difference between the Provisioner and the Provisioner Daemon?

EDIT: I saw the RFC. I believe in the current implementation the Provisioner lives inside the Provisioner Daemon. The Provisioner Daemon has an internal memory queue for dispatching jobs. However the future goal is to split these.

Then you could have the actual Provision step be a different Job system, such as a Kubernetes Job, or a Lamda action, etc. So the daemon dispatches the jobs to the external job handling system (some cloud job queue thing likely)

@spikecurtis
Copy link
Contributor Author

What is the difference between the Provisioner and the Provisioner Daemon?

The Provisioner is the thing that actually executes code to provision workspaces, and it comes in different types. Right now we have Echo and Terraform. Echo is just for testing, but Terraform Provisioner is the thing that actually shells out to terraform.

The Provisioner Daemon is responsible for communicating with Coderd: acquiring, updating, and completing jobs, and then calling into the appropriate Provisioner to do the work. Right now the Daemon also unpacks the template archive, but the goal of this issue is to refactor so the Provisioner unpacks the template archive.

I believe in the current implementation the Provisioner lives inside the Provisioner Daemon. The Provisioner Daemon has an internal memory queue for dispatching jobs. However the future goal is to split these.

Then you could have the actual Provision step be a different Job system, such as a Kubernetes Job, or a Lamda action, etc. So the daemon dispatches the jobs to the external job handling system (some cloud job queue thing likely)

Yes, that's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants