Skip to content

Commit e1c0d83

Browse files
authored
Merge pull request #2262 from swapdisk/fix_2261
2 parents 85cc12e + 8203847 commit e1c0d83

File tree

6 files changed

+25
-25
lines changed

6 files changed

+25
-25
lines changed

exercises/ansible_ripu/1.3-report/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ In the previous exercise, we used a playbook job template to generate a Leapp pr
2828

2929
- If we we're using the Leapp framework to manually upgrade just a single RHEL host, we could simply get to a shell prompt on the host and look at the local report file output. In [Exercise 1.1, Step 2](../1.1-setup/README.md#step-2---open-a-terminal-session), we learned how to open an ssh session to one of our pet app servers. Follow those steps and after logging in, use this command to review the local Leapp pre-upgrade report file:
3030

31-
```
31+
```bash
3232
less /var/log/leapp/leapp-report.txt
3333
```
3434

exercises/ansible_ripu/1.5-custom-modules/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ There is a collection of example custom actor at the GitHub repo [oamg/leapp-sup
5858

5959
- Login to one of your pet app servers using the `ssh` command. For example:
6060

61-
```
61+
```bash
6262
ssh tidy-bengal
6363
```
6464

6565
- Now we will install the RPM package that provides our custom actor. Run the following command on your pet app server:
6666

67-
```
67+
```bash
6868
sudo yum -y --enablerepo=leapp-supplements install leapp-upgrade-\*-supplements
6969
```
7070

@@ -74,7 +74,7 @@ There is a collection of example custom actor at the GitHub repo [oamg/leapp-sup
7474
7575
- This is an example of the output you should expect to see if the package is installed successfully:
7676

77-
```
77+
```plaintext
7878
Resolving Dependencies
7979
--> Running transaction check
8080
---> Package leapp-upgrade-el7toel8-supplements.noarch 0:1.0.0-47.demo.el7 will be installed
@@ -111,7 +111,7 @@ There is a collection of example custom actor at the GitHub repo [oamg/leapp-sup
111111

112112
- To demonstrate the custom actor at work, let's create a condition that violates our policy so that an inhibitor finding will be reported. Use this command:
113113

114-
```
114+
```bash
115115
sudo touch /boot/policy-violation
116116
```
117117

@@ -133,7 +133,7 @@ We are now ready to try running a pre-upgrade report including the checks from o
133133

134134
- Reboot the host to resolve the inhibitor finding. For example:
135135

136-
```
136+
```bash
137137
sudo reboot
138138
```
139139

exercises/ansible_ripu/1.6-my-pet-app/README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ You may want to install a different application, for example, an actual applicat
6969
7070
Login to your pet app server and run these commands:
7171

72-
```
72+
```bash
7373
distver=$(sed -r 's/([^:]*:){4}//;s/(.).*/\1/' /etc/system-release-cpe)
7474
sudo yum-config-manager --add-repo=https://packages.adoptium.net/artifactory/rpm/rhel/$distver/x86_64
7575
sudo yum-config-manager --save --setopt=\*adoptium\*.gpgkey=https://packages.adoptium.net/artifactory/api/gpg/key/public
@@ -80,15 +80,15 @@ You may want to install a different application, for example, an actual applicat
8080

8181
- Verify that the temurin-17-jdk package was installed:
8282

83-
```
83+
```bash
8484
rpm -q temurin-17-jdk
8585
```
8686

8787
If not, go back and figure out what went wrong.
8888

8989
- Next, we will install the Spring Pet Clinic Sample Application under the home directory of the ec2-user. Run these commands:
9090

91-
```
91+
```bash
9292
cd ~
9393
git clone https://github.com/spring-projects/spring-petclinic.git
9494
```
@@ -97,26 +97,26 @@ You may want to install a different application, for example, an actual applicat
9797

9898
<!-- The EC2 instances for the workshop don't have firewalld, but in case you are using this procedure somewhere that does, use these command to open the firewall:
9999
100-
```
100+
```bash
101101
sudo firewall-cmd --add-port=8080/tcp
102102
sudo firewall-cmd --add-port=8080/tcp --permanent
103103
```
104104
-->
105105
- We need to start the database server and create the database for our application. Use this command to enable and start the database:
106106

107-
```
107+
```bash
108108
sudo systemctl enable --now mariadb
109109
```
110110

111111
Now use the `mysql` command line client to connect to the database server. For example:
112112

113-
```
113+
```bash
114114
mysql --user root
115115
```
116116

117117
This should bring you to a `MariaDB [(none)]>` prompt. Enter the following SQL commands at this prompt:
118118

