Skip to content

Commit 987747f

Browse files
committed
edits
1 parent d9a86a3 commit 987747f

File tree

5 files changed

+147
-67
lines changed

5 files changed

+147
-67
lines changed

docs/vendor/tutorial-helm-cli.mdx

Lines changed: 147 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import Requirements from "../partials/embedded-cluster/_requirements.mdx"
44

55
# Install SlackerNews with the Helm CLI
66

7-
This topic provides a tutorial that demonstrates how to install a sample application using the Helm CLI.
7+
This tutorial demonstrates how to install an application distributed with Replicated using the Helm CLI.
88

99
## Introduction
1010

11-
This tutorial shows how to install a Helm chart distributed with Replicated using the Helm CLI.
12-
1311
In this tutorial, you will:
1412

15-
* Download the Helm chart for the sample application (SlackerNews)
13+
* Download the sample Helm chart (SlackerNews)
1614

1715
* Create a release for SlackerNews in the Replicated Platform
1816

@@ -24,73 +22,80 @@ In this tutorial, you will:
2422

2523
Before you begin, do the following to set up your environment:
2624

27-
* Install the Helm CLI, which is the tool for interacting with Helm and managing Helm charts. See [Install Helm](/vendor/environment-setup#install-helm).
25+
* Install the Helm CLI, which is the tool for interacting with Helm and managing Helm charts. See [Install Helm](/vendor/environment-setup#install-helm) in _Set Up Your Environment_.
2826

29-
* Ensure that you have access to a cluster that meets the requirements for Embedded Cluster:
27+
* Ensure that you have access to a Kubernetes cluster where you can test the installation using the Helm CLI:
3028

3129
* **Option 1: Use Compatibility Matrix.** To use Replicated Compatibility Matrix to create a cluster for this tutorial, first 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).
3230

3331
:::note
3432
If you are new to the Replicated platform, you might be eligible for $100 in free Compatibility Matrix credits. To request your free credits, reach out to our sales team at https://www.replicated.com/contact and note in the comments that you are completing a Replicated tutorial.
3533
:::
3634

37-
After you complete the prerequisites above, continue to the [Tutorial](#tutorial). You will create the cluster with Compatibility Matrix as part of the tutorial.
35+
After you complete the prerequisites described above, continue to the [Tutorial](#tutorial). You will create the cluster with Compatibility Matrix as part of the tutorial.
3836

39-
* **Option 2: Bring your own Cluster.**
37+
* **Option 2: Bring your own Cluster.** You can use any cloud provider or tool that you prefer to create a cluster, such as Google Kubernetes Engine (GKE) or minikube.
4038

4139
For more information, see [Set Up Development Environments for Testing](/vendor/environment-setup#dev).
4240

4341
## Tutorial
4442

45-
1. Create an application using the Replicated CLI:
43+
### Create an Application
4644

47-
1. On your local machine, install the Replicated CLI:
45+
Create a SlackerNews application in the Replicated Platform:
4846

49-
* MacOS
47+
1. On your local machine, install the Replicated CLI:
5048

51-
```bash
52-
brew install replicatedhq/replicated/cli
53-
```
54-
* Linux / Windows Subsystem for Linux (WSL)
49+
* MacOS
5550

56-
```bash
57-
version=$(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
58-
| grep -m1 -Po '"tag_name":\s*"v\K[^"]+')
59-
curl -Ls \
60-
"https://github.com/replicatedhq/replicated/releases/download/v${version}/replicated_${version}_linux_amd64.tar.gz" \
61-
-o replicated.tar.gz
62-
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
63-
mv replicated /usr/local/bin/replicated
64-
```
65-
For more information and additional installation options, see [Install the Replicated CLI](/reference/replicated-cli-installing).
51+
```bash
52+
brew install replicatedhq/replicated/cli
53+
```
54+
* Linux / Windows Subsystem for Linux (WSL)
6655

67-
1. Authorize the Replicated CLI:
56+
```bash
57+
version=$(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
58+
| grep -m1 -Po '"tag_name":\s*"v\K[^"]+')
59+
curl -Ls \
60+
"https://github.com/replicatedhq/replicated/releases/download/v${version}/replicated_${version}_linux_amd64.tar.gz" \
61+
-o replicated.tar.gz
62+
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
63+
mv replicated /usr/local/bin/replicated
64+
```
65+
For more information and additional installation options, see [Install the Replicated CLI](/reference/replicated-cli-installing).
66+
67+
1. Authorize the Replicated CLI:
6868

69-
```bash
70-
replicated login
71-
```
72-
In the browser window that opens, follow the prompt to log in to your Vendor Portal account and authorize the CLI.
69+
```bash
70+
replicated login
71+
```
72+
In the browser window that opens, follow the prompt to log in to your Vendor Portal account and authorize the CLI.
7373

74-
1. Create an application named `SlackerNews`:
74+
1. Create an application named SlackerNews:
7575

76-
```bash
77-
replicated app create SlackerNews
78-
```
76+
```bash
77+
replicated app create "SlackerNews"
78+
```
79+
:::note
80+
If you already have an application named SlackerNews in your Vendor Portal team, you can add a qualifier to the name. For example, "SlackerNews Tutorial" or "SlackerNews YOUR_NAME".
81+
:::
82+
83+
1. Set the `REPLICATED_APP` environment variable to the slug of the application that you created:
7984

80-
1. Set the `REPLICATED_APP` environment variable to the application that you created:
85+
```bash
86+
export REPLICATED_APP=APP_SLUG
87+
```
88+
Where `APP_SLUG` is the unique application slug provided in the output of the `replicated app create` or `replicated app ls` commands.
8189

82-
```bash
83-
export REPLICATED_APP=APP_SLUG
84-
```
85-
Where `APP_SLUG` is the unique application slug provided in the output of the `app create` command.
90+
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.
8691

87-
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.
92+
### Get the Chart Archive and Create a Release
8893

89-
### Get the Chart Archive and Create a Release
94+
Download the chart archive for SlackerNews version 1.0.1, then add the archive to a new release in the Replicated Platform:
9095

9196
1. Run the following command to download the SlackerNews Helm chart archive to a new `tutorial-helm-install` directory:
9297

93-
```
98+
```bash
9499
curl -O --create-dirs --output-dir tutorial-helm-install https://docs.replicated.com/slackernews-1.0.1.tgz
95100
```
96101

@@ -108,17 +113,45 @@ Before you begin, do the following to set up your environment:
108113
• Channel 32q8tKLfRFbHYPGJ1Q2E2vcDQ9j successfully set to release 1
109114
```
110115

111-
### Create a Customer
116+
### Customize the Enterprise Portal
117+
118+
Customize the look and feel of the Enterprise Portal for the SlackerNews application:
112119

113120
1. Log in to the [Vendor Portal](https://vendor.replicated.com).
114121

115122
1. Under the application drop down, select the SlackerNews application that you created.
116123

117-
<img alt="App drop down" src="/images/quick-start-app-dropdown-slackernews.png" width="250px"/>
124+
<img alt="App drop down" src="/images/quick-start-app-dropdown-slackernews.png" width="250px"/>
125+
126+
[View a larger version of this image](/images/quick-start-app-dropdown-slackernews.png)
127+
128+
1. In the left navigation panel, click **Enterprise Portal**.
129+
130+
1. On the **Enterprise Portal > Settings** tab, scroll down to the **Colors** section.
131+
132+
1. For **Primary**, enter `#fd9431`. For **Secondary**, enter `#297372`. Click **Save**.
133+
134+
![Enterprise Portal color settings](/images/enterprise-portal-settings-colors.png)
118135

119-
[View a larger version of this image](/images/quick-start-app-dropdown-slackernews.png)
136+
[View a larger version of this image](/images/enterprise-portal-settings-colors.png)
120137

121-
1. Click **Customers > Create customer**.
138+
1. Go to the **Knowledge base** tab. For **Helm Post-Install Instructions**, enter the following markdown:
139+
140+
```mdx
141+
Congratulations! For more information about getting started with SlackerNews, see the docs at [https://docs.slackernews.io/](https://docs.slackernews.io/).
142+
```
143+
144+
![Enterprise Portal install instructions settings](/images/enterprise-portal-settings-post-install.png)
145+
146+
[View a larger version of this image](/images/enterprise-portal-settings-post-install.png)
147+
148+
1. Click **Save Changes**.
149+
150+
### Create a Customer
151+
152+
Create a test customer:
153+
154+
1. In the Vendor Portal, go to **Customers > Create customer**.
122155

123156
The **Create a new customer** page opens:
124157

@@ -128,6 +161,8 @@ Before you begin, do the following to set up your environment:
128161

129162
1. For **Customer name**, enter a name for the customer. For example, `Example Customer`.
130163

164+
1. For **Customer email**, enter an email address. This email address is only used as a username for authenticating with the Replicated registry and is never contacted. A customer email address is required for Helm CLI installations.
165+
131166
1. For **Assigned Channel**, select **Unstable**. This allows the customer to install releases promoted to the Unstable channel.
132167

133168
1. For **Customer type**, select **Development**.
@@ -136,45 +171,53 @@ Before you begin, do the following to set up your environment:
136171

137172
1. Click **Save Changes**.
138173

139-
### Access the Enterprise Portal
174+
### Access the Customer's Enterprise Portal
175+
176+
Log in to the Enterprise Portal for the customer to get the Helm CLI installation instructions:
140177

141178
1. On the customer's page, go to the **Enterprise Portal Access** tab.
142179

143180
1. Enable the **Enable Enterprise Portal for this customer** toggle.
144181

145-
![enterprise portal toggle enabled](/images/customer-enterprise-portal-access-toggle.png)
182+
![enterprise portal toggle enabled](/images/customer-enterprise-portal-access-toggle.png)
146183

147-
[View a larger version of this image](/images/customer-enterprise-portal-access-toggle.png)
184+
[View a larger version of this image](/images/customer-enterprise-portal-access-toggle.png)
148185

149-
:::note
150-
The Enterprise Portal is beta. By default, customers are assigned access to the Replicated Download Portal. For more information, see [Comparison to the Download Portal](/vendor/enterprise-portal-about#comparison-to-the-download-portal) in _About the Enterprise Portal_.
151-
:::
186+
:::note
187+
The Enterprise Portal is beta. By default, customers have access to the Replicated Download Portal. For more information, see [Comparison to the Download Portal](/vendor/enterprise-portal-about#comparison-to-the-download-portal) in _About the Enterprise Portal_.
188+
:::
152189

153-
1. In the **Invite users** dialog, click Cancel to close the dialog.
190+
1. In the **Invite users** dialog that opens automatically, click **Cancel** to close the dialog.
154191

155-
For your production application, this is where you would invite your customers to access the Enterprise Portal.
192+
For your production application, this is where you could send initations to customers so they can access the Enterprise Portal.
156193

157194
1. Click **Login to portal** to generate a one-time login and open the Enterprise Portal for the customer.
158195

196+
![Login to portal button](/images/enterprise-portal-one-time-login.png)
197+
198+
[View a larger version of this image](/images/enterprise-portal-one-time-login.png)
199+
159200
The Enterprise Portal dashboard opens.
160201

161-
1. In the Enterprise Portal, go to the **Install** tab.
202+
1. Go to the Enterprise Portal **Install** tab.
162203

163204
![install tab](/images/enterprise-portal-install-tab.png)
164205

165206
[View a larger version of this image](/images/enterprise-portal-install-tab.png)
166207

167208
1. On the **Installation Guide** page, if multiple installation options are displayed, select **Helm**.
168209

169-
The installation options that are displayed in the Enterprise Portal depend on the **Install types** options that you enabled for the customer.
210+
:::note
211+
The installation options that are displayed in the Enterprise Portal depend on the **Install types** enabled for the customer.
212+
:::
170213

171214
![installation guide landing page](/images/enterprise-portal-installation-guide.png)
172215

173216
[View a larger version of this image](/images/enterprise-portal-installation-guide.png)
174217

175-
1. For instance name, enter any nickname for the instance.
218+
1. For **Instance Name**, enter a nickname for the instance.
176219

177-
1. For **Kubernetes Distribution**, select the distribution of your cluster where you will install SlackerNews. If you are going to use Compatibility Matrix to create the cluster, select **Vanilla Kubernetes**.
220+
1. For **Kubernetes Distribution**, select the distribution of the cluster where you will install SlackerNews. If you are going to use Compatibility Matrix to create the cluster, select **Vanilla Kubernetes**.
178221

179222
1. For **Cluster Network Availability**, select **Outbound requests allowed**.
180223

@@ -184,6 +227,8 @@ Before you begin, do the following to set up your environment:
184227

185228
### Install
186229

230+
Install SlackerNews in a cluster:
231+
187232
1. If you brought your own cluster, set kubectl context to the cluster where you want to install. If you are using Compatibility Matrix, do the following:
188233

189234
1. Create a kind cluster with version 1.34.0 of Kubernetes:
@@ -192,28 +237,63 @@ Before you begin, do the following to set up your environment:
192237
replicated cluster create --distribution kind --instance-type r1.small --disk 50 --version 1.34.0
193238
```
194239

195-
1. After the cluster is running, use the kubectl command provided to set your kubectl context to the cluster.
240+
1. Watch for the cluster to have a `running` status:
241+
242+
```bash
243+
replicated cluster ls --watch
244+
```
245+
246+
1. After the cluster status is `running`, use the kubectl command provided to set your kubectl context to the cluster.
247+
248+
```bash
249+
replicated cluster shell CLUSTER_ID
250+
```
251+
Where `CLUSTER_ID` is the ID of the cluster provided in the output of `replicated cluster ls`.
196252

197-
1. In the Enterprise Portal, for **Helm Online Install**, select the release version that you promoted (`1.0.1`).
253+
:::note
254+
You can also copy the shell command for the cluster from the **Compatibility Matrix** page in the Vendor Portal.
255+
:::
198256

199-
1. Run the command to log in to the Replicated registry.
257+
1. Go back to the Enterprise Portal. On the **Helm Online Install** page of the install wizard, for **Select a version**, ensure that the version you promoted (`1.0.1`) is selected.
200258

201-
1. Run the next command to install the preflight plugin and run preflight checks.
259+
1. For **Export credential and log in**, run the command to log in to the Replicated registry.
202260

203-
1. Copy the install command and make the following changes:
204-
* Remove the `--values my-values.yaml` flag. This is not necessary for the purpose of this tutorial because you do not need to pass a local values file to the chart.
261+
1. Run the next command to install the preflight plugin.
262+
263+
1. Run preflight checks against the cluster.
264+
265+
1. Skip the **Create values override file** step. This is not necessary for the purpose of this tutorial because you do not need to pass a local values file to the chart.
266+
267+
1. Copy the install command provided and make the following changes:
268+
* Remove the `--values my-values.yaml` flag.
205269
* Add `--namespace slackernews --create-namespace` to install the application in the slackernews namespace.
206270

207-
1. Watch the application resources become available:
271+
**Example:**
272+
273+
```bash
274+
helm install slackernews oci://registry.replicated.com/slackernews/unstable/slackernews --version 1.0.1 --namespace slackernews --create-namespace
275+
```
276+
277+
1. Watch the SlackerNews deployment:
208278

209279
```bash
210280
kubectl get all --namespace slackernews --watch
211281
```
212282

213-
1. Run the following command to port forward the slackernews NGINX service to local port 8080:
283+
1. When the installation is complete and the `slackernews-nginx` service is running, run the following command to port forward the service to local port 8080:
214284

215285
```bash
216286
kubectl port-forward --namespace slackernews svc/slackernews-nginx 8080:8080
217287
```
218288

219-
1. Open `localhost:8080` in a browser to view the SlackerNews application and confirm that the installation was successful.
289+
1. In a browser, go to `localhost:8080`. The SlackerNews application landing page opens.
290+
291+
![SlackerNews landing page page](/images/slackernews-landing-page.png)
292+
293+
[View a larger version of this image](/images/slackernews-landing-page.png)
294+
295+
1. Go back to the **Helm Online Install** wizard in the Enterprise Portal and click **Continue**. On the **Installation Complete** page, you can see the post-installation message that you set.
296+
297+
![Installation Complete page](/images/enterprise-portal-post-installation.png)
298+
299+
[View a larger version of this image](/images/enterprise-portal-post-installation.png)
17.5 KB
Loading
39 KB
Loading
12.3 KB
Loading
34.7 KB
Loading

0 commit comments

Comments
 (0)