diff --git a/docs/partials/getting-started/_slackernews-chart.mdx b/docs/partials/getting-started/_slackernews-chart.mdx new file mode 100644 index 0000000000..7889c0ede5 --- /dev/null +++ b/docs/partials/getting-started/_slackernews-chart.mdx @@ -0,0 +1,137 @@ +```yaml +apiVersion: kots.io/v1beta2 +kind: HelmChart +metadata: + name: slackernews +spec: + # chart identifies a matching chart from a .tgz + chart: + name: slackernews + chartVersion: 1.0.0 + namespace: slackernews + + # values are used in the customer environment, as a pre-render step + # these values will be supplied to helm template + values: + postgres: + enabled: true + deploy_postgres: repl{{ ConfigOption "deploy_postgres" | ParseBool }} + slack: + botToken: repl{{ ConfigOption "slack_bot_token" | quote }} + userToken: repl{{ ConfigOption "slack_user_token" | quote }} + clientId: repl{{ ConfigOption "slack_clientid" | quote }} + clientSecret: repl{{ ConfigOption "slack_clientsecret" | quote }} + slackernews: + domain: repl{{ ConfigOption "slackernews_domain" }} + adminUserEmails: repl{{ ConfigOption "slackernews_admin_user_emails" | quote }} + admin-console: + enabled: false + replicated: + isEmbeddedCluster: repl{{ eq Distribution "embedded-cluster"}} + isKOTSManaged: true + imagePullSecrets: + - name: '{{repl ImagePullSecretName }}' + service: + tls: + enabled: true + nginx: + enabled: true + images: + pullSecrets: + - name: '{{repl ImagePullSecretName }}' + + optionalValues: + # load images from the local registry in an air-gapped environment + - when: '{{repl HasLocalRegistry }}' + recursiveMerge: true + values: + replicated: + isAirgap: true + image: + registry: '{{repl LocalRegistryHost }}' + repository: '{{repl LocalRegistryNamespace }}/replicated-sdk-image' + slackernews: + registry: '{{repl LocalRegistryHost}}' + repository: '{{LocalRegistryNamespace}}/slackernews-web' + nginx: + registry: '{{repl LocalRegistryHost}}' + repository: '{{LocalRegistryNamespace}}/nginx' + postgres: + registry: '{{repl LocalRegistryHost}}' + repository: '{{LocalRegistryNamespace}}/postgres' + + # the user wants us to deploy a local Postgres instance + - when: '{{repl ConfigOptionEquals "deploy_postgres" "1"}}' + recursiveMerge: true + values: + postgres: + password: '{{repl ConfigOption "postgres_password" }}' + + # the user provided their own Postgres instance + - when: '{{repl ConfigOptionEquals "deploy_postgres" "0"}}' + recursiveMerge: true + values: + postgres: + uri: '{{repl ConfigOption "postgres_external_uri" }}' + + # use the user-provided certificates + - when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' + recursiveMerge: true + values: + service: + tls: + enabled: true + cert: repl{{ ConfigOptionData "tls_cert" | nindent 14 }} + key: repl{{ ConfigOptionData "tls_key" | nindent 14 }} + ca: repl{{ ConfigOptionData "tls_ca" | nindent 14 }} + + # or generate our own + - when: '{{repl ConfigOptionEquals "certificate_source" "generate_internal"}}' + recursiveMerge: true + values: + service: + tls: + enabled: true + ca: |- + {{repl $ca := genCA (LicenseFieldValue "customerName") 365 }} + {{repl $ca.Cert | Base64Encode}} + cert: |- + {{repl $cert := genSignedCert (ConfigOption "slackernews_domain") nil (list (ConfigOption "slackernews_domain")) 365 $ca }} + {{repl $cert.Cert | nindent 14 }} + key: |- + {{repl $cert.Key | nindent 14 }} + + # handle different service types + - when: '{{repl ConfigOptionEquals "service_type" "cluster_ip"}}' + recursiveMerge: true + values: + nginx: + service: + type: ClusterIP + + - when: '{{repl ConfigOptionEquals "service_type" "load_balancer"}}' + recursiveMerge: true + values: + nginx: + service: + type: LoadBalancer + + - when: '{{repl ConfigOptionEquals "service_type" "node_port"}}' + recursiveMerge: true + values: + nginx: + service: + type: NodePort + nodePort: + port: repl{{ ConfigOption "node_port_port" }} + + + + # builder values provide a way to render the chart with all images + # and manifests. this is used in Replicated to create airgap packages + builder: + postgres: + password: this-is-not-used-but-needed-for-builder + deploy_postgres: true + enabled: true +``` \ No newline at end of file diff --git a/docs/partials/getting-started/_slackernews-config.mdx b/docs/partials/getting-started/_slackernews-config.mdx new file mode 100644 index 0000000000..60ffa19b46 --- /dev/null +++ b/docs/partials/getting-started/_slackernews-config.mdx @@ -0,0 +1,153 @@ +```yaml +apiVersion: kots.io/v1beta1 +kind: Config +metadata: + name: slackernews-config +spec: + groups: + - name: slackernews + title: Application Core + description: | + For this section, you can specify some core parameters for how + Slackernews operates, including the domain where users will access it + and the user who can administer it. + + Users that you specify under **Admin Users** will be able to access the + Slackernews adminstrative console at `/admin`, allowing them to manage + content, users, and settings. Changes will take effect the next time + they are active in the Slackernews application. + items: + - name: slackernews_domain + title: Ingress Hostname + help_text: > + The domain name at which you'll access SlackerNews. Don't include + the `https://` or any path elements. + type: text + required: true + # validation: + # regex: + # pattern: ^(?!-)[A-Za-z0-9-]{1,63}(? + Provide a comma-separated list of email addresses for the users you + want to grant admin access to. + + - name: ingress + title: Application Access + description: | + You can customize how you will expose SlackerNews to the internet. + Note that the domain you use will need to be publicly addressable with certs signed by a public authority + so it can receive webhooks from Slack. + + Common configurations include: + + - **ClusterIP** Using a Cluster IP and configuring your existing ingress controller to route traffic to SlackerNews + - **NodePort** Using a NodePort and configuring an existing load balancer to route traffic to SlackerNews + - **LoadBalancer** Using a LoadBalancer service and letting Kubernetes provision a load balancer for you + + If you're running in a supported cloud provider and want Kubernetes to provision a Load Balancer, use LoadBalancer. + items: + - name: service_type + title: Service Type + type: select_one + items: + - name: node_port + title: NodePort + - name: cluster_ip + title: ClusterIP + - name: load_balancer + title: LoadBalancer + default: node_port + - name: node_port_port + title: Node Port + help_text: > + (Optional) - The port to use for the NodePort service type. Leave this blank to have Kubernetes choose a port for you. + type: text + default: "443" + when: repl{{ ConfigOptionEquals "service_type" "node_port" }} + + - name: tls + title: Certificates + description: | + You can secure the Slackernews application with certificates from a trusted certificate authority + or we can generate them for you. We recommend that you upload your own certificates for production installations. + items: + - name: certificate_source + type: select_one + title: Certificate Source + default: generate_internal + items: + - name: generate_internal + title: Generate + - name: upload_existing + title: Upload + - name: tls_cert + title: Certificate + type: file + when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' + - name: tls_key + title: Private Key + type: file + when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' + - name: tls_ca + title: Signing Authority + type: file + when: '{{repl ConfigOptionEquals "certificate_source" "upload_existing"}}' + + - name: slack + title: Slack Settings + description: | + If desired, you can preconfigure the slack settings for SlackerNews. + These are required for logging into SlackerNews and pulling/organizing content from your slack instance. + If you don't preconfigure these settings, you'll be prompted to configure them when you first access SlackerNews. + + Instructions on how to configure your slack application and collect these values can be found in [the SlackerNews slack documentation](https://docs.slackernews.io/slack/). + items: + - name: slack_clientid + title: Slack Client ID + type: text + - name: slack_clientsecret + title: Slack Client Secret + type: password + - name: slack_user_token + title: User OAuth Token + type: password + validation: + regex: + pattern: ^xoxp-.*$ + message: Please enter the Slack user token for your instance of Slackernews + - name: slack_bot_token + title: Bot User OAuth Token + type: password + validation: + regex: + pattern: ^xoxb-.*$ + message: Please enter the Slack bot token for your instance of Slackernews + + - name: postgres + description: > + This section can be used to configure the postgresql database required by SlackerNews. You + can either deploy postgresql as part of the installation or provide an external URI to an existing postgresql instance + that you will use for SlackerNews. + title: Postgresql + items: + - name: deploy_postgres + type: bool + title: Deploy Postgresql Database + default: "1" + - name: postgres_password + type: password + title: Postgresql Password + required: true + hidden: true + when: repl{{ ConfigOptionEquals "deploy_postgres" "1"}} + value: repl{{ RandomString 40}} + - name: postgres_external_uri + type: text + title: Postgresql URI + required: true + when: repl{{ ConfigOptionEquals "deploy_postgres" "0"}} +``` \ No newline at end of file diff --git a/docs/partials/getting-started/_slackernews-embedded-cluster.mdx b/docs/partials/getting-started/_slackernews-embedded-cluster.mdx new file mode 100644 index 0000000000..364a82241f --- /dev/null +++ b/docs/partials/getting-started/_slackernews-embedded-cluster.mdx @@ -0,0 +1,6 @@ +```yaml +apiVersion: embeddedcluster.replicated.com/v1beta1 +kind: Config +spec: + version: 2.10.0+k8s-1.33 +``` \ No newline at end of file diff --git a/docs/partials/getting-started/_slackernews-k8s-app.mdx b/docs/partials/getting-started/_slackernews-k8s-app.mdx new file mode 100644 index 0000000000..ecb0e82c5f --- /dev/null +++ b/docs/partials/getting-started/_slackernews-k8s-app.mdx @@ -0,0 +1,30 @@ +```yaml +apiVersion: app.k8s.io/v1beta1 +kind: Application +metadata: + name: "slackernews" + annotations: + kots.io/exclude: "true" + labels: + app.kubernetes.io/name: "slackernews" + app.kubernetes.io/version: "0.0.1" +spec: + selector: + matchLabels: + app.kubernetes.io/name: "slackernews" + componentKinds: + - group: core + kind: Service + - group: apps + kind: Deployment + descriptor: + version: "1.0.0" + description: "SlackerNews" + icons: + - src: "https://uploads-ssl.webflow.com/6310ad0e6a18aa1620da6ae8/6330e04f42bc6a7ba03b4725_snicon.png" + type: "image/png" + type: slackernews + links: + - description: 🔗 Open Slackernews + url: 'https://{{repl ConfigOption "slackernews_domain" }}' +``` \ No newline at end of file diff --git a/docs/partials/getting-started/_slackernews-repl-app.mdx b/docs/partials/getting-started/_slackernews-repl-app.mdx new file mode 100644 index 0000000000..12f5950b9c --- /dev/null +++ b/docs/partials/getting-started/_slackernews-repl-app.mdx @@ -0,0 +1,17 @@ +```yaml +apiVersion: kots.io/v1beta1 +kind: Application +metadata: + name: slackernews + annotations: + kots.io/exclude: "true" +spec: + title: SlackerNews + icon: "https://uploads-ssl.webflow.com/6310ad0e6a18aa1620da6ae8/6330e04f42bc6a7ba03b4725_snicon.png" + statusInformers: + - slackernews/deployment/slackernews + - slackernews/deployment/slackernews-nginx + - '{{repl if ConfigOptionEquals "deploy_postgres" "1"}}slackernews/statefulset/postgres{{repl end}}' + additionalNamespaces: + - slackernews +``` \ No newline at end of file diff --git a/docs/vendor/quick-start.mdx b/docs/vendor/quick-start.mdx index 9846835b1b..4401927346 100644 --- a/docs/vendor/quick-start.mdx +++ b/docs/vendor/quick-start.mdx @@ -2,10 +2,11 @@ import DependencyYaml from "../partials/replicated-sdk/_dependency-yaml.mdx" import HelmPackage from "../partials/helm/_helm-package.mdx" import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -import HelmChartCr from "../partials/getting-started/_gitea-helmchart-cr-ec.mdx" -import KotsCr from "../partials/getting-started/_gitea-kots-app-cr-ec.mdx" -import K8sCr from "../partials/getting-started/_gitea-k8s-app-cr.mdx" -import EcCr from "../partials/embedded-cluster/_ec-config.mdx" +import HelmChartCr from "../partials/getting-started/_slackernews-chart.mdx" +import KotsCr from "../partials/getting-started/_slackernews-repl-app.mdx" +import K8sCr from "../partials/getting-started/_slackernews-k8s-app.mdx" +import EcCr from "../partials/getting-started/_slackernews-embedded-cluster.mdx" +import ConfigCr from "../partials/getting-started/_slackernews-config.mdx" import Requirements from "../partials/embedded-cluster/_requirements.mdx" # Replicated Quick Start @@ -14,7 +15,7 @@ This topic provides a quick start workflow to help new users learn about the Rep ## Introduction -This quick start shows how to create, install, and update releases for a sample Helm chart in the Replicated Platform. You will repeat these same basic steps to create and test releases throughout the onboarding process to integrate Replicated features with your own application. +This quick start demonstrates how to create, install, and update releases for a sample Helm chart in the Replicated Platform. You will repeat these same basic steps to create and test releases throughout the onboarding process to integrate Replicated features with your own application. The goals of this quick start are to introduce new Replicated users to the following common tasks for the purpose of preparing to onboard to the Replicated Platform: @@ -22,40 +23,65 @@ The goals of this quick start are to introduce new Replicated users to the follo * Working with the Replicated CLI -* Installing and updating applications on a VM with Replicated Embedded Cluster +* Installing and updating applications on a VM with Replicated Embedded Cluster through the Replicated Admin Console UI. -* Managing an installation with the Replicated KOTS Admin Console +## Set Up Your Environment -## Set Up the Environment +To complete this quick start, you need access to a VM that meets the requirements for Embedded Cluster: -Before you begin, ensure that you have access to a VM that meets the requirements for Embedded Cluster: +* **Option 1: Use Compatibility Matrix.** To use Replicated Compatibility Matrix to create a VM, do the following before proceeding: + + * Request Compatibility Matrix credits. You can request credits by creating a Vendor Portal account and then going to [**Compatibility Matrix > Request more credits**](https://vendor.replicated.com/compatibility-matrix) in the Vendor Portal. For more information about creating an account, see [Create a Vendor Account](vendor-portal-creating-account). For more information about Compatibility Matrix credits, see [Billing and Credits](/vendor/testing-about#billing-and-credits). + + * Ensure that you have an SSH key in your GitHub account. Then, add your GitHub username to your Vendor Portal [**Account Settings**](https://vendor.replicated.com/account-settings). This will provide SSH access to VMs that you create with Compatibility Matrix. For more information, see [Set Up SSH Access](/vendor/testing-vm-create#set-up-ssh-access) in _Create VMs_. + + After you complete the prerequisites above, continue to the [Quick Start](#quick-start). You will create the VM with Compatibility Matrix as part of the tutorial. + +* **Option 2: Bring your own VM.** Your VM must meet these requirements: + + * Firewalls must allow HTTP and HTTPS traffic. + + - +For more information about setting up your environment to work with the Replicated Platform, see [Set Up Your Environment](/vendor/environment-setup). ## Quick Start -1. Create an account in the Vendor Portal. You can either create a new team or join an existing team. For more information, see [Create a Vendor Account](vendor-portal-creating-account). +1. If you have not done so already, create an account in the Vendor Portal. You can either create a new team or join an existing team. For more information, see [Create a Vendor Account](vendor-portal-creating-account). 1. Create an application using the Replicated CLI: 1. On your local machine, install the Replicated CLI: - ```bash - brew install replicatedhq/replicated/cli - ``` - For more installation options, see [Install the Replicated CLI](/reference/replicated-cli-installing). + * MacOS + + ```bash + brew install replicatedhq/replicated/cli + ``` + * Linux / Windows Subsystem for Linux (WSL) + + ```bash + version=$(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \ + | grep -m1 -Po '"tag_name":\s*"v\K[^"]+') + curl -Ls \ + "https://github.com/replicatedhq/replicated/releases/download/v${version}/replicated_${version}_linux_amd64.tar.gz" \ + -o replicated.tar.gz + tar xf replicated.tar.gz replicated && rm replicated.tar.gz + mv replicated /usr/local/bin/replicated + ``` + For more information and additional installation options, see [Install the Replicated CLI](/reference/replicated-cli-installing). 1. Authorize the Replicated CLI: ```bash replicated login ``` - In the browser window that opens, complete the prompts to log in to your Vendor Portal account and authorize the CLI. + In the browser window that opens, follow the prompt to log in to your Vendor Portal account and authorize the CLI. - 1. Create an application named `Gitea`: + 1. Create an application named `SlackerNews`: ```bash - replicated app create Gitea + replicated app create SlackerNews ``` 1. Set the `REPLICATED_APP` environment variable to the application that you created: @@ -63,26 +89,39 @@ Before you begin, ensure that you have access to a VM that meets the requirement ```bash export REPLICATED_APP=APP_SLUG ``` - Where `APP_SLUG` is the unique application slug provided in the output of the `app create` command. For example, `export REPLICATED_APP=gitea-kite`. + Where `APP_SLUG` is the unique application slug provided in the output of the `app create` command. + + Setting the `REPLICATED_APP` environment variable allows you to interact with the application using the Replicated CLI without needing to use the `--app` flag with every command. - This allows you to interact with the application using the Replicated CLI without needing to use the `--app` flag with every command. +1. Get the sample SlackerNews Helm chart: -1. Get the sample Bitnami Gitea Helm chart and add the Replicated SDK as a dependency: + 1. Run the following command to download version 1.0.0 of the sample SlackerNews Helm chart to a new `quick-start` directory: - 1. Run the following command to pull and untar version 1.0.6 of the Bitnami Gitea Helm chart: + ``` + curl -O --create-dirs --output-dir quick-start https://docs.replicated.com/slackernews-1.0.0.tar.gz + ``` + + 1. Untar the chart: ``` - helm pull --untar oci://registry-1.docker.io/bitnamicharts/gitea --version 1.0.6 + tar -xzf quick-start/slackernews-1.0.0.tar.gz -C quick-start/ && rm quick-start/slackernews-1.0.0.tar.gz ``` - For more information about this chart, see the [bitnami/gitea](https://github.com/bitnami/charts/tree/main/bitnami/gitea) repository in GitHub. - 1. Change to the new `gitea` directory that was created: + 1. Change to the `slackernews` chart directory: ```bash - cd gitea + cd quick-start/chart/slackernews + ``` + + 1. List the files in the `slackernews` directory to view the contents of the Helm chart: + ```bash + ls + ``` + ```bash + Chart.lock Chart.yaml NOTES.txt README.md templates values.yaml ``` - 1. In the Helm chart `Chart.yaml`, add the Replicated SDK as a dependency: + 1. In the SlackerNews Helm chart `Chart.yaml`, add the Replicated SDK as a dependency: @@ -91,24 +130,31 @@ Before you begin, ensure that you have access to a VM that meets the requirement 1. Update dependencies and package the Helm chart to a `.tgz` chart archive: ```bash - helm package -u . + helm package --dependency-update . ``` - Where `-u` or `--dependency-update` is an option for the helm package command that updates chart dependencies before packaging. For more information, see [Helm Package](https://helm.sh/docs/helm/helm_package/) in the Helm documentation. + Where `--dependency-update` (or `-u`) is an option for the `helm package` command that updates chart dependencies before packaging. For more information, see [Helm Package](https://helm.sh/docs/helm/helm_package/) in the Helm documentation. + + The output of this command is a file named `slackernews-1.0.0.tgz`. + +1. Add the `slackernews-1.0.0.tgz` chart archive to a release in the Replicated Platform: -1. Add the chart archive to a release: + 1. Change to the `quick-start` directory: - 1. In the `gitea` directory, create a subdirectory named `manifests`: + ```bash + cd ../.. + ``` + + 1. In the `quick-start` directory, create a directory named `manifests`: ``` mkdir manifests ``` + You will add the files required to support installation with Embedded Cluster to this subdirectory. - You will add the files required to support installation with Replicated KOTS and Replicated Embedded Cluster to this subdirectory. - - 1. Move the Helm chart archive that you created to `manifests`: + 1. Move the `slackernews-1.0.0.tgz` chart archive that you created to `manifests`: ``` - mv gitea-1.0.6.tgz manifests + mv chart/slackernews/slackernews-1.0.0.tgz manifests ``` 1. In `manifests`, create the following YAML files: @@ -116,27 +162,28 @@ Before you begin, ensure that you have access to a VM that meets the requirement cd manifests ``` ``` - touch gitea.yaml kots-app.yaml k8s-app.yaml embedded-cluster.yaml + touch slackernews.yaml replicated-app.yaml k8s-app.yaml embedded-cluster.yaml config.yaml ``` + These manifests will be used by Embedded Cluster to install SlackerNews. 1. In each of the files that you created, paste the corresponding YAML provided in the tabs below: - +
Description
-

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.

