Understanding Standalone runtime and deploying applications into it

Mule 4 Indepth Deploying applications to Standalone Mule Server and Using Runtime Manager
13 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€67.18
List Price:  €95.97
You save:  €28.79
£55.86
List Price:  £79.80
You save:  £23.94
CA$97.87
List Price:  CA$139.82
You save:  CA$41.95
A$107.62
List Price:  A$153.75
You save:  A$46.13
S$94.24
List Price:  S$134.64
You save:  S$40.39
HK$544.83
List Price:  HK$778.36
You save:  HK$233.53
CHF 62.54
List Price:  CHF 89.34
You save:  CHF 26.80
NOK kr774.97
List Price:  NOK kr1,107.14
You save:  NOK kr332.17
DKK kr501
List Price:  DKK kr715.75
You save:  DKK kr214.74
NZ$119.95
List Price:  NZ$171.37
You save:  NZ$51.41
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,361.58
List Price:  ৳11,945.63
You save:  ৳3,584.04
₹5,909.84
List Price:  ₹8,442.99
You save:  ₹2,533.15
RM312.71
List Price:  RM446.75
You save:  RM134.04
₦118,484.88
List Price:  ₦169,271.38
You save:  ₦50,786.49
₨19,443.22
List Price:  ₨27,777.22
You save:  ₨8,334
฿2,412.28
List Price:  ฿3,446.26
You save:  ฿1,033.98
₺2,418.32
List Price:  ₺3,454.90
You save:  ₺1,036.57
B$406.01
List Price:  B$580.04
You save:  B$174.03
R1,267.89
List Price:  R1,811.35
You save:  R543.45
Лв131.37
List Price:  Лв187.69
You save:  Лв56.31
₩98,301.65
List Price:  ₩140,436.95
You save:  ₩42,135.30
₪259.10
List Price:  ₪370.16
You save:  ₪111.06
₱4,125.14
List Price:  ₱5,893.31
You save:  ₱1,768.17
¥10,832.35
List Price:  ¥15,475.45
You save:  ¥4,643.10
MX$1,429.79
List Price:  MX$2,042.64
You save:  MX$612.85
QR255.18
List Price:  QR364.56
You save:  QR109.38
P956.90
List Price:  P1,367.06
You save:  P410.16
KSh9,061.51
List Price:  KSh12,945.58
You save:  KSh3,884.06
E£3,475.01
List Price:  E£4,964.52
You save:  E£1,489.50
ብር8,566
List Price:  ብር12,237.67
You save:  ብር3,671.66
Kz63,900.87
List Price:  Kz91,290.87
You save:  Kz27,390
CLP$69,057.73
List Price:  CLP$98,658.13
You save:  CLP$29,600.40
CN¥506.93
List Price:  CN¥724.22
You save:  CN¥217.29
RD$4,217.06
List Price:  RD$6,024.63
You save:  RD$1,807.57
DA9,397.90
List Price:  DA13,426.15
You save:  DA4,028.25
FJ$159.29
List Price:  FJ$227.57
You save:  FJ$68.27
Q540.13
List Price:  Q771.64
You save:  Q231.51
GY$14,638.82
List Price:  GY$20,913.50
You save:  GY$6,274.67
ISK kr9,776.20
List Price:  ISK kr13,966.60
You save:  ISK kr4,190.40
DH703.91
List Price:  DH1,005.63
You save:  DH301.72
L1,275.33
List Price:  L1,821.98
You save:  L546.64
ден4,132.76
List Price:  ден5,904.20
You save:  ден1,771.43
MOP$561.01
List Price:  MOP$801.48
You save:  MOP$240.46
N$1,268.91
List Price:  N$1,812.81
You save:  N$543.90
C$2,574.70
List Price:  C$3,678.31
You save:  C$1,103.60
रु9,449.77
List Price:  रु13,500.25
You save:  रु4,050.48
S/265.32
List Price:  S/379.05
You save:  S/113.72
K281.71
List Price:  K402.47
You save:  K120.75
SAR262.77
List Price:  SAR375.40
You save:  SAR112.63
ZK1,934.92
List Price:  ZK2,764.29
You save:  ZK829.37
L334.42
List Price:  L477.77
You save:  L143.34
Kč1,702.59
List Price:  Kč2,432.37
You save:  Kč729.78
Ft27,646.05
List Price:  Ft39,496.05
You save:  Ft11,850
SEK kr772.42
List Price:  SEK kr1,103.50
You save:  SEK kr331.08
ARS$70,259.44
List Price:  ARS$100,374.93
You save:  ARS$30,115.49
Bs483.50
List Price:  Bs690.75
You save:  Bs207.24
COP$307,238.59
List Price:  COP$438,931.09
You save:  COP$131,692.49
₡35,641.51
List Price:  ₡50,918.63
You save:  ₡15,277.11
L1,768.23
List Price:  L2,526.16
You save:  L757.92
₲546,248.87
List Price:  ₲780,388.98
You save:  ₲234,140.10
$U2,983.14
List Price:  $U4,261.82
You save:  $U1,278.67
zł291.40
List Price:  zł416.31
You save:  zł124.90
Already have an account? Log In

