You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/ansible_ripu/1.3-report/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ In the previous exercise, we used a playbook job template to generate a Leapp pr
28
28
29
29
- 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:
@@ -74,7 +74,7 @@ There is a collection of example custom actor at the GitHub repo [oamg/leapp-sup
74
74
75
75
- This is an example of the output you should expect to see if the package is installed successfully:
76
76
77
-
```
77
+
```plaintext
78
78
Resolving Dependencies
79
79
--> Running transaction check
80
80
---> 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
111
111
112
112
- 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:
113
113
114
-
```
114
+
```bash
115
115
sudo touch /boot/policy-violation
116
116
```
117
117
@@ -133,7 +133,7 @@ We are now ready to try running a pre-upgrade report including the checks from o
133
133
134
134
- Reboot the host to resolve the inhibitor finding. For example:
@@ -97,26 +97,26 @@ You may want to install a different application, for example, an actual applicat
97
97
98
98
<!-- 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:
99
99
100
-
```
100
+
```bash
101
101
sudo firewall-cmd --add-port=8080/tcp
102
102
sudo firewall-cmd --add-port=8080/tcp --permanent
103
103
```
104
104
-->
105
105
- We need to start the database server and create the database for our application. Use this command to enable and start the database:
106
106
107
-
```
107
+
```bash
108
108
sudo systemctl enable --now mariadb
109
109
```
110
110
111
111
Now use the `mysql` command line client to connect to the database server. For example:
112
112
113
-
```
113
+
```bash
114
114
mysql --user root
115
115
```
116
116
117
117
This should bring you to a `MariaDB [(none)]>` prompt. Enter the following SQL commands at this prompt:
118
118
119
-
```
119
+
```plaintext
120
120
CREATE DATABASE IF NOT EXISTS petclinic;
121
121
ALTER DATABASE petclinic DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
122
122
GRANT ALL PRIVILEGES ON petclinic.* TO 'petclinic'@'localhost' IDENTIFIED BY 'petclinic';
- Now we are ready to start the application web service. Use this command to run it in the background:
128
128
129
-
```
129
+
```bash
130
130
echo'cd $HOME/spring-petclinic && ./mvnw spring-boot:run -Dspring-boot.run.profiles=mysql >> $HOME/app.log 2>&1'| at now
131
131
```
132
132
133
133
- 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:
134
134
135
-
```
135
+
```bash
136
136
tailf ~/app.log
137
137
```
138
138
139
139
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:
140
140
141
-
```
141
+
```plaintext
142
142
o.s.b.a.e.web.EndpointLinksResolver : Exposing 13 endpoint(s) beneath base path '/actuator'
143
143
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
144
144
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
152
152
153
153
- Use this command to determine the application's external URL:
154
154
155
-
```
155
+
```bash
156
156
echo"http://$(curl -s ifconfig.me):8080"
157
157
```
158
158
@@ -174,7 +174,7 @@ Right now, our application was started manually. We need to configure the app so
174
174
175
175
- Use this command to configure a reboot cron entry so the application will be started automatically after every reboot:
@@ -185,7 +185,7 @@ Right now, our application was started manually. We need to configure the app so
185
185
186
186
- Now reboot the server to verify this works:
187
187
188
-
```
188
+
```bash
189
189
sudo reboot
190
190
```
191
191
@@ -195,7 +195,7 @@ Right now, our application was started manually. We need to configure the app so
195
195
>
196
196
> 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:
Copy file name to clipboardExpand all lines: exercises/ansible_ripu/2.4-check-pet-app/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
29
29
>
30
30
> 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:
Copy file name to clipboardExpand all lines: exercises/ansible_ripu/3.1-rm-rf/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ In the next exercise, we will be rolling back the RHEL upgrade on one of our ser
44
44
45
45
- At the shell prompt, use the `sudo -i` command to switch to the root user. For example:
46
46
47
-
```
47
+
```plaintext
48
48
[ec2-user@cute-bedbug ~]$ sudo -i
49
49
[root@cute-bedbug ~]#
50
50
```
@@ -57,13 +57,13 @@ In the next exercise, we will be rolling back the RHEL upgrade on one of our ser
57
57
58
58
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:
59
59
60
-
```
60
+
```bash
61
61
dnf -y remove temurin-17-jdk
62
62
```
63
63
64
64
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:
65
65
66
-
```
66
+
```plaintext
67
67
...
68
68
which: no javac in (/home/ec2-user/.local/bin:/home/ec2-user/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
Copy file name to clipboardExpand all lines: exercises/ansible_ripu/3.3-check-undo/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ In this step, we will repeat the observations we made on our host after the upgr
40
40
>
41
41
> 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:
0 commit comments