Skip to content

Commit b87b837

Browse files
authored
Merge pull request #2830 from replicatedhq/116024
Add EC --config-values flag and update automated install docs
2 parents b7919bc + 1a14a45 commit b87b837

12 files changed

+144
-74
lines changed

docs/enterprise/installing-existing-cluster-automation.mdx

Lines changed: 71 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,55 +13,50 @@ import PushKotsImages from "../partials/install/_push-kotsadm-images.mdx"
1313
import KotsVersionMatch from "../partials/install/_kots-airgap-version-match.mdx"
1414
import PlaceholderRoCreds from "../partials/install/_placeholder-ro-creds.mdx"
1515

16-
# Installing with the CLI
16+
# Installing from the Command Line
1717

18-
This topic describes how to use the Replicated KOTS CLI to install an application.
18+
This topic describes how to install an application with Replicated KOTS, Replicated Embedded Cluster, or Replicated kURL from the command line.
1919

2020
## Overview
2121

22-
You can use the KOTS CLI to install an application rather than using the KOTS Admin Console UI. In a CLI installation, you provide all the necessary artifacts to configure and install the application with the `kots install` command. For example, rather than uploading your license file in the Admin Console, you provide your license file with the `kots install` command using the `--license-file` flag. Additionally, any preflight checks defined for the application automatically run from the CLI rather than being displayed in the Admin Console.
22+
You can use the command line to install an application with Replicated KOTS, Replicated Embedded Cluster, or Replicated kURL. A common use case for installing from the command line is to automate installation, such as performing headless installations as part of CI/CD pipelines.
2323

24-
The following shows an example of the output from the `kots install` command:
24+
To install from the command line, you provide all the necessary installation assets, such as the license file and the application config values, with the installation command rather than through the Admin Console UI. Any preflight checks defined for the application run automatically during headless installations from the command line rather than being displayed in the Admin Console.
2525

26-
```bash
27-
• Deploying Admin Console
28-
• Creating namespace ✓
29-
• Waiting for datastore to be ready ✓
30-
• Waiting for Admin Console to be ready ✓
31-
• Waiting for installation to complete
32-
• Waiting for preflight checks to complete
33-
34-
• Press Ctrl+C to exit
35-
• Go to http://localhost:8800 to access the Admin Console
36-
37-
• Go to http://localhost:8888 to access the application
38-
```
26+
## Prerequisite
3927

40-
One common use case for installing with the CLI is to automate installation, such as installing applications as part of CI/CD pipelines. CLI installations are supported for _online_ environments (with outbound internet access), _air gap_ environments (without outbound internet access), existing clusters, and clusters created with Replicated kURL on a VM or bare metal server.
28+
Create a ConfigValues YAML file to define the configuration values for the application release. You will pass the ConfigValues file with the installation command. For air-gapped environments, ensure that the ConfigValues file can be accessed from the installation environment.
4129

42-
For more information about the advanced options for the `kots install` command, see [install](/reference/kots-cli-install) in the KOTS CLI documentation.
30+
For more information, see [Generating a ConfigValues File](/vendor/releases-configvalues).
4331

44-
For a tutorial that demonstrates how to install a sample application using the KOTS CLI, see [Install with KOTS in an Existing Cluster](/vendor/tutorial-cli-setup).
32+
**Example:**
4533

46-
## Limitation
34+
<ConfigValuesExample/>
35+
36+
## Install
4737

48-
[Replicated Embedded Cluster](/vendor/embedded-overview) does not support automated, or _headless_, installations with the KOTS CLI.
38+
### Embedded Cluster
4939

50-
## Prerequisite
40+
To install with Embedded Cluster in an online environment:
5141

52-
Create a ConfigValues YAML file to define the configuration settings for the application. For air gap environments, ensure that you can access the ConfigValues file that you create from your installation environment.
42+
1. Follow the steps provided in the Vendor Portal to download and untar the Embedded Cluster installation assets. For more information, see [Online Installation with Embedded Cluster](/enterprise/installing-embedded).
5343