Transcript

Welcome back. In this video, we will understand how to start a standalone node server. Actually till now we have deployed our applications on any point tutorial. Any points to do is having an embedded mule runtime. And we are deploying our applications on embedded mule runtime inside studio. But in production, we won't do that.

We will we want to start a standalone mule runtime. So firstly, what I will do is actually I'll go to mule soft side if I just Google for mule for runtime download. If I take the first link, it will take me to the download page. From here I can download the mule for runtime. So I have downloaded it already. This is four dot one dot five, which I have.

I've extracted this zip file to start the mute server. It is very simple in this folder Bin and inside this lb mule dot back if I just executed mule server will start running in standalone mode. So actually if you want to run this mule server, you need to have JDK eight installed on your machine. Even JDK nine make you some errors because this version of mule soft is compatible with JDK eight. So make sure that you have JDK eight installed on your machine. And also make sure that you have set the environment variable path pointing to JDK bin.

So again, I'm showing you in my environment variables. There is a path and inside path I have JDK bin in path. The first one right, okay, now so one more thing make sure that you have Java underscore home pointing to your JDK folder. Once you have all this in place, you can simply start over new server by just running. Clicking on your back, you can see that mule server is started. If you see this message mule is up and clicking.

That means that your server started successfully. Then if you see here once we start a mule server for first time, there is a dot mule folder which gets created. This dot mule folder will contain the metadata of the mule application. mule instance actually, don't worry, we'll get into more details what this.mil folder will contain. But just understand that for first time when we run our mule server standalone, a dot will folder will be created and it contains the mule runtime specific information. Okay, now if you want to deploy any apps here is the apps folder to keep your applications inside apps folder.

If I want to deploy my application, I'd keep my application under this apps. So I have my mute project here. What I'll do is I'll right click on this project export any points under mule here. Any points for your project to mule deploy will archive next. And I want the file to be on desktop I selected desktop. And this is the file.

I don't want to attach project sources I can uncheck it but let the project sources also be there in the jar file. Finish. If there is any file reference, yes. So it'll export a jar file on my desktop Okay, done. Now I'll go to my desktop and check. Is there a jar file?

Yes. So if I want to deploy this jar file, I just have to keep this inside apps folder. That's all you can see that this folder called JAR file got extracted. And it should be deployed successfully. So deployed. Yep, it looks like it started on the console.

See here on the console, it says it started the app. And you can see that once the app is successfully deployed, an anchor file will be generated. Now let's let me test if I can give a request to one of the flow here. There's one flow, which is mapped to look for slash course. Yep. I'll give a request to slash quote.

I should be able to get the response sweet. Yep, I got the response. So that means application got deployed successfully. Okay, now, we have deployed this manually. If we want to deploy the application, we just have to delete the anchor file. The unemployment will happen automatically.

OK, now we understood manual deployment. Let me concentrate on some more features. We'll try to understand what happens exactly when mule server starts. Actually, mule server or mule runtime is nothing but a Java application. mule is totally developed on top of Java and that to using a framework called spring framework. So actually what happens when I clicked on Neal dot bat, let me explain.

