-
Notifications
You must be signed in to change notification settings - Fork 1.8k
OSDOCS-4872: change variant rhcos to openshift #58302
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
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 |
---|---|---|
|
@@ -18,71 +18,47 @@ You can create a live {op-system} ISO with SSHd enabled and with predefined cred | |
|
||
. Download the `coreos-installer` binary from the `coreos-installer` image link:https://mirror.openshift.com/pub/openshift-v4/clients/coreos-installer/latest/[mirror] page. | ||
|
||
. Download the latest live {op-system} ISO from link:https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/latest/rhcos-live.x86_64.iso[mirror.openshift.com]. | ||
. Download the latest live {op-system} ISO from link:https://mirror.openshift.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.12/latest/[mirror.openshift.com]. | ||
|
||
. Create the `embedded.yaml` file that the `butane` utility uses to create the Ignition file: | ||
+ | ||
[source,yaml] | ||
[source,yaml,subs="attributes+"] | ||
---- | ||
variant: rhcos | ||
version: 0.1.0 | ||
variant: openshift | ||
version: {product-version}.0 | ||
metadata: | ||
name: sshd | ||
labels: | ||
machineconfiguration.openshift.io/role: worker | ||
passwd: | ||
users: | ||
- name: root | ||
- name: core <1> | ||
ssh_authorized_keys: | ||
- '<ssh_key>' | ||
password_hash: '$2b$05$aAd9TkvWnvUmeDQEA9vkiOoCqCZgd6cWn0xXwe.ii/TqeCxUC0Z0G' <1> | ||
storage: | ||
files: | ||
- path: /etc/ssh/sshd_config | ||
contents: | ||
local: ./live-sshd_config | ||
mode: 0600 | ||
overwrite: true | ||
---- | ||
<1> `yescrypt` passwords are not supported in {op-system}. Use `bcrypt` instead when you create the `password_hash`. | ||
<1> The `core` user has sudo privileges. | ||
maxwelldb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
. Create the `files-dir/` folder and copy the default `sshd_config` file into the folder. | ||
|
||
. Update the following fields in the `files-dir/sshd_config` file: | ||
+ | ||
[source,bash] | ||
---- | ||
[...] | ||
PermitRootLogin yes <1> | ||
[...] | ||
PasswordAuthentication yes <2> | ||
---- | ||
<1> Allows access to the server as a root user. | ||
<2> Allows access to the server by using a password. | ||
|
||
+ | ||
[IMPORTANT] | ||
==== | ||
The modified `sshd_config` file overrides the default `sshd_config` file. | ||
==== | ||
|
||
. Pass the YAML file and the folder to the `butane` utility: | ||
. Run the `butane` utility to create the Ignition file using the following command: | ||
+ | ||
[source,terminal] | ||
---- | ||
$ butane -p embedded.yaml -d files-dir/ > embedded.ign | ||
$ butane -pr embedded.yaml -o embedded.ign | ||
---- | ||
|
||
. Once the Ignition file is created, you can include the configuration in a new live {op-system} ISO, which is named `rhcos-sshd-4.13.0-x86_64-live.x86_64.iso`, with the `coreos-installer` utility: | ||
jldohmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||
. After the Ignition file is created, you can include the configuration in a new live {op-system} ISO, which is named `rhcos-sshd-{product-version}.0-x86_64-live.x86_64.iso`, with the `coreos-installer` utility: | ||
+ | ||
[source,terminal] | ||
[source,terminal,subs="attributes+"] | ||
---- | ||
$ coreos-installer iso ignition embed -i embedded.ign rhcos-4.13.0-x86_64-live.x86_64.iso -o rhcos-sshd-4.13.0-x86_64-live.x86_64.iso | ||
$ coreos-installer iso ignition embed -i embedded.ign rhcos-{product-version}.0-x86_64-live.x86_64.iso -o rhcos-sshd-{product-version}.0-x86_64-live.x86_64.iso | ||
---- | ||
|
||
.Verification | ||
|
||
. Check that the custom live ISO can be used to boot the server by running the following command: | ||
* Check that the custom live ISO can be used to boot the server by running the following command: | ||
+ | ||
[source,terminal] | ||
[source,terminal,subs="attributes+"] | ||
---- | ||
# coreos-installer iso ignition show rhcos-sshd-4.13.0-x86_64-live.x86_64.iso | ||
# coreos-installer iso ignition show rhcos-sshd-{product-version}.0-x86_64-live.x86_64.iso | ||
---- | ||
|
||
+ | ||
|
@@ -96,26 +72,12 @@ $ coreos-installer iso ignition embed -i embedded.ign rhcos-4.13.0-x86_64-live.x | |
"passwd": { | ||
"users": [ | ||
{ | ||
"name": "root", | ||
"passwordHash": "$2b$05$aAd9TkvWnvUmeDQEA9vkiOoCqCZgd6cWn0xXwe.ii/TqeCxUC0Z0G", | ||
"name": "core", | ||
"sshAuthorizedKeys": [ | ||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCZnG8AIzlDAhpyENpK2qKiTT8EbRWOrz7NXjRzopbPu215mocaJgjjwJjh1cYhgPhpAp6M/ttTk7I4OI7g4588Apx4bwJep6oWTU35LkY8ZxkGVPAJL8kVlTdKQviDv3XX12l4QfnDom4tm4gVbRH0gNT1wzhnLP+LKYm2Ohr9D7p9NBnAdro6k++XWgkDeijLRUTwdEyWunIdW1f8G0Mg8Y1Xzr13BUo3+8aey7HLKJMDtobkz/C8ESYA/f7HJc5FxF0XbapWWovSSDJrr9OmlL9f4TfE+cQk3s+eoKiz2bgNPRgEEwihVbGsCN4grA+RzLCAOpec+2dTJrQvFqsD [email protected]" | ||
] | ||
} | ||
] | ||
}, | ||
"storage": { | ||
"files": [ | ||
{ | ||
"overwrite": true, | ||
"path": "/etc/ssh/sshd_config", | ||
"contents": { | ||
"compression": "gzip", | ||
"source": "data:;base64,H4sIAAAAAAAC/4RXX2/bOBJ/16eYWy2QFoj/pdtDN8A9qI6SGLEdw3b22qeAlsY21xQpkJQd3cN99sUMZcUuvFsXbUXO8Mf5P8MYwu/X5xL118XdLTi3zV8zo9dyc72HQXfQ/wQ3/cGXXv+3Xv93uOnf/ja4vbkB/yekbyX8GkUxLLfSgXTgt8jnwaHdowVXO49F5y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77Oklk6Z6AknE7u7ubpYsGA6TidPT5PA1SaLF7m6SSdLs8RRnfpdDm6Hw2T5eh5yhDjMQv6kjykJ7zfJs93o/tROl+Q/u0r8GgssybTuWoVXhouWhw/mye/W/uS/g+PY7nCN8x6pkTN49Tal51m4o9iSN9EUSok0OYifsOEkujCE7JE26EOBCvhJI/MPtsCD3hCG53tqZKG33n+8pAUfhcKwAn1PXNPNu+NzfA4aWZ7d3yn/BUAAP//SwsNmNoQAAA=" | ||
}, | ||
"mode": 384 | ||
} | ||
] | ||
} | ||
} | ||
---- | ||
---- |
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.