54-
A ConfigValues file includes the names of the configuration fields for the application along with a user-supplied `value` for each field. The ConfigValues file is specific to the application. For more information, see [Generating a ConfigValues File](/vendor/releases-configvalues).
44+
1. Run the following command to install:
5545

56-
**Example:**
46+
```bash
47+
sudo ./APP_SLUG install --license-file PATH_TO_LICENSE \
48+
--config-values PATH_TO_CONFIGVALUES \
49+
--admin-console-password ADMIN_CONSOLE_PASSWORD
50+
```
5751

58-
<ConfigValuesExample/>
59-
60-
## Install
52+
Replace:
53+
* `APP_SLUG` with the unique slug for the application.
54+
* `LICENSE_FILE` with the customer license.
55+
* `ADMIN_CONSOLE_PASSWORD` with a password for accessing the Admin Console.
56+
* `PATH_TO_CONFIGVALUES` with the path to the ConfigValues file. See [Generating a ConfigValues File](/vendor/releases-configvalues).
6157

62-
This section provides the steps for installing an application with the KOTS CLI in different types of environments.
6358

64-
### Existing Cluster
59+
### KOTS in an Existing Cluster
6560

6661
To install with KOTS in an existing cluster:
6762

@@ -83,7 +78,23 @@ To install with KOTS in an existing cluster:
8378

8479
<PlaceholderNamespaceExisting/>
8580

86-
### kURL Cluster
81+
The following shows an example of the output from the kots install command:
82+
83+
```
84+
• Deploying Admin Console
85+
• Creating namespace ✓
86+
• Waiting for datastore to be ready ✓
87+
• Waiting for Admin Console to be ready ✓
88+
• Waiting for installation to complete ✓
89+
• Waiting for preflight checks to complete ✓
90+
91+
• Press Ctrl+C to exit
92+
• Go to http://localhost:8800 to access the Admin Console
93+
94+
• Go to http://localhost:8888 to access the application
95+
```
96+
97+
### kURL
8798

8899
<IntroEmbedded/>
89100

@@ -112,9 +123,33 @@ To install with kURL on a VM or bare metal server:
112123

113124
<PlaceholderNamespaceEmbedded/>
114125

115-
### Air Gap Existing Cluster
126+
## Air Gap Install
127+
128+
### Embedded Cluster
129+
130+
To install with Embedded Cluster in an air-gapped environment:
131+
132+
1. Follow the steps provided in the Vendor Portal to download and untar the Embedded Cluster air gap installation assets. For more information, see [Air Gap Installation with Embedded Cluster](/enterprise/installing-embedded-air-gap).
133+
134+
1. Ensure that the Embedded Cluster installation assets are available on the air-gapped machine, then run the following command to install:
135+
136+
```bash
137+
sudo ./APP_SLUG install --license-file PATH_TO_LICENSE \
138+
--config-values PATH_TO_CONFIGVALUES \
139+
--admin-console-password ADMIN_CONSOLE_PASSWORD \
140+
--airgap-bundle PATH_TO_AIRGAP_BUNDLE
141+
```
142+
143+
Replace:
144+
* `APP_SLUG` with the unique slug for the application.
145+
* `LICENSE_FILE` with the customer license.
146+
* `PATH_TO_CONFIGVALUES` with the path to the ConfigValues file. See [Generating a ConfigValues File](/vendor/releases-configvalues).
147+
* `ADMIN_CONSOLE_PASSWORD` with a password for accessing the Admin Console.
148+
* `PATH_TO_AIRGAP_BUNDLE` with the path to the Embedded Cluster `.airgap` bundle for the release.
149+
150+
### KOTS in an Existing Cluster
116151

117-
To install with KOTS in an air gap existing cluster:
152+
To install with KOTS in an air-gapped existing cluster:
118153

119154
1. <InstallKotsCliAirGap/>
120155

@@ -149,11 +184,11 @@ To install with KOTS in an air gap existing cluster:
149184

150185
<PlaceholderRoCreds/>
151186

