diff --git a/docs/intro.md b/docs/intro.md index 0084f6fb24..40a7e0c5ba 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -43,6 +43,9 @@ hide_table_of_contents: true
Onboarding workflows, tutorials, and labs to help you get started with Replicated quickly.
The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The name
and chartVersion
listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. The optionalValues
field sets the specified Helm values when a given conditional statement evaluates to true. In this case, if the application is installed with Embedded Cluster, then the Gitea service type is set to `NodePort` and the node port is set to `"32000"`. This will allow Gitea to be accessed from the local machine after deployment for the purpose of this quick start.
The HelmChart custom resource provides instructions to the installer about how to deploy the Helm chart. The name
and chartVersion
listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. This HelmChart resource includes several `values` and conditional `optionalValues` that are supplied to `helm template` during deployment.
The KOTS Application custom resource enables features in the Replicated Admin Console such as branding, release notes, application status indicators, and custom graphs.
The YAML below provides a name for the application to display in the Admin Console, adds a custom status informer that displays the status of the gitea
Deployment resource in the Admin Console dashboard, adds a custom application icon, and adds the port where the Gitea service can be accessed so that the user can open the application after installation.
The Replicated Application custom resource enables features in the Replicated Admin Console UI, which is used to configure, install, update, and manage applications. This Application resource provides a name for the application to display in the Admin Console, adds custom status informers that are used to display the status of the deployment in the Admin Console dashboard, and adds a custom application icon.
The Kubernetes SIG Application custom resource supports functionality such as including buttons and links on the Replicated Admin Console dashboard. The YAML below adds an Open App button to the Admin Console dashboard that opens the application using the service port defined in the KOTS Application custom resource.
+The Kubernetes SIG Application custom resource supports functionality such as including buttons and links on the Admin Console dashboard. This SIG Application resource adds an Open SlackerNews button that opens the application.
The Config custom resource defines the application configuration fields that are exposed to the user in the Admin Console. These fields can then be mapped to the `values.yaml` file for the Helm chart. This Config resource includes several fields, but you will only use a few of them when installing SlackerNews for the purpose of this tutorial.
+This is text from a user config value: '{{repl ConfigOption "example_default_value"}}'
-This is more text from a user config value: '{{repl ConfigOption "more_text"}}'
-This is a hidden value: '{{repl ConfigOption "hidden_text"}}'
- - ``` - This creates a reference to the `more_text` field using a Replicated KOTS template function. The ConfigOption template function renders the user input from the configuration item that you specify. For more information, see [Config Context](/reference/template-functions-config-context) in _Reference_. - -1. Save the changes to both YAML files. - -1. Change to the root `replicated-cli-tutorial` directory, then run the following command to verify that there are no errors in the YAML: - - ``` - replicated release lint --yaml-dir=manifests - ``` - -1. Create a new release and promote it to the Unstable channel: - - ``` - replicated release create --auto - ``` - - **Example output**: - - ``` - • Reading manifests from ./manifests ✓ - • Creating Release ✓ - • SEQUENCE: 2 - • Promoting ✓ - • Channel 2GxpUm7lyB2g0ramqUXqjpLHzK0 successfully set to release 2 - ``` - -1. Type `y` and press **Enter** to continue with the defaults. - - **Example output**: - - ``` - RULE TYPE FILENAME LINE MESSAGE - - • Reading manifests from ./manifests ✓ - • Creating Release ✓ - • SEQUENCE: 2 - • Promoting ✓ - • Channel 2GmYFUFzj8JOSLYw0jAKKJKFua8 successfully set to release 2 - ``` - - The release is created and promoted to the Unstable channel with `SEQUENCE: 2`. - -1. Verify that the release was promoted to the Unstable channel: - - ``` - replicated release ls - ``` - **Example output**: - - ``` - SEQUENCE CREATED EDITED ACTIVE_CHANNELS - 2 2022-11-03T19:16:24Z 0001-01-01T00:00:00Z Unstable - 1 2022-11-03T18:49:13Z 0001-01-01T00:00:00Z - ``` - -## Next Step - -Continue to [Step 9: Update the Application](tutorial-cli-update-app) to return to the Admin Console and update the application to the new version that you promoted. diff --git a/docs/vendor/tutorial-cli-create-release.mdx b/docs/vendor/tutorial-cli-create-release.mdx deleted file mode 100644 index 142db61b77..0000000000 --- a/docs/vendor/tutorial-cli-create-release.mdx +++ /dev/null @@ -1,85 +0,0 @@ -# Step 4: Create a Release - -Now that you have the manifest files for the sample Kubernetes application, you can create a release for the `cli-tutorial` application and promote the release to the Unstable channel. - -By default, the Vendor Portal includes Unstable, Beta, and Stable release channels. The Unstable channel is intended for software vendors to use for internal testing, before promoting a release to the Beta or Stable channels for distribution to customers. For more information about channels, see [About Channels and Releases](releases-about). - -To create and promote a release to the Unstable channel: - -1. From the `replicated-cli-tutorial` directory, lint the application manifest files and ensure that there are no errors in the YAML: - - ``` - replicated release lint --yaml-dir=manifests - ``` - - If there are no errors, an empty list is displayed with a zero exit code: - - ```text - RULE TYPE FILENAME LINE MESSAGE - ``` - - For a complete list of the possible error, warning, and informational messages that can appear in the output of the `release lint` command, see [Linter Rules](/reference/linter). - -1. Initialize the project as a Git repository: - - ``` - git init - git add . - git commit -m "Initial Commit: CLI Tutorial" - ``` - - Initializing the project as a Git repository allows you to track your history. The Replicated CLI also reads Git metadata to help with the generation of release metadata, such as version labels. - -1. From the `replicated-cli-tutorial` directory, create a release with the default settings: - - ``` - replicated release create --auto - ``` - - The `--auto` flag generates release notes and metadata based on the Git status. - - **Example output:** - - ``` - • Reading Environment ✓ - - Prepared to create release with defaults: - - yaml-dir "./manifests" - promote "Unstable" - version "Unstable-ba710e5" - release-notes "CLI release of master triggered by exampleusername [SHA: d4173a4] [31 Oct 22 08:51 MDT]" - ensure-channel true - lint-release true - - Create with these properties? [Y/n] - ``` - -1. Type `y` and press **Enter** to confirm the prompt. - - **Example output:** - - ```text - • Reading manifests from ./manifests ✓ - • Creating Release ✓ - • SEQUENCE: 1 - • Promoting ✓ - • Channel VEr0nhJBBUdaWpPvOIK-SOryKZEwa3Mg successfully set to release 1 - ``` - The release is created and promoted to the Unstable channel. - -1. Verify that the release was promoted to the Unstable channel: - - ``` - replicated release ls - ``` - **Example output:** - - ```text - SEQUENCE CREATED EDITED ACTIVE_CHANNELS - 1 2022-10-31T14:55:35Z 0001-01-01T00:00:00Z Unstable - ``` - -## Next Step - -Continue to [Step 5: Create a Customer](tutorial-cli-create-customer) to create a customer license file that you will upload when installing the application. diff --git a/docs/vendor/tutorial-cli-deploy-app.mdx b/docs/vendor/tutorial-cli-deploy-app.mdx deleted file mode 100644 index 14fbb7d146..0000000000 --- a/docs/vendor/tutorial-cli-deploy-app.mdx +++ /dev/null @@ -1,47 +0,0 @@ -# Step 7: Configure the Application - -After you install KOTS, you can log in to the KOTS Admin Console. This procedure shows you how to make a configuration change for the application from the Admin Console, which is a typical task performed by end users. - -To configure the application: - -1. Access the Admin Console using `https://localhost:8800` if the installation script is still running. Otherwise, run the following command to access the Admin Console: - - ```bash - kubectl kots admin-console --namespace NAMESPACE - ``` - - Replace `NAMESPACE` with the namespace where KOTS is installed. - -1. Enter the password that you created in [Step 6: Install KOTS and the Application](tutorial-cli-install-app-manager) to log in to the Admin Console. - - The Admin Console dashboard opens. On the Admin Console **Dashboard** tab, users can take various actions, including viewing the application status, opening the application, checking for application updates, syncing their license, and setting up application monitoring on the cluster with Prometheus. - -  - -1. On the **Config** tab, select the **Customize Text Inputs** checkbox. In the **Text Example** field, enter any text. For example, `Hello`. - -  - - This page displays configuration settings that are specific to the application. Software vendors define the fields that are displayed on this page in the KOTS Config custom resource. For more information, see [Config](/reference/custom-resource-config) in _Reference_. - -1. Click **Save config**. In the dialog that opens, click **Go to updated version**. - - The **Version history** tab opens. - -1. Click **Deploy** for the new version. Then click **Yes, deploy** in the confirmation dialog. - -  - -1. Click **Open App** to view the application in your browser. - -  - - Notice the text that you entered previously on the configuration page is displayed on the screen. - - :::note - If you do not see the new text, refresh your browser. - ::: - -## Next Step - -Continue to [Step 8: Create a New Version](tutorial-cli-create-new-version) to make a change to one of the manifest files for the `cli-tutorial` application, then use the Replicated CLI to create and promote a new release. diff --git a/docs/vendor/tutorial-cli-install-app-manager.mdx b/docs/vendor/tutorial-cli-install-app-manager.mdx deleted file mode 100644 index 2838c93385..0000000000 --- a/docs/vendor/tutorial-cli-install-app-manager.mdx +++ /dev/null @@ -1,101 +0,0 @@ -# Step 6: Install KOTS and the Application - -The next step is to test the installation process for the application release that you promoted. Using the KOTS CLI, you will install KOTS and the sample application in your cluster. - -KOTS is the Replicated component that allows your users to install, manage, and upgrade your application. Users can interact with KOTS through the Admin Console or through the KOTS CLI. - -To install KOTS and the application: - -1. From the `replicated-cli-tutorial` directory, run the following command to get the installation commands for the Unstable channel, where you promoted the release for the `cli-tutorial` application: - - ``` - replicated channel inspect Unstable - ``` - - **Example output:** - - ``` - ID: 2GmYFUFzj8JOSLYw0jAKKJKFua8 - NAME: Unstable - DESCRIPTION: - RELEASE: 1 - VERSION: Unstable-d4173a4 - EXISTING: - - curl -fsSL https://kots.io/install | bash - kubectl kots install cli-tutorial/unstable - - EMBEDDED: - - curl -fsSL https://k8s.kurl.sh/cli-tutorial-unstable | sudo bash - - AIRGAP: - - curl -fSL -o cli-tutorial-unstable.tar.gz https://k8s.kurl.sh/bundle/cli-tutorial-unstable.tar.gz - # ... scp or sneakernet cli-tutorial-unstable.tar.gz to airgapped machine, then - tar xvf cli-tutorial-unstable.tar.gz - sudo bash ./install.sh airgap - ``` - This command prints information about the channel, including the commands for installing in: - * An existing cluster - * An _embedded cluster_ created by Replicated kURL - * An air gap cluster that is not connected to the internet - -1. If you have not already, configure kubectl access to the cluster you provisioned as part of [Set Up the Environment](tutorial-cli-setup#set-up-the-environment). For more information about setting the context for kubectl, see [Command line tool (kubectl)](https://kubernetes.io/docs/reference/kubectl/) in the Kubernetes documentation. - -1. Run the `EXISTING` installation script with the following flags to automatically upload the license file and run the preflight checks at the same time you run the installation. - - **Example:** - - ``` - curl -fsSL https://kots.io/install | bash - kubectl kots install cli-tutorial/unstable \ - --license-file ./LICENSE_YAML \ - --shared-password PASSWORD \ - --namespace NAMESPACE - ``` - - Replace: - - - `LICENSE_YAML` with the local path to your license file. - - `PASSWORD` with a password to access the Admin Console. - - `NAMESPACE` with the namespace where KOTS and application will be installed. - - When the Admin Console is ready, the script prints the `https://localhost:8800` URL where you can access the Admin Console and the `http://localhost:8888` URL where you can access the application. - - **Example output**: - - ``` - • Deploying Admin Console - • Creating namespace ✓ - • Waiting for datastore to be ready ✓ - • Waiting for Admin Console to be ready ✓ - • Waiting for installation to complete ✓ - • Waiting for preflight checks to complete ✓ - - • Press Ctrl+C to exit - • Go to http://localhost:8800 to access the Admin Console - - • Go to http://localhost:8888 to access the application - ``` - -1. Verify that the Pods are running for the example NGNIX service and for kotsadm: - - ```bash - kubectl get pods --namespace NAMESPACE - ``` - - Replace `NAMESPACE` with the namespace where KOTS and application was installed. - - **Example output:** - - ```NAME READY STATUS RESTARTS AGE - kotsadm-7ccc8586b8-n7vf6 1/1 Running 0 12m - kotsadm-minio-0 1/1 Running 0 17m - kotsadm-rqlite-0 1/1 Running 0 17m - nginx-688f4b5d44-8s5v7 1/1 Running 0 11m - ``` - -## Next Step - -Continue to [Step 7: Configure the Application](tutorial-cli-deploy-app) to log in to the Admin Console and make configuration changes. diff --git a/docs/vendor/tutorial-cli-install-cli.mdx b/docs/vendor/tutorial-cli-install-cli.mdx deleted file mode 100644 index 1eb0f60aea..0000000000 --- a/docs/vendor/tutorial-cli-install-cli.mdx +++ /dev/null @@ -1,80 +0,0 @@ -# Step 1: Install the Replicated CLI - -In this tutorial, you use the Replicated CLI to create and promote releases for a sample application with Replicated. The Replicated CLI is the CLI for the Replicated Vendor Portal. - -This procedure describes how to create a Vendor Portal account, install the Replicated CLI on your local machine, and set up a `REPLICATED_API_TOKEN` environment variable for authentication. - -To install the Replicated CLI: - -1. Do one of the following to create an account in the Replicated Vendor Portal: - * **Join an existing team**: If you have an existing Vendor Portal team, you can ask your team administrator to send you an invitation to join. - * **Start a trial**: Alternatively, go to [vendor.replicated.com](https://vendor.replicated.com/) and click **Sign up** to create a 21-day trial account for completing this tutorial. - -1. Run the following command to use [Homebrew](https://brew.sh) to install the CLI: - - ``` - brew install replicatedhq/replicated/cli - ``` - - For the latest Linux or macOS versions of the Replicated CLI, see the [replicatedhq/replicated](https://github.com/replicatedhq/replicated/releases) releases in GitHub. - -1. Verify the installation: - - ``` - replicated version - ``` - **Example output**: - - ```json - { - "version": "0.37.2", - "git": "8664ac3", - "buildTime": "2021-08-24T17:05:26Z", - "go": { - "version": "go1.14.15", - "compiler": "gc", - "os": "darwin", - "arch": "amd64" - } - } - ``` - If you run a Replicated CLI command, such as `replicated release ls`, you see the following error message about a missing API token: - - ``` - Error: set up APIs: Please provide your API token - ``` - -1. Create an API token for the Replicated CLI: - - 1. Log in to the Vendor Portal, and go to the [Account settings](https://vendor.replicated.com/account-settings) page. - - 1. Under **User API Tokens**, click **Create user API token**. For Nickname, provide a name for the token. For Permissions, select **Read and Write**. - - For more information about User API tokens, see [User API Tokens](replicated-api-tokens#user-api-tokens) in _Generating API Tokens_. - - 1. Click **Create Token**. - - 1. Copy the string that appears in the dialog. - -1. Export the string that you copied in the previous step to an environment variable named `REPLICATED_API_TOKEN`: - - ```bash - export REPLICATED_API_TOKEN=YOUR_TOKEN - ``` - Replace `YOUR_TOKEN` with the token string that you copied from the Vendor Portal in the previous step. - -1. Verify the User API token: - - ``` - replicated release ls - ``` - - You see the following error message: - - ``` - Error: App not found: - ``` - -## Next Step - -Continue to [Step 2: Create an Application](tutorial-cli-create-app) to use the Replicated CLI to create an application. diff --git a/docs/vendor/tutorial-cli-manifests.mdx b/docs/vendor/tutorial-cli-manifests.mdx deleted file mode 100644 index 84d15ba90c..0000000000 --- a/docs/vendor/tutorial-cli-manifests.mdx +++ /dev/null @@ -1,35 +0,0 @@ -# Step 3: Get the Sample Manifests - -To create a release for the `cli-tutorial` application, first create the Kubernetes manifest files for the application. This tutorial provides a set of sample manifest files for a simple Kubernetes application that deploys an NGINX service. - -To get the sample manifest files: - -1. Run the following command to create and change to a `replicated-cli-tutorial` directory: - - ``` - mkdir replicated-cli-tutorial - cd replicated-cli-tutorial - ``` - -1. Create a `/manifests` directory and download the sample manifest files from the [kots-default-yaml](https://github.com/replicatedhq/kots-default-yaml) repository in GitHub: - - ``` - mkdir ./manifests - curl -fSsL https://github.com/replicatedhq/kots-default-yaml/archive/refs/heads/main.zip | \ - tar xzv --strip-components=1 -C ./manifests \ - --exclude README.md --exclude LICENSE --exclude .gitignore - ``` - -1. Verify that you can see the YAML files in the `replicated-cli-tutorial/manifests` folder: - - ``` - ls manifests/ - ``` - ``` - example-configmap.yaml example-service.yaml kots-app.yaml kots-lint-config.yaml kots-support-bundle.yaml - example-deployment.yaml k8s-app.yaml kots-config.yaml kots-preflight.yaml - ``` - -## Next Step - -Continue to [Step 4: Create a Release](tutorial-cli-create-release) to create and promote the first release for the `cli-tutorial` application using these manifest files. diff --git a/docs/vendor/tutorial-cli-setup.mdx b/docs/vendor/tutorial-cli-setup.mdx deleted file mode 100644 index a96155a59b..0000000000 --- a/docs/vendor/tutorial-cli-setup.mdx +++ /dev/null @@ -1,35 +0,0 @@ -import KubernetesTraining from "../partials/getting-started/_kubernetes-training.mdx" -import LabsIntro from "../partials/getting-started/_labs-intro.mdx" -import TutorialIntro from "../partials/getting-started/_tutorial-intro.mdx" -import RelatedTopics from "../partials/getting-started/_related-topics.mdx" -import VMRequirements from "../partials/getting-started/_vm-requirements.mdx" - -# Introduction and Setup - -The KOTS Application custom resource enables features in the Admin Console such as branding, release notes, port forwarding, dashboard buttons, application status indicators, and custom graphs.
The YAML below provides a name for the application to display in the Admin Console, adds a custom status informer that displays the status of the grafana
Deployment resource in the Admin Console dashboard, adds a custom application icon, and creates a port forward so that the user can open the Grafana application in a browser.
The Kubernetes Application custom resource supports functionality such as including buttons and links on the Admin Console dashboard. The YAML below adds an Open App button to the Admin Console dashboard that opens the application using the port forward configured in the KOTS Application custom resource.
-The Config custom resource specifies a user-facing configuration page in the Admin Console designed for collecting application configuration from users. The YAML below creates "Admin User" and "Admin Password" fields that will be shown to the user on the configuration page during installation. These fields will be used to set the login credentials for Grafana.
-The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart.
-The HelmChart custom resource below contains a values
key, which creates a mapping to the Grafana values.yaml
file. In this case, the values.admin.user
and values.admin.password
fields map to admin.user
and admin.password
in the Grafana values.yaml
file.
During installation, KOTS renders the ConfigOption template functions in the values.admin.user
and values.admin.password
fields and then sets the corresponding Grafana values accordingly.
The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The name
and chartVersion
listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. The optionalValues
field sets the specified Helm values when a given conditional statement evaluates to true. In this case, if the application is installed with Embedded Cluster, then the Gitea service type is set to `NodePort` and the node port is set to `"32000"`. This will allow Gitea to be accessed from the local machine after deployment.
The KOTS Application custom resource enables features in the Replicated Admin Console such as branding, release notes, application status indicators, and custom graphs.
The YAML below provides a name for the application to display in the Admin Console, adds a custom status informer that displays the status of the gitea
Deployment resource in the Admin Console dashboard, adds a custom application icon, and adds the port where the Gitea service can be accessed so that the user can open the application after installation.
The Kubernetes Application custom resource supports functionality such as including buttons and links on the Replicated Admin Console dashboard. The YAML below adds an Open App button to the Admin Console dashboard that opens the application using the service port defined in the KOTS Application custom resource.
-To install your application with Embedded Cluster, an Embedded Cluster Config must be present in the release. At minimum, the Embedded Cluster Config sets the version of Embedded Cluster that will be installed. You can also define several characteristics about the cluster.
-The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The name
and chartVersion
listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. Each Helm chart archive in a release requires a unique HelmChart custom resource.
The KOTS Application custom resource enables features in the KOTS Admin Console such as branding, release notes, port forwarding, dashboard buttons, application status indicators, and custom graphs.
The YAML below provides a name for the application to display in the Admin Console, adds a custom status informer that displays the status of the gitea
Deployment resource in the Admin Console dashboard, adds a custom application icon, and creates a port forward so that the user can open the Gitea application in a browser.
The Kubernetes Application custom resource supports functionality such as including buttons and links on the KOTS Admin Console dashboard. The YAML below adds an Open App button to the Admin Console dashboard that opens the application using the port forward configured in the KOTS Application custom resource.
-The KOTS HelmChart custom resource provides instructions to KOTS about how to deploy the Helm chart. The name
and chartVersion
listed in the HelmChart custom resource must match the name and version of a Helm chart archive in the release. Each Helm chart archive in a release requires a unique HelmChart custom resource.
The KOTS Application custom resource enables features in the Replicated Admin Console such as branding, release notes, port forwarding, dashboard buttons, application status indicators, and custom graphs.
The YAML below provides a name for the application to display in the Admin Console, adds a custom status informer that displays the status of the gitea
Deployment resource in the Admin Console dashboard, adds a custom application icon, and creates a port forward so that the user can open the Gitea application in a browser.
The Kubernetes Application custom resource supports functionality such as including buttons and links on the Replicated Admin Console dashboard. The YAML below adds an Open App button to the Admin Console dashboard that opens the application using the port forward configured in the KOTS Application custom resource.
-