| Author |
Message |
< Yaws mailing list ~ Best practice for yaws deployment ? |
| Guest |
Posted: Mon Jul 31, 2006 8:17 pm |
|
|
|
Guest
|
In the past and with various frameworks / languages, the steps for
deploying an app on a production machine for me looks always something
like that ?
stop web server (or app server)
create new app root directory
install the new release (the complete app) into the new app root directory
update database if necessary
move symbolic link to new to the new app root directory
start web server (or app server)
(In RubyOnRails all these steps can even be automated, including
checkout from Subversion)
But now with Erlang and yaws we have hot code swap and there is no
need to shut down the server. So has anybody experience or suggestions
for a good way to deploy a yaws app so it runs without interruption
while updating, but still having a quick-access fallback solution in
case something goes wrong with the update ?
regards
--
Roberto Saccon
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jul 31, 2006 8:55 pm |
|
|
|
Guest
|
I imagine there are different ways of structuring yaws applications and
doing hot upgrades. Here is how I have done it ...
in yaws.conf (amongst other things)
id = yaws
runmod = expmaster
runmod = expcache
runmod = dbexp
runmod = filewatch
runmod = autosys_alarm
and then, for example, if I have an updated module (dbexp)
to drop into the ebin_dir, ...
yaws -I dbexp -load yaws
NOTICE that the arguments for -I and -load are reversed. I am
not sure if you still need to do that with latest yaws.
If there are problems with the new module, drop old module in ebin_dir
and -load again. Of course, all the new and old modules need to be
compatible!
~M
On Mon, Jul 31, 2006 at 05:16:23PM -0300, Roberto Saccon wrote:
> In the past and with various frameworks / languages, the steps for
> deploying an app on a production machine for me looks always something
> like that ?
>
> stop web server (or app server)
> create new app root directory
> install the new release (the complete app) into the new app root directory
> update database if necessary
> move symbolic link to new to the new app root directory
> start web server (or app server)
>
> (In RubyOnRails all these steps can even be automated, including
> checkout from Subversion)
>
> But now with Erlang and yaws we have hot code swap and there is no
> need to shut down the server. So has anybody experience or suggestions
> for a good way to deploy a yaws app so it runs without interruption
> while updating, but still having a quick-access fallback solution in
> case something goes wrong with the update ?
>
> regards
> --
> Roberto Saccon
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
--
Michael McDaniel
Portland, Oregon, USA
http://autosys.us
+1 503 283 5284
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Tue Aug 01, 2006 8:46 am |
|
|
|
Guest
|
As you say Erlang/OTP provide a framework for hot upgrade, so the remaining
problem is actually to be able to deploy Erlang/OTP applications
independently of each other into a running Yaws server.
I have been working on this - see earlier posting:
http://sourceforge.net/mailarchive/message.php?msg_id=20040414
I hope I can check in something into the Yaws applications directory later
this month.
Regards
Mikael
m |
|
|
| Back to top |
|
| tobbe |
Posted: Wed Aug 02, 2006 7:12 am |
|
|
|
User
Joined: 19 Jan 2005
Posts: 274
Location: Stockholm, Sweden
|
I think I have shown this before on this list, anyway...
Here is a nice way of upgrading your system.
What you do is to compile your Erlang code,
then point a Web-browser to http://...../lm.yaws,
and you're done.
1. Create a file: lm.yaws
-----------------------------
<erl>
out(A) ->
mymod:lm(),
{redirect, ["/index.yaws"]}.
</erl>
------------------------------
2. Put the following code in a module (e.g: mymod.erl)
------------------------------
lm() ->
[c:l(M) || M <- mm()].
mm() ->
modified_modules().
modified_modules() ->
[M || {M, _} <- code:all_loaded(), module_modified(M) == true].
module_modified(Module) ->
case code:is_loaded(Module) of
{file, preloaded} ->
false;
{file, Path} ->
CompileOpts = proplists:get_value(compile,
Module:module_info()),
CompileTime = proplists:get_value(time, CompileOpts),
Src = proplists:get_value(source, CompileOpts),
module_modified(Path, CompileTime, Src);
_ ->
false
end.
module_modified(Path, PrevCompileTime, PrevSrc) ->
case find_module_file(Path) of
false ->
false;
ModPath ->
case beam_lib:chunks(ModPath, ["CInf"]) of
{ok, {_, [{_, CB}]}} ->
CompileOpts = binary_to_term(CB),
CompileTime = proplists:get_value(time, CompileOpts),
Src = proplists:get_value(source, CompileOpts),
not (CompileTime == PrevCompileTime) and (Src ==
PrevSrc);
_ ->
false
end
end.
find_module_file(Path) ->
case file:read_file_info(Path) of
{ok, _} ->
Path;
_ ->
%% may be the path was changed?
case code:where_is_file(filename:basename(Path)) of
non_existing ->
false;
NewPath ->
NewPath
end
end.
-------------------------------------------
Cheers, Tobbe
Roberto Saccon wrote:
> In the past and with various frameworks / languages, the steps for
> deploying an app on a production machine for me looks always something
> like that ?
>
> stop web server (or app server)
> create new app root directory
> install the new release (the complete app) into the new app root directory
> update database if necessary
> move symbolic link to new to the new app root directory
> start web server (or app server)
>
> (In RubyOnRails all these steps can even be automated, including
> checkout from Subversion)
>
> But now with Erlang and yaws we have hot code swap and there is no
> need to shut down the server. So has anybody experience or suggestions
> for a good way to deploy a yaws app so it runs without interruption
> while updating, but still having a quick-access fallback solution in
> case something goes wrong with the update ?
>
> regards
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Wed Aug 02, 2006 7:41 am |
|
|
|
Guest
|
Tobbe, great stuff, thanks, that's seems to do the trick ...
regards
Roberto
On 8/2/06, Torbjorn Tornkvist <tobbe@tornkvist.org> wrote:
>
> I think I have shown this before on this list, anyway...
>
> Here is a nice way of upgrading your system.
> What you do is to compile your Erlang code,
> then point a Web-browser to http://...../lm.yaws,
> and you're done.
>
> 1. Create a file: lm.yaws
> -----------------------------
> <erl>
> out(A) ->
> mymod:lm(),
> {redirect, ["/index.yaws"]}.
>
> </erl>
> ------------------------------
>
> 2. Put the following code in a module (e.g: mymod.erl)
> ------------------------------
> lm() ->
> [c:l(M) || M <- mm()].
>
> mm() ->
> modified_modules().
>
> modified_modules() ->
> [M || {M, _} <- code:all_loaded(), module_modified(M) == true].
>
> module_modified(Module) ->
> case code:is_loaded(Module) of
> {file, preloaded} ->
> false;
> {file, Path} ->
> CompileOpts = proplists:get_value(compile,
> Module:module_info()),
> CompileTime = proplists:get_value(time, CompileOpts),
> Src = proplists:get_value(source, CompileOpts),
> module_modified(Path, CompileTime, Src);
> _ ->
> false
> end.
>
> module_modified(Path, PrevCompileTime, PrevSrc) ->
> case find_module_file(Path) of
> false ->
> false;
> ModPath ->
> case beam_lib:chunks(ModPath, ["CInf"]) of
> {ok, {_, [{_, CB}]}} ->
> CompileOpts = binary_to_term(CB),
> CompileTime = proplists:get_value(time, CompileOpts),
> Src = proplists:get_value(source, CompileOpts),
> not (CompileTime == PrevCompileTime) and (Src ==
> PrevSrc);
> _ ->
> false
> end
> end.
>
> find_module_file(Path) ->
> case file:read_file_info(Path) of
> {ok, _} ->
> Path;
> _ ->
> %% may be the path was changed?
> case code:where_is_file(filename:basename(Path)) of
> non_existing ->
> false;
> NewPath ->
> NewPath
> end
> end.
> -------------------------------------------
>
>
> Cheers, Tobbe
>
>
> Roberto Saccon wrote:
> > In the past and with various frameworks / languages, the steps for
> > deploying an app on a production machine for me looks always something
> > like that ?
> >
> > stop web server (or app server)
> > create new app root directory
> > install the new release (the complete app) into the new app root directory
> > update database if necessary
> > move symbolic link to new to the new app root directory
> > start web server (or app server)
> >
> > (In RubyOnRails all these steps can even be automated, including
> > checkout from Subversion)
> >
> > But now with Erlang and yaws we have hot code swap and there is no
> > need to shut down the server. So has anybody experience or suggestions
> > for a good way to deploy a yaws app so it runs without interruption
> > while updating, but still having a quick-access fallback solution in
> > case something goes wrong with the update ?
> >
> > regards
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Erlyaws-list mailing list
> Erlyaws-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlyaws-list
>
--
Roberto Saccon
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist |
|
|
| Back to top |
|
| wuji |
Posted: Tue Aug 28, 2012 8:10 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
"He's responding better than expected."Oberle's friends in Texas are raising raising [h3]Cheap Ralph Lauren Shirts[/h3] raising funds for his care, hoping he can one day
back to doing what he loves."He's not going to quit," quit," cheap Ralph Lauren quit," said friend Anthony Reimherr. "He never gives up."What's Next
Health Care? Implementation of Law Goes AheadWhat's Next in Health Health replica designer *beep* Health Care? Implementation of Law Goes AheadBy Kelly Kennedy, Janice
and Liz Szabo, USA TODAYWASHINGTON The waiting game is is cheap replica *beep* is over for consumers, employers, health care providers and insurers.
Supreme Court ruling that upheld the 2010 health care law law designer replica *beep* law means ongoing trends will continue, and those who waited
the sidelines for the court will now have to implement implement cheap polo shirts implement their parts of the law.For consumers, that means that |
|
|
| Back to top |
|
| mbtshoes88 |
Posted: Wed Sep 19, 2012 7:47 am |
|
|
|
User
Joined: 18 Sep 2012
Posts: 30
|
| Combine it with black or brown Cheap Armani Watches shoes, even white if you want to look different. Replica Armani Watches Standard blue generally means navy blue and Emporio Armani not any other paler shades of blue that will look odd. Classic Gray: Can be worn for different occasions and this will make even ladies turn their heads to notice you. Grays also look imposing Cheap Armani Shoes with different stripes and patterns classic gray suits are the hallmark of a gentleman. Cheap Georgio Armani Basic Black: The favorite suit of many well-dressed men and goes well Armani Online with a good white shirt. If you Armani Outlet can afford only one suit, Armani Suits then prefer this versatile Basis Black. As a fourth choice, you can select any of the above three with pinstripes. Cheap Armani Online Men Cheap Armani of average physical build Cheap Emporio Armani can choose either single-breasted or double-breasted Georgio Armani jackets. Double-breasted jackets are intended for slim men so that their leanness is not too visible and single-breasted jackets are meant for the stout to somewhat hide their obesity. Choose the jacket style Armani Sale that best suits your build. fmzds120823 The jackets must be of perfect fit and cause no wrinkles when you button them up. As far as possible, shoulder pads should be avoided and your tailor should guide you in Cheap Armani Suits this regard. You must now choose a trouser style although most men do not attach much Cheap Amarni EA7 importance to trousers and accept any pants that come with a jacket. When you discuss trousers, you need to worry about waist, drape, belt-loops, posterior-hugging, crotch-dangling, and whether or not you need a watch pocket. The best way to judge a pair of pants is to ask “Will I be able to wear these pants without the jacket and still look fine?” If the answer is Cheap Armani Outlet yes, then the pant is of perfect style and fit. Sometimes it is good to heed to the advice of a salesman and buy two pants for the same jacket. The idea is you can alternate pants with the jacket so they wear evenly over time. There may be occasions you may wear the pants minus Armani Shirts the jacket, it Cheap Armani Sale is always prudent to have a back-up pair. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|