152-
### Air Gap kURL Cluster
187+
### kURL
153188

154189
<IntroEmbedded/>
155190

156-
To install in an air gap kURL cluster on a VM or bare metal server:
191+
To install in an air-gapped kURL cluster:
157192

158193
1. Download the kURL `.tar.gz` air gap bundle:
159194

docs/enterprise/installing-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ For information about image registry requirements, see [Private Registry Require
4848

4949
You can automate application installation in online, air gap, existing cluster, and embedded cluster environments using the KOTS CLI. In an automated installation, you provide all the information required to install and deploy the application with the `kots install` command, rather than providing this information in the Replicated Admin Console.
5050

51-
For more information, see [Installing with Automation](/enterprise/installing-existing-cluster-automation).
51+
For more information, see [Installing from the Command Line](/enterprise/installing-existing-cluster-automation).
5252

5353
### KOTS Installations Without Object Storage
5454

docs/intro-kots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ The kots command-line interface (CLI) is a kubectl plugin. Customers can run com
7070

7171
For information about getting started with the KOTS CLI, see [Installing the KOTS CLI](/reference/kots-cli-getting-started).
7272

73-
The KOTS CLI can also be used to install an application without needing to access the Admin Console. This can be useful for automating installations and upgrades. For information about how to run automated installations with the KOTS CLI, see [Installing with the CLI](/enterprise/installing-existing-cluster-automation).
73+
The KOTS CLI can also be used to install an application without needing to access the Admin Console. This can be useful for automating installations and upgrades, such as in CI/CD pipelines. For information about how to perform headless installations from the command line, see [Installing from the Command Line](/enterprise/installing-existing-cluster-automation).

docs/reference/embedded-cluster-install.mdx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ sudo ./APP_SLUG install --license LICENSE_FILE [flags]
4545
<p>**Requirement**: Embedded Cluster 1.16.0 or later.</p>
4646
</td>
4747
</tr>
48+
<tr>
49+
<td>`--config-values`</td>
50+
<td>
51+
<p>Path to the ConfigValues file for the application. The ConfigValues file can be used to pass the application configuration values from the command line during installation, such as when performing automated installations as part of CI/CD pipelines. For more information about generating the ConfigValues file for a release, see [Generating a ConfigValues File](/vendor/releases-configvalues).</p>
52+
<p><strong>Requirement:</strong> Embedded Cluster 1.18.0 and later.</p>
53+
</td>
54+
</tr>
4855
<tr>
4956
<td>`--data-dir`</td>
5057
<td>
@@ -115,13 +122,13 @@ sudo ./APP_SLUG install --license LICENSE_FILE [flags]
115122
### Air Gap Install
116123

117124
```bash
118-
sudo ./myapp install --license license.yaml --airgap-bundle myapp.airgap
125+
sudo ./my-app install --license license.yaml --airgap-bundle myapp.airgap
119126
```
120127

121128
### Change the Admin Console and LAM Ports
122129

123130
```bash
124-
sudo ./myapp install --license license.yaml --admin-console-port=20000 --local-artifact-mirror-port=40000
131+
sudo ./my-app install --license license.yaml --admin-console-port=20000 --local-artifact-mirror-port=40000
125132
```
126133

127134
### Change the Data Directory
@@ -130,6 +137,14 @@ sudo ./myapp install --license license.yaml --admin-console-port=20000 --local-a
130137
sudo ./my-app install --license license.yaml --data-dir /data/embedded-cluster
131138
```
132139

140+
### Headless (Automated) Install
141+
142+
```bash
143+
sudo ./my-app install --license license.yaml \
144+
--config-values configvalues.yaml \
145+
--admin-console-password password
146+
```
147+
133148
### Install Behind a Proxy
134149

135150
```bash
@@ -146,7 +161,7 @@ Where:
146161
### Install Behind an MITM Proxy
147162

148163
```bash
149-
sudo ./APP_SLUG install --license license.yaml --private-ca /path/to/private-ca-bundle \
164+
sudo ./my-app install --license license.yaml --private-ca /path/to/private-ca-bundle \
150165
--http-proxy=http://10.128.0.0:3300 \
151166
--https-proxy=http://10.128.0.0:3300 \
152167
--no-proxy=123.89.46.4,10.96.0.0/16,*.example.com

docs/reference/kots-cli-install.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ This command supports all [global flags](kots-cli-global-flags) and also:
5757
<tr>
5858
<td><code>--config-values</code></td>
5959
<td>string</td>
60-
<td>Path to a manifest file containing configuration values. This manifest must be <code>apiVersion: kots.io/v1beta1</code> and <code>kind: ConfigValues</code>. For more information, see <a href="/enterprise/installing-existing-cluster-automation">Installing with the CLI</a>.</td>
60+
<td>Path to a manifest file containing configuration values. This manifest must be <code>apiVersion: kots.io/v1beta1</code> and <code>kind: ConfigValues</code>. For more information, see <a href="/enterprise/installing-existing-cluster-automation">Installing from the Command Line</a>.</td>
6161
</tr>
6262
<tr>
6363
<td><code>--copy-proxy-env</code></td>

docs/vendor/embedded-overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Embedded Cluster has the following limitations:
5555

5656
* **Changing node hostnames is not supported**: After a host is added to a Kubernetes cluster, Kubernetes assumes that the hostname and IP address of the host will not change. If you need to change the hostname or IP address of a node, you must first remove the node from the cluster. For more information about the requirements for naming nodes, see [Node name uniqueness](https://kubernetes.io/docs/concepts/architecture/nodes/#node-name-uniqueness) in the Kubernetes documentation.
5757

58-
* **Automated installations not supported**: Users cannot do automated (headless) Embedded Cluster installations because it is not possible to configure the application by passing the [ConfigValues](/vendor/releases-configvalues) file with the installation command. Embedded Cluster installations require that the application is configured from the Admin Console config screen. For more information about automating existing cluster or kURL installations with the KOTS CLI, see [Installing with the CLI](/enterprise/installing-existing-cluster-automation).
58+
* **Automated installations not supported**: Users cannot do automated (headless) Embedded Cluster installations because it is not possible to configure the application by passing the [ConfigValues](/vendor/releases-configvalues) file with the installation command. Embedded Cluster installations require that the application is configured from the Admin Console config screen. For more information about automating existing cluster or kURL installations with the KOTS CLI, see [Installing from the Command Line](/enterprise/installing-existing-cluster-automation).
5959

6060
* **Automatic updates not supported**: Configuring automatic updates from the Admin Console so that new versions are automatically deployed is not supported for Embedded Cluster installations. For more information, see [Configuring Automatic Updates](/enterprise/updating-apps).
6161

docs/vendor/packaging-rbac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ The following limitations apply when using the `requireMinimalRBACPrivileges` or
108108

109109
In non-headless installations in air gap environments, KOTS does not have access to the application's `.airgap` package during installation. This means that KOTS does not have the information required to determine whether namespace-scoped access is needed, so it defaults to the more permissive, default cluster-scoped RBAC policy.
110110

111-
For more information about how to do headless installations in air gap environments, see [Air Gap Existing Cluster](/enterprise/installing-existing-cluster-automation#air-gap-existing-cluster) in _Installing with the CLI_.
111+
For more information about how to do headless installations in air gap environments, see [Air Gap Install](/enterprise/installing-existing-cluster-automation#air-gap-install) in _Installing from the Command Line_.
112112

113113
* **Changing RBAC permissions for installed instances**: The RBAC permissions for KOTS are set during its initial installation. KOTS runs using the assumed identity and cannot change its own authorization. When you update your application to add or remove the `requireMinimalRBACPrivileges` and `supportMinimalRBACPrivileges` flags in the Application custom resource, the RBAC permissions for KOTS are affected only for new installations. Existing KOTS installations continue to run with their current RBAC permissions.
114114

0 commit comments

Comments
 (0)