Actually, when I click on mule dot bat, this is not back when I clicked on Hold on back it internal launches another program called as Tanuki software rapid Tamaki then this tunnel key will read a configuration file called as wrapper dot conf which is present in the con folder. If you see here I have con folder and inside this there is rapper dot conf. Let me open it. So the Tanuki rapper program will read this configuration file and it will finally launch a Java program. So that Tao program is nothing but mule runtime we are saying Can I say that mule runtime is a Java program which is started with an okie Yes, we will runtime is the thing but a Java application can i Say that tunnel key is parent process for this Java application, yes, okay I will tell you the significance of Tanaka in short time.

So this is how a mule runtime is started. But let me concentrate now on rapid convert is m rapid.com just take you to the down the lot of key value pairs are configured here. You can see here rapid Java command is Java and wrapper dot java dot main class is mule container bootstrap. So, basically, as I told you, the Tanuki wrapper program will launch this command Java command and we'll start this in class mule container bootstrap. So, mule server is nothing but this Java program. But whenever we're running any Java program normally through command line how do we run the command which to fire is Java service class name is it.

But if we want to pass any VM arguments, like suppose if I want to pass any environment variables, what I do is for Java command, I will pass hyphen D, some key is equals to value hyphen D. Another key two is equals to value to like that we can pass any environment variables to a Java program from the command line. So, whatever we do before class name are nothing but VM arguments, right. And for Java, if you want to pass some other virtual memory arguments like what is the max memory, you will pass hyphen x x, which will actually set the maximum Java heap since there are a lot of x options xx options for now. If you see through the rapid.com here, there are Some QIf dour, rapid or Java traditional hyphen D mule home is this one hyphens in your base hyphen, D hyphen D, and hyphen xx options.

Actually a lot of configurations up to arguments. 17 is it? Yes. So the wrapper the wrapper will launch the Java program, which is our class name. Here it is. This is the Java main class, when it is running the Java main class, whatever arguments are passed like hyphen D and all our pauses, VM arguments.

That's how the rapper will start the mule runtime. Okay. So actually, why are they using kanaky the Mueller that could itself have launched the Dow programs right But why are they using Kentucky? Actually Taranaki application is a wrapper program and it is acting as a parent to my Java application right. This Taranaki application will be monitoring the health of this Java application at regular intervals. If due to any reason if this mule runtime crashes Kanaka will automatically restart it.

That is the reason why they are using Tanuki as a wrapper program to wrap your mule runtime, okay. And for Loki, the configuration file is rapper.com right. So tomorrow if you want to pass any other environment variables, all you have to do is here there are arguments up to number 17. Tomorrow if you want to pass any other environment variable or any virtual memory argument for the mule runtime, you can write like this. You can write a key but now it will become dark. At suppose if I want to pass my own hyphen D, say E and v is a cost to production as a PR word.

That means I'm passing an environment variable, the environment variable name, I can give it as like say, my end in this case and the value is right. So if I want to pass any environment variables is a variable pass and then restart my mule server. Great. Now you understood how the mule server starts and what is happening behind the scenes and the main configuration file. And if you see the lib directory it contains the jars for all the mule require. All the mule runtime specific jars are present here in this lib directory in various other folders.

Okay. And if you want to see the logs logs of the application, you can see it here. For my application. My application name is mule 01 mule basics that start So there's a log file. And you can see here the logs of my application. But how come?

How come this is a file? Where do we decide which is a file name? So actually, if you see my project in SRC main resources, there is log for j two dot XML. So, internally, mule uses log forged for logging. And here is a configuration where they have already configured by default, rolling file appender, where the file name is what says colon level dot home that means in your home directory, file separator, logs folder. And these are for file name.

So basically, if you want to change the location of your logs, they can just go to this log for j two dot XML and change the location of your log to wherever you want. Okay, so now we understood about deployment on standalone server manually in the next video, show you how to actually manage your mule runtime using any point runtime manager. See you next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.