chainguard-dev / edu

Educational Resources for Software Supply Chain Security
https://edu.chainguard.dev
Other
74 stars 64 forks source link

Update chainctl install instructions #865

Closed eddiezane closed 1 year ago

eddiezane commented 1 year ago

We had a user report that the install instructions for chainctl:

curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"

Was resolving to https://dl.enforce.dev/chainctl/latest/chainctl_linux_aarch64 on their Apple M* laptop running in a vscode dev container. The linux bit is fine since it's running a VM but the aarch64 is inconsistent with what we publish for download:

For all intents and purposes, aarch64 is equivalent to arm64. It is unclear why some Macs will resolve to one or the other.

We could change this to a simple sed transform:

curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/aarch64/arm64/')"

We should update this in our docs as well as our blogs.

 chainguard/edu[main ☀ ] ack "https://dl.enforce.dev"
content/ui/install.md
12:curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"

content/chainguard/chainguard-enforce/installation/alternative-installation-methods.md
137:curl -s 'https://dl.enforce.dev/{mcp,tenant}.yaml' > enforce-agent.yaml

content/chainguard/chainguard-enforce/chainguard-enforce-user-onboarding.md
64:curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"

content/chainguard/chainguard-enforce/how-to-install-chainctl.md
63:curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"
109:   --signature "https://dl.enforce.dev/chainctl/$(chainctl version 2>&1 |awk '/GitVersion/ {print $2}')/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m).sig" \
110:   --certificate "https://dl.enforce.dev/chainctl/$(chainctl version 2>&1 |awk '/GitVersion/ {print $2}')/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m).cert.pem" \

content/chainguard/chainguard-enforce/iam-groups/identity-examples/enforce-buildkite-identity.md
333:    curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"
358:    - 'curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"'

content/chainguard/chainguard-enforce/iam-groups/identity-examples/enforce-bitbucket-identity.md
336:          - curl -o chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m)"

content/chainguard/chainguard-enforce/iam-groups/identity-examples/enforce-jenkins-identity/index.md
339:                        wget -O chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_linux_\$(uname -m)"
356:    wget -O chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_linux_\$(uname -m)"

content/chainguard/chainguard-enforce/iam-groups/identity-examples/enforce-gitlab-identity.md
343:    wget -O chainctl "https://dl.enforce.dev/chainctl/latest/chainctl_linux_$(uname -m)"

@orourkes18 do you have an easy way to search across our blogs for this?

jdolitsky commented 1 year ago

was this on a user's mac or on linux? I understood it to be a linux machine that had the issue

eddiezane commented 1 year ago

User's mac running in a Docker container, so mac hardware, linux vm

orourkes18 commented 1 year ago

I would have to search for this manually for blogs... are we looking for any blogs that include chainctl install links/guidance? Or is it more specific/narrow than that?

I'd just need a doc with the specific code blocks we need to change for the install directions.

On Mon, Jul 24, 2023 at 10:41 AM Eddie Zaneski @.***> wrote:

User's mac running in a Docker container, so mac hardware, linux vm

— Reply to this email directly, view it on GitHub https://github.com/chainguard-dev/edu/issues/865#issuecomment-1648335006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZ5ZJKXUSREDG5GMYITRHBTXR2XTFANCNFSM6AAAAAA2V5EWOY . You are receiving this because you were mentioned.Message ID: @.***>

eddiezane commented 1 year ago

Ack thank you Sarah!

We should only need to update inline code - we might just be able to search the blog for mentions of https://dl.enforce.dev and narrow it down that way. I can get you the doc when the change is decided!

SharpRake commented 1 year ago

@eddiezane thanks for putting all this info together!

Of tutorials you list I think we can skip updating any of the docs under /identity-examples/ - those are examples that involve installing chainctl with Terraform and until we hear folks complain about them I'd rather not open that can of worms. Similarly, Installing the Chainguard Enforce Agent is on this list but the command in question doesn't come up there at all so I'm not sure anything there needs to be updated.

I'm going to try testing the command out a bit this afternoon and unless I find any quirks I'll update the remaining docs.