Skip to content

Commit 1706f8d

Browse files
committed
Move info about port forwarding the SDK API service
1 parent 2de40f5 commit 1706f8d

File tree

5 files changed

+59
-76
lines changed

5 files changed

+59
-76
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
To install the SDK with KOTS, KOTS v1.104.0 or later and the SDK version 1.0.0-beta.12 or later are required. You can verify the version of KOTS installed with `kubectl kots version`.
1+
To install the SDK with a Replicated installer, KOTS v1.104.0 or later and the SDK version 1.0.0-beta.12 or later are required. You can verify the version of KOTS installed with `kubectl kots version`. For Replicated Embedded Cluster installations, you can see the version of KOTS that is installed by your version of Embedded Cluster in the [Embedded Cluster Release Notes](/release-notes/rn-embedded-cluster).

docs/reference/replicated-sdk-apis.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,6 @@ For example, if your application includes a UI where users manage their applicat
66

77
For more information about how to get started with the Replicated SDK, see [About the Replicated SDK (Beta)](/vendor/replicated-sdk-overview).
88

9-
## Use Port Forwarding to Access the SDK API
10-
11-
After the Replicated SDK is installed and initialized in a cluster, the Replicated SDK API is exposed at `replicated:3000`. You can access the SDK API for testing by forwarding port 3000 to your local machine.
12-
13-
To use port forwarding to access the SDK API:
14-
15-
1. Install the SDK in your cluster. See [Installing the Replicated SDK](/vendor/replicated-sdk-installing).
16-
17-
1. Run the following command to port forward to the SDK API service:
18-
19-
```bash
20-
kubectl port-forward service/replicated 3000
21-
```
22-
```
23-
Forwarding from 127.0.0.1:3000 -> 3000
24-
Forwarding from [::1]:3000 -> 3000
25-
```
26-
27-
1. With the port forward running, test the SDK API endpoints as desired. For example:
28-
29-
```bash
30-
curl localhost:3000/api/v1/license/fields/expires_at
31-
curl localhost:3000/api/v1/license/fields/{field}
32-
```
33-
349
## app
3510

3611
### GET /app/info
Lines changed: 50 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,78 @@
11
# Developing Against the SDK API (Beta)
22

3-
This topic describes how to enable integration mode for the Replicated SDK to develop and test changes locally. For more information about the SDK API, see [Replicated SDK API (Beta)](/reference/replicated-sdk-apis).
3+
This topic describes how to use integration mode for the Replicated SDK to develop and test changes locally. For more information about the SDK API, see [Replicated SDK API (Beta)](/reference/replicated-sdk-apis).
44

5-
## About Integration Mode
5+
## Overview
66

77
You can use the Replicated SDK in integration mode to develop locally against the SDK API without needing to make real changes in the Replicated Vendor Portal or in your environment.
88

9-
To use integration mode, install the Replicated SDK as a standalone component using a valid development license created in the Replicated Vendor Portal. After you install in integration mode, the SDK provides default mock data for requests to the SDK API `app` endpoints. Requests to the `license` endpoints use the real data from your development license.
9+
To use integration mode, install the Replicated SDK as a standalone component using a valid development license created in the Vendor Portal. After you install in integration mode, the SDK provides default mock data for requests to the SDK API `app` endpoints. Requests to the `license` endpoints use the real data from your development license.
1010

