Skip to content

Commit 58c8442

Browse files
committed
edits
1 parent 6320c87 commit 58c8442

File tree

1 file changed

+40
-124
lines changed

1 file changed

+40
-124
lines changed

docs/vendor/tutorial-helm-cli.mdx

Lines changed: 40 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,29 @@ Before you begin, do the following to set up your environment:
8686

8787
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.
8888

89-
## Get the Chart Archive and Create a Release
89+
### Get the Chart Archive and Create a Release
9090

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

9393
```
9494
curl -O --create-dirs --output-dir tutorial-helm-install https://docs.replicated.com/slackernews-1.0.1.tgz
9595
```
9696

97-
1. Add the chart to a new release with `replicated release create --yaml-dir tutorial-helm-install --promote Unstable`.
97+
1. Add the chart archive to a new release:
9898

99-
## Create a Customer
99+
```bash
100+
replicated release create --yaml-dir tutorial-helm-install --promote Unstable
101+
```
102+
**Example output:**
103+
```
104+
• Reading manifests from . ✓
105+
• Creating Release ✓
106+
• SEQUENCE: 1
107+
• Promoting ✓
108+
• Channel 32q8tKLfRFbHYPGJ1Q2E2vcDQ9j successfully set to release 1
109+
```
110+
111+
### Create a Customer
100112

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

@@ -124,7 +136,7 @@ Before you begin, do the following to set up your environment:
124136

125137
1. Click **Save Changes**.
126138

127-
## Access the Enterprise Portal
139+
### Access the Enterprise Portal
128140

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

@@ -168,146 +180,50 @@ Before you begin, do the following to set up your environment:
168180

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

171-
[View a larger version of this image](/images/enterprise-portal-installation-guide.png)
183+
[View a larger version of this image](/images/enterprise-portal-installation-guide.png)
172184

173185
1. For instance name, enter a nickname for the instance.
174186

175-
1. For **Kubernetes Distribution**, select the distribution of your cluster where you will install SlackerNews.
187+
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**).
176188

177189
1. For **Cluster Network Availability**, select **Outbound requests allowed**.
178190

179191
1. For **Registry Access**, select **My workstation can access the internet, the registry AND the cluster**.
180192

181193
1. Click **Next**.
182194

183-
## Create the Values File
195+
### Install
184196

185-
1. Create a Helm values file to pass to the chart during installation:
197+
1. If you brouhgt your own cluster, set kubectl context to the cluster where you want to install. If you are using Compatibility Matrix, do the following:
186198

