Skip to content

Commit

Permalink
instructing students to setup a secure passwd
Browse files Browse the repository at this point in the history
  • Loading branch information
hgeaydem committed Feb 9, 2023
1 parent 8387573 commit 878b85e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions files/lab/workshop/content/cloning.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ It should show the following:
Now we need to customise this image, we're going to do the following:

* Permit root login over ssh
* Reset the root password to "redhat"
* Reset the root password to a secure one


Install libguestfs-tools so we can modify the image:
Expand All @@ -70,10 +70,10 @@ Now we're ready to customise the downloaded image. First we enable ssh logins fo
virt-customize -a /var/www/html/%cloud-image-name-fedora% --run-command 'sed -i s/^#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config && touch /.autorelabel'
```

Then remove cloud-init (as we don't need it during this lab) and set the root password to "**redhat**":
Then remove cloud-init (as we don't need it during this lab) and set the root password to something secure:

```execute-1
virt-customize -a /var/www/html/%cloud-image-name-fedora% --uninstall=cloud-init --root-password password:redhat --ssh-inject root:file:/root/.ssh/id_rsa.pub
```copy-and-edit
virt-customize -a /var/www/html/%cloud-image-name-fedora% --uninstall=cloud-init --root-password password:<set plaintext secure password here> --ssh-inject root:file:/root/.ssh/id_rsa.pub
```

Then exit from the bastion host:
Expand Down Expand Up @@ -306,7 +306,7 @@ fc34-original 65s Running 192.168.123.65 ocp4-worker3.aio.example.com

> **NOTE:** The IP address for the Fedora 34 virtual machine may be missing in your output above as it takes a while for the `qemu-guest-agent` to report the data through to OpenShift. We also requested an SELinux relabel for the VM, which take some more time. You'll need to wait for the IP address to show before you can move to the next steps.
When you've got an IP address, we should be able to SSH to it from our terminal window, noting you'll need to adapt the address below to match your environment (the password is "**redhat**" like we set earlier), and your IP address may **not** be the same as the example - adapt for your configuration:
When you've got an IP address, we should be able to SSH to it from our terminal window, noting you'll need to adapt the address below to match your environment (the password is the one you've set earlier), and your IP address may **not** be the same as the example - adapt for your configuration:

```copy
ssh root@192.168.123.65
Expand Down Expand Up @@ -581,7 +581,7 @@ NAME AGE PHASE IP NODENAME REA
fc34-clone 88s Running 192.168.123.66 ocp4-worker2.aio.example.com True
~~~

This machine will also be visible from the OpenShift Virtualization console, which you can navigate to using the top "**Console**" button, or by using your dedicated tab if you've created one. You can login using "**root/redhat**", by going into the "**Workloads**" --> "**Virtualization**" --> "**fc34-clone**" --> "**Console**", if you want to try:
This machine will also be visible from the OpenShift Virtualization console, which you can navigate to using the top "**Console**" button, or by using your dedicated tab if you've created one. You can login using the "**root**" user with the password you've set earliyer, by going into the "**Workloads**" --> "**Virtualization**" --> "**fc34-clone**" --> "**Console**", if you want to try:

<img src="img/fc34-clone-console.png"/>

Expand Down
2 changes: 1 addition & 1 deletion files/lab/workshop/content/console.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Have a look around the options, but one area worth reviewing is the console. Cli

<img src="img/console-21.png"/>

In this example we have chosen serial and logged in as user: `root` password: `redhat`:
In this example we have chosen serial and logged in as user: `root` using the password set earliyer:

<img src="img/console-20.png"/>

Expand Down
2 changes: 1 addition & 1 deletion files/lab/workshop/modules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config:
- name: node-network-domain
value: aio.example.com
- name: cloud-image-name-fedora
value: Fedora-Cloud-Base-34-1.2.x86_64.raw
value: Fedora-Cloud-Base-37-1.7.x86_64.raw
modules:
welcome:
name: Welcome
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
git:
repo: "https://github.com/RHFieldProductManagement/ocp4_aio_role_deploy_cnvlab.git"
dest: "/root/cnvlab"
version: "v0.0.12"
version: "v0.0.13"

- name: Deploy Workbook Instance for CNV Labs
block:
Expand Down

0 comments on commit 878b85e

Please sign in to comment.