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

add caddy server as system install #1070

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nitishkumar71
Copy link
Contributor

Description

Motivation and Context

How Has This Been Tested?

Executed the command arkade system install caddy produced below output

Installing Caddy Server to /usr/local/bin
Installing version: v2.7.6 for: amd64
Downloading from: https://github.com/caddyserver/caddy/releases/download/v2.7.6/caddy_2.7.6_linux_amd64.tar.gz
13.98 MiB / 13.98 MiB [--------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00%
Downloaded to: /tmp/arkade-345065249/caddy_2.7.6_linux_amd64.tar.gz
Unpacking Caddy to: /usr/local/bin/caddy

If updating or adding a new CLI to arkade get, run:

go build && ./hack/test-tool.sh TOOL_NAME

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Documentation

  • I have updated the list of tools in README.md if (required) with ./arkade get --format markdown
  • I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have tested this on arm, or have added code to prevent deployment

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
}

command.Flags().StringP("version", "v", "", "The version or leave blank to determine the latest available version")
command.Flags().String("path", "/usr/local/bin", "Installation path, where a caddy subfolder will be created")
Copy link
Owner

Choose a reason for hiding this comment

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

It's not the usual pattern, but Caddy installs to /usr/bin/

Have a look at the faasd script to see what else may be missing, including adding users etc.

For adding users, we will need to detect the OS from /etc/os-release and reject the command if it's not debian or ubuntu.

In the future, if someone needs this for Alpine or Fedora, they can add a patch to run useradd with the correct syntax for their distro.

There are also some directories created and chmod is run.

Copy link
Owner

@alexellis alexellis left a comment

Choose a reason for hiding this comment

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

Good start, but there's more needed for a system install to match how Caddy is installed with faasd: https://github.com/openfaas/faasd/blob/master/hack/install.sh

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.

Add Caddy Server as System install
2 participants