-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Documentation/design: add prepare design #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-robot
merged 1 commit into
openshift:master
from
abhinavdahiya:design_prepare
Jul 16, 2018
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # Prepare | ||
|
|
||
| ## Goal | ||
|
|
||
| 1. Generation of the final Ignition configurations for the master and bootstrap nodes. | ||
|
|
||
| 2. Prepare needs to validate that the assets required to bootstrap the cluster are present and correct. | ||
|
|
||
| ## Overview | ||
|
|
||
| The prepare step is responsible for taking all of the generated assets, including any user-customizations, and generating the final asset state that will be used by the infrastructure provisioning tool. | ||
|
|
||
| This step is necessary because when a user modifies assets after the `render` phase - we must consume them into the final cluster states that will be applied at installation. | ||
|
|
||
| In most cases, prepare should only be responsible for generating a bootstrap node ignition config, a master node ignition stub, and provisioning tool specific files (e.g. tfvars). All other asset generation should be the result of the `render` step | ||
|
|
||
| ## Detailed Design | ||
|
|
||
| ### Idempotency | ||
|
|
||
| Prepare should be able to be run multiple times, with the output simply replacing any previously generated state. This is to allow a user to modify their source assets, and easily re-generate the configuration that will be used by the installer. | ||
|
|
||
| ### Validation | ||
|
|
||
| Prepare should validate that assets required for bootstrap are present. For example, | ||
|
|
||
| 1. etcd-cert-signer-server on bootstrap node. | ||
| 2. machineconfig server on bootstrap node. | ||
| 3. bootkube service for bootstrap node. | ||
| 4. kubelet service file for bootstrap node. and maybe more.. | ||
|
|
||
| ### Extra assets added by user | ||
|
|
||
| The user can customize the assets generated by `render` step. The user can also add new assets that need to be installed in the cluster. Prepare step should allow addition of assets by user. | ||
|
|
||
| The type of additions that are allowed are: | ||
|
|
||
| 1. Assets like systemd-service files for bootstrap node. | ||
| 2. Kubernetes objects to be installed in the cluster. | ||
|
|
||
| The type of additions not supported are: | ||
|
|
||
| 1. Assets like systemd-service files for master and worker nodes. | ||
|
|
||
| For example, | ||
|
|
||
| If the directory before running prepare looks like: | ||
|
|
||
| ``` | ||
| ./install-config.yaml | ||
| ./auth/kubeconfig-admin | ||
| ./auth/kubeconfig-bootstrap | ||
| ./manifests/kube-core-operator.yaml | ||
| ./manifests/kube-core-config.yaml | ||
| ./manifests/kube-core-operator-sa.yaml | ||
| ./manifests/network-operator.yaml | ||
| ./manifests/network-config.yaml | ||
| ./manifests/network-operator-sa.yaml | ||
| ... | ||
| ./tls/root-ca.crt | ||
| ./tls/root-ca.key | ||
| ./tls/kube-ca.crt | ||
| ./tls/kube-ca.key | ||
| ``` | ||
|
|
||
| The user can edit the `./manifests/network-config.yaml` file to update network related configuration. | ||
|
|
||
| ### Output | ||
|
|
||
| The Prepare step creates ignition file for bootstrap, master and worker node namely, `bootstrap.ign`, `master.ign` and `worker.ign` in the current working directory or the directory specified by `--assets-dir` flag. | ||
|
|
||
| The directory after prepare would look like | ||
|
|
||
| ``` | ||
| ./install-config.yaml | ||
| ./auth/kubeconfig-admin | ||
| ./auth/kubeconfig-bootstrap | ||
| ./ign/bootstrap.ign | ||
| ./ign/master.ign | ||
| ./ign/worker.ign | ||
| ./manifests/kube-core-operator.yaml | ||
| ./manifests/kube-core-config.yaml | ||
| ./manifests/kube-core-operator-sa.yaml | ||
| ... | ||
| ./tls/root-ca.crt | ||
| ./tls/root-ca.key | ||
| ./tls/kube-ca.crt | ||
| ./tls/kube-ca.key | ||
| ``` | ||
|
|
||
| #### TODO | ||
|
|
||
| 1. The prepare might have to create some `tf files` for launching the cluster with terraform. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe also add
Example prepare output? Also indicate where users can put their customized files?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.