refactor: remove SDKs to start agent faster
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter 2023-06-16 06:37:57 +00:00
parent c59097d374
commit 0fe7a1ebba
2 changed files with 2 additions and 68 deletions

View file

@ -17,6 +17,7 @@ packages:
- bat - bat
- fzf - fzf
- dnf-plugins-core - dnf-plugins-core
- icu
%{ if install_podman_setup ~} %{ if install_podman_setup ~}
- podman - podman
- podman-docker - podman-docker
@ -24,13 +25,6 @@ packages:
- skopeo - skopeo
- buildah - buildah
%{ endif ~} %{ endif ~}
%{ if install_go_setup ~}
- golang
%{ endif ~}
%{ if install_dotnet_setup ~}
- dotnet-sdk-6.0
- dotnet-sdk-7.0
%{ endif ~}
mounts: mounts:
- [ - [
"${volume_path}", "${volume_path}",
@ -82,11 +76,7 @@ write_files:
runcmd: runcmd:
- chown -R ${username}:${username} /home/${username} - chown -R ${username}:${username} /home/${username}
- systemctl enable --now coder-agent - systemctl enable --now coder-agent
%{ if install_terraform_setup ~} %{ if install_podman_setup ~}
- dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
- dnf -y install terraform
%{ endif ~}
%{ if install_dotnet_setup ~}
- loginctl enable-linger ${username} - loginctl enable-linger ${username}
- mkdir -p /home/${username}/.config/systemd/user/sockets.target.wants - mkdir -p /home/${username}/.config/systemd/user/sockets.target.wants
- ln -sf /usr/lib/systemd/system/podman.socket /home/${username}/.config/systemd/user/sockets.target.wants/ - ln -sf /usr/lib/systemd/system/podman.socket /home/${username}/.config/systemd/user/sockets.target.wants/

View file

@ -195,41 +195,6 @@ data "coder_parameter" "code_server" {
} }
} }
data "coder_parameter" "install_go" {
name = "install_go"
description = "Should Go SDK be installed?"
default = "true"
type = "string"
mutable = true
option {
name = "Install"
value = "true"
}
option {
name = "Don't install"
value = "false"
}
}
data "coder_parameter" "install_dotnet" {
name = "install_dotnet"
description = "Should .NET SDK be installed?"
default = "true"
type = "string"
mutable = true
option {
name = "Install"
value = "true"
}
option {
name = "Don't install"
value = "false"
}
}
data "coder_parameter" "install_podman" { data "coder_parameter" "install_podman" {
name = "install_podman" name = "install_podman"
description = "Should Podman be installed?" description = "Should Podman be installed?"
@ -247,24 +212,6 @@ data "coder_parameter" "install_podman" {
} }
} }
data "coder_parameter" "install_terraform" {
name = "install_terraform"
description = "Should Terraform be installed?"
default = "true"
type = "string"
mutable = true
option {
name = "Install"
value = "true"
}
option {
name = "Don't install"
value = "false"
}
}
data "coder_workspace" "me" { data "coder_workspace" "me" {
} }
@ -314,10 +261,7 @@ resource "hcloud_server" "root" {
init_script = base64encode(coder_agent.dev.init_script) init_script = base64encode(coder_agent.dev.init_script)
coder_agent_token = coder_agent.dev.token coder_agent_token = coder_agent.dev.token
code_server_setup = data.coder_parameter.code_server.value code_server_setup = data.coder_parameter.code_server.value
install_go_setup = data.coder_parameter.install_go.value
install_dotnet_setup = data.coder_parameter.install_dotnet.value
install_podman_setup = data.coder_parameter.install_podman.value install_podman_setup = data.coder_parameter.install_podman.value
install_terraform_setup = data.coder_parameter.install_terraform.value
user_shell = data.coder_parameter.user_shell.value user_shell = data.coder_parameter.user_shell.value
}) })