Skip to content

Commit

Permalink
CLI docs (#584)
Browse files Browse the repository at this point in the history
Signed-off-by: Pete Lumbis <pete@upbound.io>
  • Loading branch information
plumbis committed Nov 1, 2023
1 parent 9fe3759 commit 4f979a9
Show file tree
Hide file tree
Showing 19 changed files with 763 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.109.0'
hugo-version: '0.119.0'
extended: true

- name: Build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/weekly-link-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.109.0'
hugo-version: '0.119.0'
extended: true

- name: Build
Expand Down
16 changes: 9 additions & 7 deletions content/contribute/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ Hugo to fail.

## Images
All images are in `/content/media`.
Crossplane supports standard [Markdown image
syntax](https://www.markdownguide.org/basic-syntax/#images-1) but using the
`img` shortcode is strongly recommended.
Crossplane supports standard
[Markdown image syntax](https://www.markdownguide.org/basic-syntax/#images-1)
but using the `img` shortcode is strongly recommended.

Images using the shortcode are automatically converted to `webp` image format,
compressed and use responsive image sizing.
Expand Down Expand Up @@ -157,8 +157,9 @@ Which generates this responsive image (change your browser size to see it change
{{<img src="/media/banner.png" alt="Crossplane Popsicle Truck" size="small" >}}

## Links
Crossplane docs support standard [Markdown
links](https://www.markdownguide.org/basic-syntax/#links) but Crossplane prefers link shortcodes
Crossplane docs support standard
[Markdown links](https://www.markdownguide.org/basic-syntax/#links)
but Crossplane prefers link shortcodes
for links between docs pages. Using shortcodes prevents incorrect link creation
and notifies which links to change after moving a page.

Expand Down Expand Up @@ -187,8 +188,9 @@ If the `ref` value points to a page that doesn't exist, Hugo fails to start.

### Linking to external sites
Minimize linking to external sites. When linking to any page outside of
`crossplane.io` use standard [markdown link
syntax](https://www.markdownguide.org/basic-syntax/#links) without using the
`crossplane.io` use standard
[markdown link syntax](https://www.markdownguide.org/basic-syntax/#links)
without using the
`ref` shortcode.

For example,
Expand Down
1 change: 0 additions & 1 deletion content/v1.14/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ title: "Overview"
weight: -1
cascade:
version: "1.14"
draft: true
---

{{< img src="/media/banner.png" alt="Crossplane Popsicle Truck" size="large" >}}
Expand Down
64 changes: 64 additions & 0 deletions content/v1.14/cli/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
weight: 400
title: Crossplane CLI
description: "Documentation for the Crossplane command-line interface"
---

The Crossplane CLI helps simplify some development and administration aspects of
Crossplane.

The Crossplane CLI includes:
* tools to build, install, update and push Crossplane Packages
* standalone Composition Function testing and rendering without the need to access a Kubernetes cluster running Crossplane
* troubleshoot Crossplane Compositions, Composite Resources and Managed Resources

## Installing the CLI

The Crossplane CLI is a single standalone binary with no external dependencies.

{{<hint "note" >}}
Install the Crossplane CLI on a user's computer.

Most Crossplane CLI commands are independent of Kubernetes and
don't require access to a Crossplane pod.
{{< /hint >}}

To download the latest version for your CPU architecture with the Crossplane
install script.

```shell
curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | sh
```

[The script](https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh)
detects your CPU architecture and downloads the latest stable release.

{{<expand "Manually install the Crossplane CLI" >}}

If you don't want to run shell script you can manually download a binary from
the Crossplane releases repository at
https://releases.crossplane.io/stable/current/bin

{{<hint "important" >}}
<!-- vale write-good.Passive = NO -->
The CLI is named `crank` in the release repository. Download this file.
<!-- vale write-good.Passive = YES -->

The `crossplane` binary is the Kubernetes Crossplane pod image.
{{< /hint >}}

Move the binary to a location in your `$PATH`, for example `/usr/local/bin`.
{{< /expand >}}

### Download other CLI versions

Download different Crossplane CLI versions or different release branches with
the `XP_CHANNEL` and `XP_VERSION` environmental variables.

By default the CLI installs from the `XP_CHANNEL` named `stable` and the
`XP_VERSION` of `current`, matching the most recent stable release.

For example, to install CLI version `v1.14.0` add `XP_VERSION=v1.14.0` to the
download script curl command:

`curl -sL "https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh" | XP_VERSION=v1.14.0 sh`
Loading

0 comments on commit 4f979a9

Please sign in to comment.