11-
To use the Replicated SDK in integration mode, complete the following procedures:
12-
1. [Create a Development License](#license)
13-
1. [Install the SDK in integration mode](#install)
11+
To develop against the SDK API:
1412

15-
## Create a Development License {#license}
13+
1. Create a Development license that you can use to install the SDK in integration mode:
1614

17-
To use integration mode, you first need to create a development license that you can use to install the SDK. When you create the development license, you can add values to any license fields that you want to use in testing.
15+
1. In the Vendor Portal, go to **Customers** and click **Create customer**.
1816

19-
For information about development licenses, see [License Types](licenses-about#license-types) in _About Licenses_.
17+
1. Complete the following fields:
18+
19+
1. For **Customer name**, add a name for the customer.
20+
21+
1. For **Assigned channel**, assign the customer to the channel that you use for testing. For example, Unstable.
22+
23+
1. For **Customer type**, select **Development**.
24+
25+
1. For **Customer email**, add the email address that you want to use for the license.
2026

21-
To create a development license:
27+
1. For **Install types**, ensure that the **Existing Cluster (Helm CLI)** option is enabled.
2228

23-
1. In the Vendor Portal, go to **Customers** and click **Create customer**.
29+
1. (Optional) Add any license field values that you want to use for testing:
2430

25-
1. Complete the following fields:
26-
27-
1. For **Customer name**, add a name for the customer.
28-
29-
1. For **Assigned channel**, assign the customer to the channel that you use for testing. For example, Unstable.
30-
31-
1. For **Customer type**, select **Development**.
32-
33-
1. For **Customer email**, add the email address that you want to use for the license.
31+
1. For **Expiration policy**, you can add an expiration date for the license.
3432

35-
![create customer page in the Vendor Portal](/images/create-customer-development-mode.png)
36-
[View a larger version of this image](/images/create-customer-development-mode.png)
33+
1. For **Custom fields**, you can add values for any custom license fields in your application. For information about how to create custom license fields, see [Managing Customer License Fields](/vendor/licenses-adding-custom-fields).
3734

38-
1. (Optional) Add any license field values that you want to use for testing:
35+
1. Click **Save Changes**.
3936

40-
1. For **Expiration policy**, you can add an expiration date for the license.
37+
1. On the **Manage customer** page for the customer you created, click **Helm install instructions**.
4138

42-
1. For **Custom fields**, you can add values for any custom license fields in your application. For information about how to create custom license fields, see [Managing Customer License Fields](/vendor/licenses-adding-custom-fields).
39+
<img alt="Helm install instructions button on the manage customer page" src="/images/helm-install-instructions-button.png" width="700px"/>
4340

44-
1. Click **Save Changes**.
41+
[View a larger version of this image](/images/helm-install-instructions-button.png)
4542

46-
## Install the SDK in Integration Mode {#install}
43+
1. In the **Helm install instructions** dialog, copy and run the command to log in to the Replicated registry.
4744

48-
To develop against the SDK locally in your development environment, install the SDK in integration mode as a standalone component in your cluster.
45+
<img alt="Registry login command in the Helm install instructions dialog" src="/images/helm-install-instructions-registry-login.png" width="600px"/>
4946

50-
To install the SDK in integration mode:
47+
[View a larger version of this image](/images/helm-install-instructions-registry-login.png)
5148

52-
1. On the **Manage customer** page for the customer you created, click **Helm install instructions**.
49+
1. From the same dialog, copy and run the command to install the SDK in integration mode:
5350

54-
![Helm install instructions button on the manage customer page](/images/helm-install-instructions-button.png)
51+
<img alt="SDK integration mode install command in the Helm install instructions dialog" src="/images/helm-install-instructions-sdk-integration.png" width="600px"/>
5552

56-
1. In the **Helm install instructions** dialog, copy and run the command to log in to the Replicated registry.
53+
[View a larger version of this image](/images/helm-install-instructions-sdk-integration.png)
5754

58-
![Registry login command in the Helm install instructions dialog](/images/helm-install-instructions-registry-login.png)
55+
After the Replicated SDK is installed and initialized in a cluster, the Replicated SDK API is exposed at `replicated:3000`. You can access the SDK API for testing by forwarding port 3000 to your local machine.
5956

60-
1. From the same dialog, copy and run the command to install the SDK in integration mode:
57+
1. Run the following command to port forward to the SDK API service:
58+
59+
```bash
60+
kubectl port-forward service/replicated 3000
61+
```
62+
```
63+
Forwarding from 127.0.0.1:3000 -> 3000
64+
Forwarding from [::1]:3000 -> 3000
65+
```
66+
67+
1. With the port forward running, test the SDK API endpoints as desired. For example:
6168

62-
![SDK integration mode install command in the Helm install instructions dialog](/images/helm-install-instructions-sdk-integration.png)
69+
```bash
70+
curl localhost:3000/api/v1/license/fields/expires_at
71+
curl localhost:3000/api/v1/license/fields/{field}
72+
```
73+
74+
For more information about using the SDK API, see [Replicated SDK API (Beta)](/reference/replicated-sdk-apis).
6375

64-
1. Make requests to the SDK API from your application. Requests to the `license` endpoints use your actual development license data, while requests to the `app` endpoints use the default mock data. For more information about using the SDK API, see [Replicated SDK API (Beta)](/reference/replicated-sdk-apis).
76+
:::note
77+
Requests to the `license` endpoints use your actual development license data, while requests to the `app` endpoints use the default mock data.
78+
:::

docs/vendor/replicated-sdk-installing.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import RegistryLogout from "../partials/replicated-sdk/_registry-logout.mdx"
66

77
This topic describes the methods for distributing and installing the Replicated SDK.
88

9-
It includes information about how to install the SDK alongside Helm chart- or standard manifest-based applications using the Helm CLI or Replicated KOTS. It also includes information about installing the SDK separately from an application as a standalone component in integration mode.
9+
It includes information about how to install the SDK alongside Helm charts or Kubernetes manifest-based applications using the Helm CLI or a Replicated installer (Replicated KOTS, kURL, Embedded Cluster). It also includes information about installing the SDK as a standalone component in integration mode.
1010

1111
For information about installing the SDK in air gap mode, see [Installing the SDK in Air Gap Environments](replicated-sdk-airgap).
1212

@@ -65,13 +65,13 @@ To install the SDK as a subchart:
6565
replicated 1/1 1 1 35s
6666
```
6767

68-
## Install the SDK Alongside a Standard Manifest-Based Application
68+
## Install the SDK Alongside a Kubernetes Manifest-Based Application
6969

70-
For applications that use standard Kubernetes manifest files, the SDK Helm chart can be added to a release and then installed by KOTS alongside the application.
70+
For applications that use Kubernetes manifest files instead of Helm charts, the SDK Helm chart can be added to a release and then installed by KOTS alongside the application.
7171

7272
<KotsVerReq/>
7373

74-
To add the SDK Helm chart to a release for a standard manifest-based application:
74+
To add the SDK Helm chart to a release for a Kubernetes manifest-based application:
7575

7676
1. Install the Helm CLI using Homebrew:
7777

@@ -99,7 +99,7 @@ To add the SDK Helm chart to a release for a standard manifest-based application
9999

100100
[View a larger version of this image](/images/sdk-kots-release.png)
101101

102-
1. If one was not created automatically, add a Replicated HelmChart custom resource to the release. HelmChart custom resources have `apiVersion: kots.io/v1beta2` and `kind: HelmChart`.
102+
1. If one was not created automatically, add a KOTS HelmChart custom resource to the release. HelmChart custom resources have `apiVersion: kots.io/v1beta2` and `kind: HelmChart`.
103103

104104
**Example:**
105105

@@ -126,7 +126,7 @@ To add the SDK Helm chart to a release for a standard manifest-based application
126126

127127
1. Save and promote the release to an internal-only channel used for testing, such as the default Unstable channel.
128128

129-
1. Install the release using a Replicated installer (Emebdded Cluster, KOTS, kURL). For more information, see:
129+
1. Install the release using a Replicated installer. For more information, see:
130130
* [Online Installation with Embedded Cluster](/enterprise/installing-embedded)
131131
* [Online Installation in Existing Clusters with KOTS](/enterprise/installing-existing-cluster)
132132
* [Online Installation with kURL](/enterprise/installing-kurl)

sidebars.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ const sidebars = {
508508
'vendor/replicated-sdk-overview',
509509
'vendor/replicated-sdk-installing',
510510
'vendor/replicated-sdk-airgap',
511+
'vendor/replicated-sdk-development',
511512
'vendor/replicated-sdk-customizing',
512513
],
513514
},
@@ -605,14 +606,7 @@ const sidebars = {
605606

606607
// DEVELOPER TOOLS
607608
{type: 'html', value: '<h5>Developer tools</h5>', defaultStyle: true},
608-
{
609-
type: 'category',
610-
label: 'Replicated SDK API (Beta)',
611-
items: [
612-
'reference/replicated-sdk-apis',
613-
'vendor/replicated-sdk-development',
614-
],
615-
},
609+
'reference/replicated-sdk-apis',
616610
{
617611
type: 'category',
618612
label: 'Replicated CLI',

0 commit comments

Comments
 (0)