119-
```
119+
```plaintext
120120
CREATE DATABASE IF NOT EXISTS petclinic;
121121
ALTER DATABASE petclinic DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
122122
GRANT ALL PRIVILEGES ON petclinic.* TO 'petclinic'@'localhost' IDENTIFIED BY 'petclinic';
@@ -126,19 +126,19 @@ sudo firewall-cmd --add-port=8080/tcp --permanent
126126

127127
- Now we are ready to start the application web service. Use this command to run it in the background:
128128

129-
```
129+
```bash
130130
echo 'cd $HOME/spring-petclinic && ./mvnw spring-boot:run -Dspring-boot.run.profiles=mysql >> $HOME/app.log 2>&1' | at now
131131
```
132132

133133
- The application will take a couple minute to come up the first time. Check the `app.log` file to follow the progress and verify the web service has started successfully:
134134

135-
```
135+
```bash
136136
tailf ~/app.log
137137
```
138138

139139
When you see events listed at the bottom of the log output like this example, that means the application is started successfully and ready for testing:
140140

141-
```
141+
```plaintext
142142
o.s.b.a.e.web.EndpointLinksResolver : Exposing 13 endpoint(s) beneath base path '/actuator'
143143
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
144144
o.s.s.petclinic.PetClinicApplication : Started PetClinicApplication in 6.945 seconds (process running for 7.496)
@@ -152,7 +152,7 @@ Now that we have installed our application and verified it is running, it's time
152152

153153
- Use this command to determine the application's external URL:
154154

155-
```
155+
```bash
156156
echo "http://$(curl -s ifconfig.me):8080"
157157
```
158158

@@ -174,7 +174,7 @@ Right now, our application was started manually. We need to configure the app so
174174

175175
- Use this command to configure a reboot cron entry so the application will be started automatically after every reboot:
176176

177-
```
177+
```bash
178178
echo '@reboot cd $HOME/spring-petclinic && ./mvnw spring-boot:run -Dspring-boot.run.profiles=mysql >> $HOME/app.log 2>&1' | crontab -
179179
```
180180

@@ -185,7 +185,7 @@ Right now, our application was started manually. We need to configure the app so
185185
186186
- Now reboot the server to verify this works:
187187

188-
```
188+
```bash
189189
sudo reboot
190190
```
191191

@@ -195,7 +195,7 @@ Right now, our application was started manually. We need to configure the app so
195195
>
196196
> Because the external IP addresses of the EC2 instances provisioned for the workshop are dynamically assigned (i.e., using DHCP), it is possible that the web user interface URL might change after a reboot. If you are unable to access the app after the reboot, run this command again to determine the new URL for the application web user interface:
197197
>
198-
> ```
198+
> ```bash
199199
> echo "http://$(curl -s ifconfig.me):8080"
200200
> ```
201201
>

exercises/ansible_ripu/2.4-check-pet-app/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ It's time to repeat the testing you did for [Step 3](../1.6-my-pet-app/README.md
2929
>
3030
> Because the external IP addresses of the EC2 instances provisioned for the workshop are dynamically assigned (i.e., using DHCP), it is possible that the web user interface URL may change after a reboot. If that happens, run this command at the shell prompt of the app server to determine the new URL for the application web user interface:
3131
>
32-
> ```
32+
> ```bash
3333
> echo "http://$(curl -s ifconfig.me):8080"
3434
> ```
3535

exercises/ansible_ripu/3.1-rm-rf/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ In the next exercise, we will be rolling back the RHEL upgrade on one of our ser
4444

4545
- At the shell prompt, use the `sudo -i` command to switch to the root user. For example:
4646

47-
```
47+
```plaintext
4848
[ec2-user@cute-bedbug ~]$ sudo -i
4949
[root@cute-bedbug ~]#
5050
```
@@ -57,13 +57,13 @@ In the next exercise, we will be rolling back the RHEL upgrade on one of our ser
5757

5858
But what if this package did get removed? Our pet app requires the JDK runtime to function. Without it, our application will be broken. We can simulate this by manually removing the package like this:
5959

60-
```
60+
```bash
6161
dnf -y remove temurin-17-jdk
6262
```
6363

6464
Now if you `reboot` the app server, the pet app will not come back up and the following error will be seen at the end of the `~/app.log` file:
6565

66-
```
66+
```plaintext
6767
...
6868
which: no javac in (/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
6969
Error: JAVA_HOME is not defined correctly.

exercises/ansible_ripu/3.3-check-undo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ In this step, we will repeat the observations we made on our host after the upgr
4040
>
4141
> Because the external IP addresses of the EC2 instances provisioned for the workshop are dynamically assigned (i.e., using DHCP), it is possible that the web user interface URL may change after a reboot. If that happens, run this command at the shell prompt of the app server to determine the new URL for the application web user interface:
4242
>
43-
> ```
43+
> ```bash
4444
> echo "http://$(curl -s ifconfig.me):8080"
4545
> ```
4646

0 commit comments

Comments
 (0)