187-
```bash
188-
touch my-values.yaml
189-
```
190-
1. In the `my-values.yaml` file, copy and paste the following YAML:
191-
192-
<details>
193-
<summary>View `my-values.yaml`</summary>
194-
```yaml
195-
postgres:
196-
# tells slackernews to use postgres as the
197-
# backing database instead of sqlite
198-
enabled: false
199-
# deploys a postgresql workload to the cluster
200-
deploy_postgres: false
201-
# the password to use with deploy_postgres
202-
password: ""
203-
# if deploy_postgres is false, provide a URI
204-
uri: ""
205-
# use a value in an existing secret instead of
206-
# .postgres.password OR .postgres.uri
207-
existingSecretName: ""
208-
# key in the secret that contains the password
209-
existingSecretPasswordKey: ""
210-
# key in the secret that contains the uri
211-
existingSecretUriKey: ""
212-
# service type if deploy_postgres is true
213-
service:
214-
type: ClusterIP
215-
nodePort:
216-
port:
217-
sqlite:
218-
enabled: true
219-
ingress:
220-
annotations: {}
221-
enabled: false
222-
ingressClassName: ""
223-
nginx:
224-
service:
225-
type: ClusterIP
226-
nodePort:
227-
port:
228-
service:
229-
tls:
230-
enabled: false
231-
existingSecretName: ""
232-
existingSecretCertKey: ""
233-
existingSecretKeyKey: ""
234-
cert: ""
235-
key: ""
236-
slack:
237-
clientId: ""
238-
clientSecret: ""
239-
userToken: ""
240-
botToken: ""
241-
existingSecretName: ""
242-
existingSecretClientIdKey: ""
243-
existingSecretClientSecretKey: ""
244-
existingSecretUserTokenKey: ""
245-
existingSecretBotTokenKey: ""
246-
slackernews:
247-
domain: ""
248-
# set default admin users
249-
adminUserEmails: ""
250-
# display running version on admin dashboard
251-
version: "$TAG"
252-
replicated:
253-
isEmbeddedCluster: false
254-
image:
255-
registry: registry.replicated.com
256-
repository: library/replicated-sdk-image
257-
tag: 1.8.0
258-
images:
259-
pullSecrets:
260-
- name: slackernews-pull-secret
261-
slackernews:
262-
registry: us-docker.pkg.dev
263-
repository: smart-proxy-839/slackernews/slackernews-web
264-
tag: v1.0.36
265-
pullPolicy: IfNotPresent
266-
nginx:
267-
registry: index.docker.io
268-
repository: library/nginx
269-
tag: 1.28.0
270-
pullPolicy: IfNotPresent
271-
postgres:
272-
registry: index.docker.io
273-
repository: library/postgres
274-
tag: 16
275-
pullPolicy: IfNotPresent
276-
```
277-
</details>
278-
279-
1. In the `slackernews.domain` field, enter a hostname.
280-
281-
This is a required value for the application. For the purpose of this tutorial, the value that you provide does not need to be a real hostname. You will use a port forward to access SlackerNews in a browser after installation.
282-
283-
```yaml
284-
# my-values.yaml
285-
slackernews:
286-
domain: "somedomain"
287-
```
199+
1. Create a kind cluster with version 1.34.0 of Kubernetes:
288200

289-
## Install
201+
```bash
202+
replicated cluster create --distribution kind --instance-type r1.small --disk 50 --version 1.34.0
203+
```
290204

291-
1. Set kubectl context to the cluster where you want to install. If you are using Compatibility Matrix, do the following:
205+
1. After the cluster is running, use the kubectl command provided to set your kubectl context to the cluster.
292206

293-
1. Create a kind cluster with version 1.34.0 of Kubernetes:
207+
1. In the Enterprise Portal, for **Helm Online Install**, select the release version that you promoted (`1.0.1`).
294208

295-
```bash
296-
replicated cluster create --distribution kind --instance-type r1.small --disk 50 --version 1.34.0
297-
```
298-
299-
1. After the cluster is running, use the kubectl command provided to set your kubectl context to the cluster.
209+
1. Run the first command to log in to the Replicated registry.
300210

301-
1. In the Enterprise Portal, for **Helm Online Install**, select the release version that you promoted (`0.0.1`).
211+
1. Run the commands to install the preflight plugin and then run preflight checks in the cluster.
302212

303-
1. Copy and run the first command to log in to the Replicated registry.
213+
1. Copy the install command and make the following changes:
214+
* 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.
215+
* Add `--namespace slackernews --create-namespace` to install the application to the slackernews namespace on the cluster
304216

305-
1. Copy and run the commands to install and run preflight checks in the cluster.
217+
1. Watch the application resources become available:
306218

307-
1. Run the install command to install SlackerNews in your cluster using the Helm CLI. Ensure that the path provided with the `--values` flag points to the `my-values.yaml` file that you created.
219+
```bash
220+
kubectl get all --namespace slackernews --watch
221+
```
308222

309-
1. Run `kubectl get all -n slackernews` to see when services are running
223+
1. Run the following command to port forward the slackernews NGINX service to local port 8080:
310224

311-
1. Run `kubectl port-forward --namespace slackernews svc/slackernews-nginx 8080:80` to port forward
225+
```bash
226+
kubectl port-forward --namespace slackernews svc/slackernews-nginx 8080:8080
227+
```
312228

313-
1. Open `localhost:8080` in a browser.
229+
1. Open `localhost:8080` in a browser to view the SlackerNews application and confirm that the installation was successful.

0 commit comments

Comments
 (0)