Skip to content
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

feat: project builder #531

Merged
merged 53 commits into from
Jun 3, 2024
Merged

feat: project builder #531

merged 53 commits into from
Jun 3, 2024

Conversation

vedranjukic
Copy link
Member

@vedranjukic vedranjukic commented May 11, 2024

Project builder

Description

This pull request introduces the Project Image Builder feature. The builder creates a workspace project container image based on the project development environment configuration.

The advanced project configuration form is changed to support the builder options.
The builder configuration supports Auto, Devcontainer, or None modes with Auto as a default mode.
The Devcontainer mode supports setting a Devconatiner file path.

Container images from completed builds are stored in the local container registry that is now a part of the Daytona server.
The local registry will be replaceable with the custom container registry in the upcoming releases.

  • This change requires a documentation update
  • I have made corresponding changes to the documentation

Screenshots

Screenshot 2024-05-12 at 00 32 00 Screenshot 2024-05-12 at 00 32 09 Screenshot 2024-05-12 at 00 33 54

Notes

Git context package is needed to enable rebuilds from the last built commit. Atm every new commit will cause a rebuild from scratch.

Minor refactors regarding config and constructors outside the builder context.

Breaking Change

User should run daytona server configure and edit the Build Registry Port to 3988. After the change was made, users need to restart the server.

@vedranjukic vedranjukic requested review from a team as code owners May 11, 2024 22:37
@vedranjukic vedranjukic linked an issue May 11, 2024 that may be closed by this pull request
@vedranjukic vedranjukic force-pushed the 363-project-image-builder branch 2 times, most recently from 12a32a0 to 844073d Compare May 12, 2024 20:43
@vedranjukic vedranjukic marked this pull request as draft May 13, 2024 08:08
@vedranjukic vedranjukic force-pushed the 363-project-image-builder branch 2 times, most recently from bb95b5f to 309d37a Compare May 13, 2024 12:03
Copy link
Member

@Tpuljak Tpuljak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to configure multi-platform builds to support arm and amd architectures.

@vedranjukic vedranjukic mentioned this pull request May 15, 2024
@vedranjukic vedranjukic force-pushed the 363-project-image-builder branch 4 times, most recently from 0d73e53 to fad5e4b Compare May 21, 2024 15:03
@vedranjukic
Copy link
Member Author

We need to configure multi-platform builds to support arm and amd architectures.

Multi-platform builds are out of scope for this PR. But we'll need to implement them.

@vedranjukic vedranjukic marked this pull request as ready for review May 21, 2024 15:43
hack/builder_image/Dockerfile Outdated Show resolved Hide resolved
pkg/builder/builder.go Outdated Show resolved Hide resolved
pkg/builder/builder.go Outdated Show resolved Hide resolved
pkg/builder/builder.go Outdated Show resolved Hide resolved
pkg/server/workspaces/create.go Outdated Show resolved Hide resolved
pkg/views/workspace/create/configuration.go Show resolved Hide resolved
pkg/workspace/project.go Outdated Show resolved Hide resolved
pkg/workspace/project.go Outdated Show resolved Hide resolved
pkg/workspace/project.go Show resolved Hide resolved
@Tpuljak
Copy link
Member

Tpuljak commented May 22, 2024

Screenshot 2024-05-22 at 10 19 21

We should parse push progress events similar to how we parse pull progress events.

@Tpuljak
Copy link
Member

Tpuljak commented May 22, 2024

When running daytona create REPO_URL the builder is skipped (set to none) when it should be set to auto.

We should move this

	projectList = append(projectList, apiclient.CreateWorkspaceRequestProject{
		Name: *providerRepo.Name,
		Source: &apiclient.CreateWorkspaceRequestProjectSource{
			Repository: providerRepo,
		},
		Build: &apiclient.ProjectBuild{},
	})

From GetCreationDataFromPrompt to the cmd itself and run it after we process the workspace (via prompt or via cmd arguments).

pkg/cmd/server/serve.go Outdated Show resolved Hide resolved
pkg/server/registry/service.go Outdated Show resolved Hide resolved
@vedranjukic vedranjukic force-pushed the 363-project-image-builder branch 2 times, most recently from 757a1ce to 01ac2e7 Compare May 23, 2024 13:27
@Tpuljak Tpuljak force-pushed the 363-project-image-builder branch 2 times, most recently from 597cf3d to e397d63 Compare May 23, 2024 14:25
vedranjukic and others added 25 commits June 3, 2024 09:51
Signed-off-by: Vedran <vedran.jukic@gmail.com>
Signed-off-by: Vedran <vedran.jukic@gmail.com>
Signed-off-by: Vedran <vedran.jukic@gmail.com>
Signed-off-by: Vedran <vedran.jukic@gmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
@Tpuljak Tpuljak force-pushed the 363-project-image-builder branch from 67e6647 to defa4ed Compare June 3, 2024 09:52
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
@vedranjukic vedranjukic merged commit ada9000 into main Jun 3, 2024
12 checks passed
@vedranjukic vedranjukic deleted the 363-project-image-builder branch June 3, 2024 13:17
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 this pull request may close these issues.

Project image builder
3 participants