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.35
List Price:  €96.21
You save:  €28.86
£55.83
List Price:  £79.77
You save:  £23.93
CA$100.76
List Price:  CA$143.95
You save:  CA$43.19
A$112.23
List Price:  A$160.33
You save:  A$48.10
S$95.14
List Price:  S$135.93
You save:  S$40.78
HK$543.62
List Price:  HK$776.63
You save:  HK$233.01
CHF 63.04
List Price:  CHF 90.06
You save:  CHF 27.02
NOK kr797.48
List Price:  NOK kr1,139.30
You save:  NOK kr341.82
DKK kr502.49
List Price:  DKK kr717.87
You save:  DKK kr215.38
NZ$124.10
List Price:  NZ$177.29
You save:  NZ$53.19
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.18
৳8,361.55
List Price:  ৳11,945.58
You save:  ৳3,584.03
₹5,962.79
List Price:  ₹8,518.63
You save:  ₹2,555.84
RM314.04
List Price:  RM448.65
You save:  RM134.61
₦108,335.42
List Price:  ₦154,771.52
You save:  ₦46,436.10
₨19,495.71
List Price:  ₨27,852.21
You save:  ₨8,356.49
฿2,390.81
List Price:  ฿3,415.60
You save:  ฿1,024.78
₺2,467.44
List Price:  ₺3,525.07
You save:  ₺1,057.62
B$434.14
List Price:  B$620.23
You save:  B$186.09
R1,296.68
List Price:  R1,852.48
You save:  R555.80
Лв131.68
List Price:  Лв188.12
You save:  Лв56.44
₩102,198.93
List Price:  ₩146,004.73
You save:  ₩43,805.79
₪256.56
List Price:  ₪366.53
You save:  ₪109.97
₱4,090.81
List Price:  ₱5,844.26
You save:  ₱1,753.45
¥10,994.99
List Price:  ¥15,707.80
You save:  ¥4,712.81
MX$1,408.98
List Price:  MX$2,012.91
You save:  MX$603.93
QR255.09
List Price:  QR364.43
You save:  QR109.34
P967.82
List Price:  P1,382.66
You save:  P414.84
KSh9,046.20
List Price:  KSh12,923.70
You save:  KSh3,877.50
E£3,562.49
List Price:  E£5,089.49
You save:  E£1,527
ብር8,907.19
List Price:  ብር12,725.10
You save:  ብር3,817.91
Kz63,830.88
List Price:  Kz91,190.88
You save:  Kz27,360
CLP$69,323.69
List Price:  CLP$99,038.09
You save:  CLP$29,714.40
CN¥510.80
List Price:  CN¥729.75
You save:  CN¥218.94
RD$4,245.36
List Price:  RD$6,065.06
You save:  RD$1,819.70
DA9,465.07
List Price:  DA13,522.10
You save:  DA4,057.03
FJ$162.39
List Price:  FJ$232
You save:  FJ$69.60
Q539.11
List Price:  Q770.19
You save:  Q231.08
GY$14,638.77
List Price:  GY$20,913.42
You save:  GY$6,274.65
ISK kr9,772.70
List Price:  ISK kr13,961.60
You save:  ISK kr4,188.90
DH703.98
List Price:  DH1,005.73
You save:  DH301.75
L1,291.33
List Price:  L1,844.84
You save:  L553.50
ден4,143.97
List Price:  ден5,920.21
You save:  ден1,776.24
MOP$559.97
List Price:  MOP$800
You save:  MOP$240.02
N$1,289.45
List Price:  N$1,842.15
You save:  N$552.70
C$2,574.80
List Price:  C$3,678.44
You save:  C$1,103.64
रु9,534.71
List Price:  रु13,621.60
You save:  रु4,086.89
S/260.99
List Price:  S/372.86
You save:  S/111.86
K283.85
List Price:  K405.52
You save:  K121.66
SAR262.91
List Price:  SAR375.60
You save:  SAR112.69
ZK1,936.45
List Price:  ZK2,766.47
You save:  ZK830.02
L335.12
List Price:  L478.77
You save:  L143.64
Kč1,694.03
List Price:  Kč2,420.15
You save:  Kč726.12
Ft27,771.44
List Price:  Ft39,675.18
You save:  Ft11,903.74
SEK kr774.38
List Price:  SEK kr1,106.30
You save:  SEK kr331.92
ARS$71,792.58
List Price:  ARS$102,565.23
You save:  ARS$30,772.64
Bs484.55
List Price:  Bs692.24
You save:  Bs207.69
COP$307,165.41
List Price:  COP$438,826.54
You save:  COP$131,661.12
₡35,530.54
List Price:  ₡50,760.09
You save:  ₡15,229.55
L1,777.33
List Price:  L2,539.15
You save:  L761.82
₲546,250
List Price:  ₲780,390.60
You save:  ₲234,140.59
$U3,115.91
List Price:  $U4,451.49
You save:  $U1,335.58
zł287.82
List Price:  zł411.19
You save:  zł123.37
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.