Skip to content

Commit 6c30ad9

Browse files
Merge pull request #1088 from crawford/customize
docs: add initial customization docs
2 parents 1da840a + a406f47 commit 6c30ad9

File tree

3 files changed

+126
-1
lines changed

3 files changed

+126
-1
lines changed

docs/user/aws/customization.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# AWS Platform Customization
2+
3+
The following options are available when using AWS:
4+
5+
- `machines.platform.aws.iamRoleName` - the IAM role that will be assigned to the machines of this pool
6+
- `machines.platform.aws.rootVolume.iops` - the reserved IOPS of the root volume
7+
- `machines.platform.aws.rootVolume.size` - the size (in GiB) of the root volume
8+
- `machines.platform.aws.rootVolume.type` - the storage type of the root volume
9+
- `machines.platform.aws.type` - the EC2 instance type
10+
- `machines.platform.aws.zones` - a list of the availability zones that the installer will use when creating machines of this pool
11+
- `platform.aws.region` - the AWS region that the installer will use when creating resources
12+
- `platform.aws.userTags` - a map of keys and values that the installer will add as tags to all resources it creates
13+
14+
## Examples
15+
16+
An example `install-config.yaml` is shown below. This configuration has been modified to show the customization that is possible via the install config.
17+
18+
```yaml
19+
apiVersion: v1beta1
20+
baseDomain: example.com
21+
machines:
22+
- name: master
23+
platform:
24+
aws:
25+
zones:
26+
- us-west-2a
27+
- us-west-2b
28+
replicas: 3
29+
- name: worker
30+
platform:
31+
aws:
32+
iamRoleName: elastictranscoder-access
33+
rootVolume:
34+
iops: 4000
35+
size: 500
36+
type: io1
37+
type: c5.9xlarge
38+
zones:
39+
- us-west-2c
40+
replicas: 5
41+
metadata:
42+
name: test-cluster
43+
networking:
44+
clusterNetworks:
45+
- cidr: 10.128.0.0/14
46+
hostSubnetLength: 9
47+
machineCIDR: 10.0.0.0/16
48+
serviceCIDR: 172.30.0.0/16
49+
type: OpenshiftSDN
50+
platform:
51+
aws:
52+
region: us-west-2
53+
userTags:
54+
adminContact: jdoe
55+
costCenter: 7536
56+
pullSecret: '{"auths": ...}'
57+
sshKey: ssh-ed25519 AAAA...
58+
```

docs/user/customization.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Cluster Customization
2+
3+
The OpenShift Installer allows for several different levels of customization. It is important to understand how and why each of these levels is exposed and the ramifications of making changes at each of these levels. This guide will attempt to walk through each of them and provide examples for why an administrator may want to make customizations.
4+
5+
Cluster customization can be broken into four major levels: OpenShift, Kubernetes, Platform, and OS. These four levels are rough abstraction layers (OpenShift being the highest layer and OS being the lowest) and fall into either the validated or unvalidated buckets. The levels within the validated bucket (OpenShift and Platform) encompass customization that is safe to perform - installation and automatic updates will succeed regardless of the changes made (to a reasonable degree). The levels within the unvalidated bucket (Kubernetes and OS) encompass customization that is not necessarily safe - after introducing changes, installation and automatic updates may not succeed.
6+
7+
## OpenShift Customization
8+
9+
The most simple customization is exposed by the installer as an interactive series of prompts. These prompts are required and represent a high-level of customization. They are needed in order to get a running OpenShift cluster, but they aren't enough to get anything other than a vanilla deployment out of the box. Further customization is possible once the cluster has been provisioned, but isn't covered in this document as it is a "Day 2" operation.
10+
11+
## Platform Customization
12+
13+
While the default cluster size may be sufficient for some, many will need to make alterations. This can include increasing the number of machines in the control plane, changing the type of the virtual machines that will be used (e.g. AWS instances), or adjusting the CIDR range used for the Kubernetes service network. This level of customization is exposed via the installer's `install-config.yaml`. The install-config can be accessed by running `openshift-install create install-config`. This file can then be modified as needed before running a later target.
14+
15+
The `install-config.yaml` generated by the installer will not have all of the available fields populated, so they will need to be manually added if they are needed. The full list of available fields can be found in the [Go Docs][godocs]. Documentation for each of the supported platforms can be found in their platform-specific section:
16+
17+
- [AWS][aws-customization]
18+
19+
[aws-customization]: aws/customization.md
20+
[godocs]: https://godoc.org/github.com/openshift/installer/pkg/types#InstallConfig
21+
22+
## Kubernetes Customization (unvalidated)
23+
24+
In addition to customizing OpenShift and aspects of the underlying platform, the installer allows arbitrary modification to the Kubernetes objects that are injected into the cluster. Note that there is currently no validation on the modifications that are made, so it is possible that the changes will result in a non-functioning cluster. The Kubernetes manifests can be viewed and modified using the `manifests` and `manifest-templates` targets.
25+
26+
The `manifests` target will render the manifest templates and output the result into the asset directory. Perhaps the most common use for this target is to include additional manifests in the initial installation. These manifests could be added after the installation as a "Day 2" operation, but there may be cases where they are necessary beforehand.
27+
28+
The `manifest-templates` target will output the unrendered manifest templates into the asset directory. This allows modification to the templates before they have been rendered, which may be useful to users who wish to reuse the templates between cluster deployments.
29+
30+
## OS Customization (unvalidated)
31+
32+
In rare circumstances, certain modifications to the bootstrap and other machines may be necessary. The installer provides the "ignition-configs" target, which allows arbitrary modification to the [Ignition Configs][ignition] used to boot these machines. Note that there is currently no validation on the modifications that are made, so it is possible that the changes will result in a non-functioning cluster.
33+
34+
An example `worker.ign` is shown below. It has been modified to increase the HTTP timeouts used when fetching the generated worker config from the cluster. This isn't likely to be useful, but it does demonstrate what is possible.
35+
36+
```json ignition
37+
{
38+
"ignition": {
39+
"version": "2.2.0",
40+
"config": {
41+
"append": [{
42+
"source": "https://test-cluster-api.example.com:49500/config/worker"
43+
}]
44+
},
45+
"security": {
46+
"tls": {
47+
"certificateAuthorities": [{
48+
"source": "data:text/plain;charset=utf-8;base64,LS0tLS1CRU..."
49+
}]
50+
}
51+
},
52+
"timeouts": {
53+
"httpResponseHeaders": 120
54+
}
55+
},
56+
"passwd": {
57+
"users": [{
58+
"name": "core",
59+
"sshAuthorizedKeys": [
60+
"ssh-ed25519 AAAA..."
61+
]
62+
}]
63+
}
64+
}
65+
```
66+
67+
[ignition]: https://coreos.com/ignition/docs/latest/

docs/user/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The following targets can be destroyed by the installer:
5050

5151
### Multiple Invocations
5252

53-
In order to allow users to customize their installation, the installer can be invoked multiple times. The state is stored in a hidden file in the asset directory and contains all of the intermediate artifacts. This allows the installer to pause during the installation and wait for the user to modify intermediate artifacts.
53+
In order to allow users to [customize their installation](customization.md), the installer can be invoked multiple times. The state is stored in a hidden file in the asset directory and contains all of the intermediate artifacts. This allows the installer to pause during the installation and wait for the user to modify intermediate artifacts.
5454

5555
For example, you can create an install config and save it in a cluster-agnostic location:
5656

0 commit comments

Comments
 (0)