YAML
- +
Description
-

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.

YAML
Description
-

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.

YAML
@@ -146,26 +193,34 @@ Before you begin, ensure that you have access to a VM that meets the requirement
YAML
+ +
Description
+

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.

+
YAML
+ +
- 1. Lint the YAML files: + 1. Lint the YAML files in the `manifests` directory: ```bash replicated release lint --yaml-dir . ``` **Example output:** ```bash - RULE TYPE FILENAME LINE MESSAGE - config-spec warn Missing config spec - preflight-spec warn Missing preflight spec - troubleshoot-spec warn Missing troubleshoot spec - nonexistent-status-informer-object warn kots-app.yaml 8 Status informer points to a nonexistent kubernetes object. If this is a Helm resource, this warning can be ignored. + RULE TYPE FILENAME LINE MESSAGE + may-contain-secrets info slackernews.yaml 142 It looks like there might be secrets in this file + preflight-spec warn Missing preflight spec + troubleshoot-spec warn Missing troubleshoot spec + nonexistent-status-informer-object warn replicated-app.yaml 14 Status informer points to a nonexistent kubernetes object. If this is a Helm resource, this warning can be ignored. + nonexistent-status-informer-object warn replicated-app.yaml 15 Status informer points to a nonexistent kubernetes object. If this is a Helm resource, this warning can be ignored. + nonexistent-status-informer-object warn replicated-app.yaml 16 Status informer points to a nonexistent kubernetes object. If this is a Helm resource, this warning can be ignored. ``` :::note - You can ignore any warning messages for the purpose of this quick start. + You can ignore `info` or `warn` messages for the purpose of this quick start. ::: - 1. Create the release and promote it to the Unstable channel: + 1. From the `manifests` directory, create a release and promote it to the Unstable channel: ```bash replicated release create --yaml-dir . --promote Unstable @@ -179,13 +234,15 @@ Before you begin, ensure that you have access to a VM that meets the requirement • Channel 2kvjwEj4uBaCMoTigW5xty1iiw6 successfully set to release 1 ``` -1. Create a customer so that you can install the release on your VM with Embedded Cluster: +1. Create a test customer so that you can install the release in your VM with Embedded Cluster: - 1. In the [Vendor Portal](https://vendor.replicated.com), under the application drop down, select the Gitea application that you created. + 1. Log in to the [Vendor Portal](https://vendor.replicated.com). + + 1. Under the application drop down, select the SlackerNews application that you created. - App drop down + App drop down - [View a larger version of this image](/images/quick-start-select-gitea-app.png) + [View a larger version of this image](/images/quick-start-app-dropdown-slackernews.png) 1. Click **Customers > Create customer**. @@ -199,119 +256,220 @@ Before you begin, ensure that you have access to a VM that meets the requirement 1. For **Channel**, select **Unstable**. This allows the customer to install releases promoted to the Unstable channel. - 1. For **License type**, select **Development**. + 1. For **Customer type**, select **Development**. - 1. For **License options**, enable the following entitlements: - * **KOTS Install Enabled** - * **Embedded Cluster Enabled** + 1. For **Install types**, enable **Embedded Cluster (current generation product)** and disable the other install type options. 1. Click **Save Changes**. +1. If you brought your own VM, SSH onto your VM. Otherwise, follow these steps to create and SSH onto a VM with Compatibility Matrix: + + 1. Create an Ubuntu VM that expires after two hours: + + ```bash + replicated vm create --distribution ubuntu --version 24.04 --instance-type r1.small --disk 50 --ttl 2h + ``` + **Example output:** + ```bash + ID NAME DISTRIBUTION VERSION STATUS NETWORK CREATED EXPIRES COST + 97940819 practical_black ubuntu 24.04 queued c726ffff 2025-08-20 14:32 MDT - $0.69 + ``` + + 1. After a few minutes, check the status of the VM to see when it is `running`: + + ```bash + replicated vm ls + ``` + **Example output:** + ```bash + ID NAME DISTRIBUTION VERSION STATUS NETWORK CREATED EXPIRES COST + 97940819 practical_black ubuntu 24.04 running c726ffff 2025-08-20 14:32 MDT 2025-08-20 16:33 MDT $0.69 + ``` + + 1. Run the following command to use the Compatibility Matrix Forwarder to SSH onto the VM: + + ```bash + ssh VM_ID@replicatedvm.com + ``` + Where `VM_ID` is the `ID` from the output of the `replicated vm ls` command. + + :::note + If you are prompted to add the fingerprint for replicatedvm.com, type `yes` and press Enter. + ::: + + 1. When prompted, provide the passphrase for the SSH key in your linked GitHub account. Compatibility Matrix uses GitHub SSH to provide access to the VM. + 1. Install the application with Embedded Cluster: - 1. On the page for the customer that you created, click **Install instructions > Embedded Cluster**. + 1. In the Vendor Portal, on the page for the customer that you created, click **Embedded Cluster install instructions**. - ![Customer install instructions dropdown](/images/customer-install-instructions-dropdown.png) + ![Customer install instructions](/images/quick-start-slackernews-customer-install-instructions-button.png) - [View a larger image](/images/customer-install-instructions-dropdown.png) + [View a larger version of this image](/images/quick-start-slackernews-customer-install-instructions-button.png) - 1. On the command line, SSH onto your VM and run the commands in the **Embedded cluster install instructions** dialog to download the latest release, extract the installation assets, and install. + 1. On your VM, run the commands in the **Embedded cluster install instructions** dialog to download the latest release, extract the installation assets, and install SlackerNews. - embedded cluster install instructions dialog + embedded cluster install instructions dialog [View a larger version of this image](/images/embedded-cluster-install-dialog-latest.png) - 1. When prompted, enter a password for accessing the Admin Console. + 1. When prompted by the `install` command, set a password for accessing the Admin Console. You will use this password to log in to the Admin Console in a later step. The installation command takes a few minutes to complete. **Example output:** ```bash - ? Enter an Admin Console password: ******** - ? Confirm password: ******** - ✔ Host files materialized! - ✔ Running host preflights - ✔ Node installation finished! - ✔ Storage is ready! - ✔ Embedded Cluster Operator is ready! - ✔ Admin Console is ready! - ✔ Additional components are ready! - Visit the Admin Console to configure and install gitea-kite: http://104.155.145.60:30000 + ? Set the Admin Console password (minimum 6 characters): ******** + ? Confirm the Admin Console password: ******** + + ✔ Initialization complete + ✔ Host preflights passed + ✔ Node is ready + ✔ Storage is ready + ✔ Runtime Operator is ready + ✔ Admin Console is ready + ✔ Additional components are ready + + ----------------------------------------------------------------- + Visit the Admin Console to configure and install slackernews-gnu: + + http://10.0.0.11:30000 + ----------------------------------------------------------------- ``` At this point, the cluster is provisioned and the Admin Console is deployed, but the application is not yet installed. - 1. Go to the URL provided in the output to access to the Admin Console. - - 1. On the Admin Console landing page, click **Start**. + 1. Do one of the following to access the Admin Console: + * If you brought your own VM, go to the URL provided in the output of the install command. + :::note + The IP address in the provided URL might be the private IP address of your VM. You might need to edit the URL to use the public IP address. + ::: + * If you created the VM with Compatibility Matrix: + 1. In the Vendor Portal, go to [**Compatibility Matrix**](https://vendor.replicated.com/compatibility-matrix/overview). + 1. Open the dot menu for your VM and click **Edit VM**. + + ![Edit VM in the dot menu](/images/compatibility-matrix-edit-vm.png) + + [View a larger version of this image](/images/compatibility-matrix-edit-vm.png) + + 1. Under **Ingress & Ports**, for **Add DNS record**, click **Add** to create a DNS record using the default settings. This will provide a hostname where you can access the Admin Console. + + 1. Add another DNS record with a **Target Port** of **443**. This will provide a hostname where you can access SlackerNews after it's installed. + + The following shows an example of both of these DNS records added to a VM: + + ![DNS record for a VM](/images/compatibility-matrix-dns-record.png) + [View a larger version of this image](/images/compatibility-matrix-dns-record.png) - 1. On the **Secure the Admin Console** screen, review the instructions and click **Continue**. In your browser, follow the instructions that were provided on the **Secure the Admin Console** screen to bypass the warning. + 1. (Optional) Copy the URL for the DNS record with a target port of 443 and save it somewhere on your local machine. You will be asked to provide this hostname in the Admin Console as part of the installation process for SlackerNews. + + 1. In a browser, navigate to the URL for the DNS record with a target port of 30000. - 1. On the **Certificate type** screen, either select **Self-signed** to continue using the self-signed Admin Console certificate or click **Upload your own** to upload your own private key and certificacte. + The Admin Console opens. + + 1. If you are directed to the Admin Console landing page: + 1. Click **Start**. + 1. On the **Secure the Admin Console** screen, review the instructions and click **Continue**. In your browser, follow the instructions that were provided on the **Secure the Admin Console** screen to bypass the warning. + 1. On the **Certificate type** screen, either select **Self-signed** to continue using the self-signed Admin Console certificate or click **Upload your own** to upload your own private key and certificacte. By default, a self-signed TLS certificate is used to secure communication between your browser and the Admin Console. You will see a warning in your browser every time you access the Admin Console unless you upload your own certificate. + + :::note + If you created the VM with Compatibility Matrix, you might not see these pages. Instead, your browser might automatically redirect to the Admin Console login screen. + ::: + + 1. On the login screen, enter the Admin Console password that you set and click **Log in**. - By default, a self-signed TLS certificate is used to secure communication between your browser and the Admin Console. You will see a warning in your browser every time you access the Admin Console unless you upload your own certificate. + ![Admin console login screen](/images/quick-start-slackernews-admin-console-login.png) - 1. On the login page, enter the Admin Console password that you created during installation and click **Log in**. + [View a larger version of this image](/images/quick-start-slackernews-admin-console-login.png) 1. On the **Configure the cluster** screen, you can view details about the VM where you installed, including its node role, status, CPU, and memory. Users can also optionally add additional nodes on this page before deploying the application. Click **Continue**. - The Admin Console dashboard opens. + ![Admin console login screen](/images/quick-start-slackernews-configure-the-cluster.png) + + [View a larger version of this image](/images/quick-start-slackernews-configure-the-cluster.png) + + 1. On the **Configure SlackerNews** screen, complete the following fields: + + * For **Hostname**: + * If you created the VM with Compatibility Matrix, enter the URL that you copied for the DNS record with a target port of 443. For example, `pensive-keldysh.ingress.replicatedcluster.com`. + + * If you are using your own VM, provide the public IP address for your VM. You can copy the IP address from your browser's address bar where you are currently accessing the Admin Console. Alternatively, if you have a hostname for your VM's IP address, you can provide that instead. - 1. On the Admin Console dashboard, next to the version, click **Deploy** and then **Yes, Deploy**. + * For **Application Access > Service Type**, ensure that **NodePort** is selected. Leave the **Node Port** field blank to use the default port of 443. + + * For **Postgresql**, ensure that **Deploy Postgresql Database** is enabled to deploy the built-in Postgresql database. - The application status changes from Missing to Unavailable while the `gitea` Deployment is being created. + Leave the other fields on the **Configure SlackerNews** screen empty. They are not applicable for this quick start. - 1. After a few minutes when the application status is Ready, click **Open App** to view the Gitea application in a browser. + ![Configure slackernews screen](/images/quick-start-slackernews-configure-slackernews.png) + + [View a larger version of this image](/images/quick-start-slackernews-configure-slackernews.png) - For example: + 1. Click **Continue**. + + The Admin Console dashboard opens. The application status changes from Missing to Unavailable while the application is being deployed. You can click **Details** next to the status for more information about the status of specific application resources. + + After a few minutes, the status changes to Ready when the application is deployed: + + ![Slackernews with ready status on admin console dashboard](/images/quick-start-slackernews-adm-dashboard-ready.png) + + [View a larger version of this image](/images/quick-start-slackernews-adm-dashboard-ready.png) + + 1. After a few minutes when the application status is Ready, click **Open SlackerNews** to view SlackerNews in a browser. - ![Admin console dashboard showing ready status](/images/gitea-ec-ready.png) + ![Slackernews landing page](/images/slackernews-landing-page.png) - [View a larger version of this image](/images/gitea-ec-ready.png) + [View a larger version of this image](/images/slackernews-landing-page.png) - Gitea app landing page +1. View telemetry for the instance that you just deployed: - [View a larger version of this image](/images/gitea-app.png) + 1. Return to the Vendor Portal, select the SlackerNews application, and go to **Customers**. Under the name of the customer, confirm that you can see an active instance. -1. Return to the Vendor Portal and go to **Customers**. Under the name of the customer, confirm that you can see an active instance. + ![Slackernews instance on customers page](/images/quick-start-slackernews-customer-instance.png) - This instance telemetry is automatically collected and sent back to the Vendor Portal by both KOTS and the Replicated SDK. For more information, see [About Instance and Event Data](/vendor/instance-insights-event-data). + [View a larger version of this image](/images/quick-start-slackernews-customer-instance.png) -1. Under **Instance ID**, click on the ID to view additional insights including the versions of Kubernetes and the Replicated SDK running in the cluster where you installed the application. For more information, see [Instance Details](/vendor/instance-insights-details). + This instance telemetry is automatically collected and sent back to the Vendor Portal by Embedded Cluster and the Replicated SDK. For more information, see [About Instance and Event Data](/vendor/instance-insights-event-data). + + 1. (Optional) Under **Instance ID**, click on the ID to view additional insights including the versions of Kubernetes and the Replicated SDK running in the cluster where you installed the application. 1. Create a new release that adds preflight checks to the application: - 1. In your local filesystem, go to the `gitea` directory. + 1. In your local filesystem, go to the `quick-start/chart/slackernews` directory. - 1. Create a `gitea-preflights.yaml` file in the `templates` directory: + 1. Create a `preflights.yaml` file in the `templates` directory for the chart: ``` - touch templates/gitea-preflights.yaml + touch templates/preflights.yaml ``` - 1. In the `gitea-preflights.yaml` file, add the following YAML to create a Kubernetes Secret with a simple preflight spec: + 1. In the `preflights.yaml` file, add the following YAML to create a Kubernetes Secret with a simple preflight spec: ```yaml apiVersion: v1 kind: Secret metadata: + name: slackernews-preflight labels: troubleshoot.sh/kind: preflight - name: "{{ .Release.Name }}-preflight-config" stringData: - preflight.yaml: | + preflight.yaml: |- apiVersion: troubleshoot.sh/v1beta2 kind: Preflight metadata: - name: preflight-sample + name: slackernews-preflight spec: collectors: + - clusterInfo: {} + - clusterResources: {} - http: collectorName: slack get: url: https://api.slack.com/methods/api.test + timeout: 20s analyzers: + # verify that slack is accessible - textAnalyze: checkName: Slack Accessible fileName: slack.json @@ -324,41 +482,54 @@ Before you begin, ensure that you have access to a VM that meets the requirement when: "false" message: "Cannot access the Slack API. Check that the server can reach the internet and check [status.slack.com](https://status.slack.com)." ``` + The YAML above defines a preflight check that confirms that an HTTP request to the Slack API at `https://api.slack.com/methods/api.test` made from the cluster returns a successful response of `"status": 200,`. - 1. In the `Chart.yaml` file, increment the version to 1.0.7: + 1. In the `Chart.yaml` file, increment the version to 1.0.1: ```yaml # Chart.yaml - version: 1.0.7 + version: 1.0.1 ``` 1. Update dependencies and package the chart to a `.tgz` chart archive: ```bash - helm package -u . + helm package --dependency-update . ``` - 1. Move the chart archive to the `manifests` directory: + 1. Move the `slackernews-1.0.1.tgz` chart archive to the `manifests` directory: ```bash - mv gitea-1.0.7.tgz manifests + mv slackernews-1.0.1.tgz ../../manifests ``` - 1. In the `manifests` directory, open the KOTS HelmChart custom resource (`gitea.yaml`) and update the `chartVersion`: + 1. Change to the `manifests` directory. + + 1. In the `manifests` directory, open the HelmChart custom resource (`slackernews.yaml`) and update the `chartVersion` to match the new archive: ```yaml - # gitea.yaml KOTS HelmChart - chartVersion: 1.0.7 + # slackernews.yaml HelmChart + chartVersion: 1.0.1 ``` - 1. Remove the chart archive for version 1.0.6 of the Gitea chart from the `manifests` directory: + 1. Remove the unused chart archive for version 1.0.0 from the `manifests` directory: ``` - rm gitea-1.0.6.tgz + rm slackernews-1.0.0.tgz ``` - 1. From the `manifests` directory, create and promote a new release, setting the version label of the release to `0.0.2`: + 1. From the `manifests` directory, lint the release manifests: + + ```bash + replicated release lint --yaml-dir . + ``` + + :::note + If you see a `helm-archive-missing` error, confirm that you have only one chart archive in `manifests` for version 1.0.1, and that the `chartVersion` in the HelmChart resource is also set to `1.0.1`. If you notice that any of the errors are from files in your `.history/` directory, run `rm -rf .history` and then lint the files again. + ::: + + 1. Create and promote a new release, setting the version label of the release to `0.0.2`: ```bash replicated release create --yaml-dir . --promote Unstable --version 0.0.2 @@ -378,32 +549,41 @@ Before you begin, ensure that you have access to a VM that meets the requirement The new version is displayed automatically. - 1. Click **Deploy** next to the new version. + ![Admin console version history tab](/images/quick-start-slackernews-available-updates.png) - The Embedded Cluster upgrade wizard opens. + [View a larger version of this image](/images/quick-start-slackernews-available-updates.png) - 1. In the Embedded Cluster upgrade wizard, on the **Preflight checks** screen, note that the "Slack Accessible" preflight check that you added was successful. Click **Next: Confirm and deploy**. + 1. Click **Deploy** next to the new version. - ![preflight page of the embedded cluster upgrade wizard](/images/quick-start-ec-upgrade-wizard-preflight.png) + The Embedded Cluster upgrade wizard opens. Follow the steps until you see the **Preflight checks** screen. - [View a larger version of this image](/images/quick-start-ec-upgrade-wizard-preflight.png) + 1. On the **Preflight checks** screen, note that the "Slack Accessible" preflight check that you added was successful. Click **Next: Confirm and deploy**. - :::note - The **Config** screen in the upgrade wizard is bypassed because this release does not contain a KOTS Config custom resource. The KOTS Config custom resource is used to set up the Config screen in the KOTS Admin Console. - ::: + ![preflights screen in the upgrade wizard](/images/quick-start-slackernews-preflight.png) + + [View a larger version of this image](/images/quick-start-slackernews-preflight.png) 1. On the **Confirm and Deploy** page, click **Deploy**. -1. Reset and reboot the VM to remove the installation: +1. Clean up the installation: - ```bash - sudo ./APP_SLUG reset - ``` - Where `APP_SLUG` is the unique slug for the application. - - :::note - You can find the application slug by running `replicated app ls` on your local machine. - ::: + * If you created the VM with Compatibility Matrix, delete the VM: + + ```bash + replicated vm rm VM_ID + ``` + Where VM_ID is the ID of the VM. You can run `replicated vm ls` to get the ID. + + * If you brought your own VM, use Embedded Cluster to reset and reboot the VM to remove the installation: + + ```bash + sudo ./APP_SLUG reset + ``` + Where `APP_SLUG` is the unique slug for the application. + + :::note + You can find the application slug by running replicated app ls on your local machine. + ::: ## Next Steps @@ -413,7 +593,7 @@ Congratulations! As part of this quick start, you: * Installed the release on a VM with Embedded Cluster * Viewed telemetry for the installed instance in the Vendor Portal * Created a new release to add preflight checks to the application -* Updated the application from the Admin Console +* Updated the application to the new version using Embedded Cluster Now that you are familiar with the workflow of creating, installing, and updating releases, you can begin onboarding your own application to the Replicated Platform. @@ -423,18 +603,9 @@ To get started, see [Onboard to the Replicated Platform](replicated-onboarding). For more information about the Replicated Platform features mentioned in this quick start, see: -* [About Distributing Helm Charts with KOTS](/vendor/helm-native-about) +* [Embedded Cluster Overview](/vendor/embedded-overview) +* [About Compatibility Matrix](/vendor/testing-about) * [About Preflight Checks and Support Bundles](/vendor/preflight-support-bundle-about) * [About the Replicated SDK](/vendor/replicated-sdk-overview) -* [Introduction to KOTS](/intro-kots) -* [Managing Releases with the CLI](/vendor/releases-creating-cli) -* [Packaging a Helm Chart for a Release](/vendor/helm-install-release) -* [Using Embedded Cluster](/vendor/embedded-overview) - -## Related Tutorials - -For additional tutorials related to this quick start, see: - -* [Deploying a Helm Chart on a VM with Embedded Cluster](/vendor/tutorial-embedded-cluster-setup) -* [Adding Preflight Checks to a Helm Chart](/vendor/tutorial-preflight-helm-setup) -* [Deploying a Helm Chart with KOTS and the Helm CLI](/vendor/tutorial-kots-helm-setup) \ No newline at end of file +* [Manage Releases with the CLI](/vendor/releases-creating-cli) +* [Package a Helm Chart for a Release](/vendor/helm-install-release) \ No newline at end of file diff --git a/static/images/compatibility-matrix-dns-record.png b/static/images/compatibility-matrix-dns-record.png new file mode 100644 index 0000000000..a6fdfba9e9 Binary files /dev/null and b/static/images/compatibility-matrix-dns-record.png differ diff --git a/static/images/compatibility-matrix-edit-vm.png b/static/images/compatibility-matrix-edit-vm.png new file mode 100644 index 0000000000..486a29af11 Binary files /dev/null and b/static/images/compatibility-matrix-edit-vm.png differ diff --git a/static/images/create-customer.png b/static/images/create-customer.png index 59c7f5b767..d001231e9d 100644 Binary files a/static/images/create-customer.png and b/static/images/create-customer.png differ diff --git a/static/images/embedded-cluster-install-dialog-latest.png b/static/images/embedded-cluster-install-dialog-latest.png index 1b21a38e64..abf9d80141 100644 Binary files a/static/images/embedded-cluster-install-dialog-latest.png and b/static/images/embedded-cluster-install-dialog-latest.png differ diff --git a/static/images/quick-start-app-dropdown-slackernews.png b/static/images/quick-start-app-dropdown-slackernews.png new file mode 100644 index 0000000000..323c8c9937 Binary files /dev/null and b/static/images/quick-start-app-dropdown-slackernews.png differ diff --git a/static/images/quick-start-slackernews-adm-dashboard-ready.png b/static/images/quick-start-slackernews-adm-dashboard-ready.png new file mode 100644 index 0000000000..536c239f7d Binary files /dev/null and b/static/images/quick-start-slackernews-adm-dashboard-ready.png differ diff --git a/static/images/quick-start-slackernews-admin-console-login.png b/static/images/quick-start-slackernews-admin-console-login.png new file mode 100644 index 0000000000..aae5f144d0 Binary files /dev/null and b/static/images/quick-start-slackernews-admin-console-login.png differ diff --git a/static/images/quick-start-slackernews-available-updates.png b/static/images/quick-start-slackernews-available-updates.png new file mode 100644 index 0000000000..6ae14b6834 Binary files /dev/null and b/static/images/quick-start-slackernews-available-updates.png differ diff --git a/static/images/quick-start-slackernews-configure-slackernews.png b/static/images/quick-start-slackernews-configure-slackernews.png new file mode 100644 index 0000000000..f3a7b8eabd Binary files /dev/null and b/static/images/quick-start-slackernews-configure-slackernews.png differ diff --git a/static/images/quick-start-slackernews-configure-the-cluster.png b/static/images/quick-start-slackernews-configure-the-cluster.png new file mode 100644 index 0000000000..db389ea904 Binary files /dev/null and b/static/images/quick-start-slackernews-configure-the-cluster.png differ diff --git a/static/images/quick-start-slackernews-customer-install-instructions-button.png b/static/images/quick-start-slackernews-customer-install-instructions-button.png new file mode 100644 index 0000000000..accf0a7d3f Binary files /dev/null and b/static/images/quick-start-slackernews-customer-install-instructions-button.png differ diff --git a/static/images/quick-start-slackernews-customer-instance.png b/static/images/quick-start-slackernews-customer-instance.png new file mode 100644 index 0000000000..2cd9c9284e Binary files /dev/null and b/static/images/quick-start-slackernews-customer-instance.png differ diff --git a/static/images/quick-start-slackernews-preflight.png b/static/images/quick-start-slackernews-preflight.png new file mode 100644 index 0000000000..abe5f57e3a Binary files /dev/null and b/static/images/quick-start-slackernews-preflight.png differ diff --git a/static/images/slackernews-landing-page.png b/static/images/slackernews-landing-page.png new file mode 100644 index 0000000000..9742d8f1aa Binary files /dev/null and b/static/images/slackernews-landing-page.png differ