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

fix installing code-server on manjaro image #5834

Merged
merged 2 commits into from
Dec 5, 2022
Merged

Conversation

MrPeacockNLB
Copy link
Contributor

@MrPeacockNLB MrPeacockNLB commented Dec 3, 2022

Description

This patch fixes installation on coder.com on a kubernetes installation. Without the --noconfirm the install.sh script warns about that the package has not been installed. With this parameter set the installation succeed.

This is log message which suddly gets truncated

image

If I download install.sh via wget and run it with:

cat install.sh | sh | tee code-server-install.log

image

The warning was caused while there is no confirmation.

Patch

Steps to confirm patch is working:

  • Spawn a manjaro based image up (without install.sh in template)
  • wget current version of this script
  • append parameter --noconfirm
  • cat install.sh | sh | tee code-server-install.log
  • now pacman installs the code-server package and no warning is printed out

Notes

My template uses the same installation as in coder examples.

resource "coder_agent" "main" {
  os             = "linux"
  arch           = "amd64"
  startup_script = <<EOT
    #!/bin/bash
    # home folder can be empty, so copying default bash settings
    if [ ! -f ~/.profile ]; then
      cp /etc/skel/.profile $HOME
    fi
    if [ ! -f ~/.bashrc ]; then
      cp /etc/skel/.bashrc $HOME
    fi
    # install and start code-server
    curl -fsSL https://code-server.dev/install.sh | sh  | tee code-server-install.log
    code-server --auth none --port 13337 | tee code-server-install.log &
  EOT
}

Before I had test with this installation method with an ubuntu based image and everything works fine.

@MrPeacockNLB MrPeacockNLB requested a review from a team as a code owner December 3, 2022 17:20
@jsjoeio jsjoeio self-assigned this Dec 5, 2022
@jsjoeio jsjoeio added this to the December 2022 milestone Dec 5, 2022
Copy link
Contributor

@jsjoeio jsjoeio left a comment

Choose a reason for hiding this comment

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

Wow, really appreciate the thorough PR description and the notes on how to test this. Thank you so much 🎉

@jsjoeio jsjoeio enabled auto-merge (squash) December 5, 2022 16:58
@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 5, 2022

CI failing is unrelated to your PR. I have a fix in #5772

@jsjoeio jsjoeio disabled auto-merge December 5, 2022 22:43
@jsjoeio jsjoeio merged commit f43082e into coder:main Dec 5, 2022
@jsjoeio jsjoeio modified the milestones: December 2022, 4.9.0 Dec 5, 2022
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.

2 participants