Skip to content

Commit

Permalink
Merge 929fc1f into 4a75a6e
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding authored Dec 7, 2023
2 parents 4a75a6e + 929fc1f commit 26afeea
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/docs-content/palette-cli/commands/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ The following list contains all the supported Palette CLI subcommands. Click on

* `completion` - Generate the autocompletion script for the specified shell.


* `help` - Help with any command.

* [`docs`](docs.md) - Start the Palette documentation site in your local environment for an offline experience.

* [`ec`](ec.md) - Palette Enterprise Cluster installation & pre-validation.

Expand Down
73 changes: 73 additions & 0 deletions docs/docs-content/palette-cli/commands/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
sidebar_label: "Docs"
title: "Docs"
description: "Learn how to enable the Palette documentation site in your local environment for an offline experience."
hide_table_of_contents: false
sidebar_position: 10
tags: ["palette-cli"]
---

The `docs` command starts the Palette documentation site in your local environment for an offline experience. A [container image](https://github.com/spectrocloud/librarium/pkgs/container/librarium) with the latest documentation content is downloaded and a local [Caddy](https://caddyserver.com/) server is started to serve the documentation site. You can access the Palette documentation site at `http://localhost:8080` using your browser.

:::tip

To stop the documentation site, type `Ctrl+C` in the terminal window where you started it.

:::


The `docs` command exposes the following flags.

| **Short Flag** | **Long Flag** | **Description** | **Type** |
|------------|------------------------|--------------------------------------------------------------------------|---------|
| `-d` | `--detach` | Start the container in the background and print the container ID. | boolean |
| `-h` | `--help` | Help with any command. | N/A |
| | `--host` | The address of the host to expose the container on. The default value is set to `127.0.0.1` | string |
| | `--image` | The documentation container image to use. Default value is `ghcr.io/spectrocloud/librarium:nightly`. | string |
| | `--name` | The name of the container. Default value is `spectrocloud-docs`. | string |
| | `--port` | The port to expose the container on. The default value is set to `8080`. | string |


### Examples

Start the documentation site in the background.

```bash
palette docs --detach
```

```shell hideClipboard
{"status":"Pulling from spectrocloud/librarium","id":"nightly"}
{"status":"Digest: sha256:754a75fe5b2724ad7fdd42389432fa8f81c2362880c236dabaa29ef6963b7ac6"}
{"status":"Status: Image is up to date for ghcr.io/spectrocloud/librarium:nightly"}
Started ghcr.io/spectrocloud/librarium:nightly at 127.0.0.1:8080
d7c8190bb73f4e96b5275fd0d7e1f27a06b784c881ec9437a233ac0a3a8ca979
```

Start the documentation site in the background and expose it on port `9000`.

```bash
palette docs --detach --port 9000
```

```shell {4} hideClipboard
{"status":"Pulling from spectrocloud/librarium","id":"nightly"}
{"status":"Digest: sha256:754a75fe5b2724ad7fdd42389432fa8f81c2362880c236dabaa29ef6963b7ac6"}
{"status":"Status: Image is up to date for ghcr.io/spectrocloud/librarium:nightly"}
Started ghcr.io/spectrocloud/librarium:nightly at 127.0.0.1:9000
cd9b79f7947b317c76d9517cc5c09ad6e12e7606c08ce24b497e07c7af6775c3
```

Start the documentation site in the background and change the container name.

```bash
palette docs --detach --name palette-offline
```

```shell hideClipboard
{"status":"Pulling from spectrocloud/librarium","id":"nightly"}
{"status":"Digest: sha256:754a75fe5b2724ad7fdd42389432fa8f81c2362880c236dabaa29ef6963b7ac6"}
{"status":"Status: Image is up to date for ghcr.io/spectrocloud/librarium:nightly"}
Started ghcr.io/spectrocloud/librarium:nightly at 127.0.0.1:8080
94928fc8b2dd9118fe66c72dd7e977f1075f85e234a131832f43537d91e27bc3
```
6 changes: 6 additions & 0 deletions docs/docs-content/palette-cli/commands/ec.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ The `ec` command exposes the following subcommand.

* `install` - Install a Palette Enterprise Cluster through an interactive wizard. A container runtime is required to install an EC cluster.


## Prerequisites

- Docker is required to install a PCG cluster. Refer to the [Docker](https://docs.docker.com/get-docker/) documentation to learn how to install Docker on your system.


## Install

The `install` subcommand installs a Palette Enterprise Cluster in your target environment. You can install Palette or Palette VerteX using the `install` subcommand. The `install` subcommand can be used in interactive mode, which prompts you for required values. Alternatively, you can use flags to generate a configuration file.
Expand Down
7 changes: 6 additions & 1 deletion docs/docs-content/palette-cli/commands/pcg.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ The `pcg` command exposes the following subcommand.
* `install` - Install a PCG through an interactive wizard. A container runtime is required to install a PCG cluster.


<br />

## Prerequisites

- Docker is required to install a PCG cluster. Refer to the [Docker](https://docs.docker.com/get-docker/) documentation to learn how to install Docker on your system.



## Install

Expand Down
6 changes: 3 additions & 3 deletions docs/docs-content/palette-cli/install-palette-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Use the following steps to install and set up the Palette CLI.

## Download and Setup

1. Visit the [Downloads](../spectro-downloads.md#palette-cli) page and download the Palette CLI by using the URL provided.
1. Visit the [Downloads](../spectro-downloads.md#palette-cli) page and download the Palette CLI by using the URL provided for your operating system.


2. Open up a terminal session on your local system.


3. Navigate to your default download folder. For Mac and Linux environments the default location is **~/Downloads**.
3. Navigate to your default download folder. For Linux environments the default location is **~/Downloads**.


4. Move the binary to a folder that is part of your system's `PATH` environment variable. Use the following command to move the binary to the **/usr/local/bin** folder.
Expand Down Expand Up @@ -68,7 +68,7 @@ Verify the Palette CLI is part of your system path by issuing the Palette CLI `v

Output:
```shell
Palette CLI version: 4.1.0
Palette CLI version: 4.2.0
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ keywords: ["self-hosted", "vertex"]

If you are in an environment that requires the Palette Vertex documentation to be available offline, you can use our offline Docker image to serve the documentation locally. The image is updated nightly to ensure that the latest documentation is available. When you start the container, the documentation is available at `http://localhost:8080` and you can access it using your browser.


:::tip

You can use the Palette CLI to download and start the offline documentation container with a single command. Check out the Palette CLI `docs` command [page](../../../palette-cli/commands/docs.md) for more information.

:::


### Limitations

The following limitations apply when using the offline documentation:
Expand Down

0 comments on commit 26afeea

Please sign in to comment.