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 system packages and an app for Go #663

Merged
merged 2 commits into from
Apr 5, 2022

Conversation

alexellis
Copy link
Owner

@alexellis alexellis commented Apr 5, 2022

Description

Add system packages and an app for Go

arkade system install go --version 1.18

Motivation and Context

#654

How Has This Been Tested?

$ go build && ./arkade system install go --path /tmp/go-118
Installing Go to /tmp/go-118
Installing version: go1.18 for: amd64
Downloading from: https://go.dev/dl/go1.18.linux-amd64.tar.gz
135.14 MiB / 135.14 MiB [---------------------------------------------------------------------------] 100.00%
Downloaded to: /tmp/go1.18.linux-amd64.tar.gz
Unpacking Go to: /tmp/go-118/go
2022/04/05 09:29:41 extracted tarball into /tmp/go-118: 11753 files, 1378 dirs (2.254868602s)

export PATH=$PATH:/tmp/go-118/go/bin:$HOME/go/bin
export GOPATH=$HOME/go/
$ /tmp/go-118/go/bin/go version
go version go1.18 linux/amd64

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've updated the README

Checklist:

  • I have tested this on arm, or have added code to prevent deployment

Use: "system",
Short: "System apps",
Long: `Apps for systems.`,
Aliases: []string{"v"},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why v?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I copied from the venafi app so we can change that to s

Comment on lines +15 to +19
func UntarNested(r io.Reader, dir string) error {
return untarNested(r, dir)
}

func untarNested(r io.Reader, dir string) (err error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we move this functions under pkg/archive/untar.go?
I think it makes much more sense.

Copy link
Owner Author

Choose a reason for hiding this comment

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

No I don't see any reason to have one file for this.

command.RunE = func(cmd *cobra.Command, args []string) error {
installPath, _ := cmd.Flags().GetString("path")
version, _ := cmd.Flags().GetString("version")
fmt.Printf("Installing Go to %s\n", installPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we introduce --quiet flag as we did earlier for binary downloads?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm going to keep things verbose for the preview stages, to make it simpler / less work for everyone.

Then we can come back and fine tune.

Part of #654, tested on an Intel x86_64 machine.

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis alexellis force-pushed the openfaasltd/add-system-package-go branch from 2ee281b to 5a2392e Compare April 5, 2022 12:13
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
@alexellis alexellis merged commit da44ab1 into master Apr 5, 2022
@alexellis alexellis deleted the openfaasltd/add-system-package-go branch April 5, 2022 12:15
@alexellis
Copy link
Owner Author

@Shikachuu do you want to have a go at the containerd recipe and prometheus next?

@richardcase volunteered to take the firecracker CLI

I didn't use a Go template in this Go app, but if we need it we can bring that back in for the additional apps we're working with.

@Shikachuu
Copy link
Contributor

@alexellis sure I'll play around with containerd!

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