Sinan 2.1.3

33 views
Skip to first unread message

Eric Merritt

unread,
Feb 28, 2012, 10:58:48 PM2/28/12
to erlware-...@googlegroups.com, erlwa...@googlegroups.com
sinan 2.1.3 -

Make sure failed tests return a non-zero value to the command line.

https://github.com/downloads/erlware/sinan/sinan (Ubuntu PPA updated as well)

Jordan Wilberding

unread,
Mar 1, 2012, 8:06:36 PM3/1/12
to erlwa...@googlegroups.com, erlware-...@googlegroups.com
Do you maintain the PPA or someone else?


--
You received this message because you are subscribed to the Google Groups "erlware-dev" group.
To post to this group, send email to erlwa...@googlegroups.com.
To unsubscribe from this group, send email to erlware-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/erlware-dev?hl=en.


Eric Merritt

unread,
Mar 1, 2012, 8:23:41 PM3/1/12
to erlwa...@googlegroups.com, erlware-...@googlegroups.com

I do for afiniate. We are making packages for everything we depend on. That includes all the sinan stuff

On Mar 1, 2012 7:06 PM, "Jordan Wilberding" <jwilb...@gmail.com> wrote:

Do you maintain the PPA or someone else?

On Tue, Feb 28, 2012 at 10:58 PM, Eric Merritt <ericbm...@gmail.com> wrote:

>
> sinan 2.1.3  -
>
> Make sure failed tests return a non-zero value to the command line.
>

> https...


--
You received this message because you are subscribed to the Google Groups "erlware-dev" group.
To post to this group, send email to erlwa...@googlegroups.com.
To unsubscribe from this group, send email to erlware-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/erlware-dev?hl=en.

Stan McQueen

unread,
Mar 12, 2012, 6:13:07 PM3/12/12
to erlwa...@googlegroups.com
Is there a way to convert old sinan 1.0.1 projects to the new sinan?
When I try to build (via "sinan dist") my old projects, I get various
errors. We have an extensive server architecture that is being built
with sinan and faxien and after installing Erlang R15, sinan 1.0.1
will no longer run.

Stan

Eric Merritt

unread,
Mar 12, 2012, 6:18:52 PM3/12/12
to erlwa...@googlegroups.com
Stan,

From sinan 1.0.1 to the 2.0.0 and beyond the main user visible things
that changed is the sinan config. Mostly this was a move towards a
term format for the config and more flexible configuration. If you
where not using the config before you should be able to nuke the old
sinan config and have the new sinan just work.

Obviously, that doesn't seem to be happening here but without seeing
any of your errors its hard to tell what is actually broken.

Eric

Stan McQueen

unread,
Mar 13, 2012, 4:58:39 PM3/13/12
to erlwa...@googlegroups.com
That works; thanks very much. Now my problem is as follows:

We're currently building with sinan, publishing to a portius repo with
faxien, and finally using faxien to install new releases on our test
and production servers. The new sinan doesn't seem to produce a
configuration that faxien understands. Previously, i could build a
release that contained a number of sub-projects, then "faxien publish"
would publish the appropriate combination of libs and releases to
portius. This process has been working very well for the 1.0 release
of our new servers.

Is there an erlware replacement for this build-publish-deploy process?

Stan

Stan McQueen

unread,
Mar 13, 2012, 6:12:02 PM3/13/12
to erlwa...@googlegroups.com
I may have this working, now. I found the documentation on specifying
dependencies in sinan and that appears to solve my problem. If there
is more that I should know about this, I would appreciate the
information.

Thanks,
Stan

Stan McQueen

unread,
Mar 13, 2012, 6:15:37 PM3/13/12
to erlwa...@googlegroups.com
Sorry, I guess I spoke too soon! Apparently I had a _build/development
directory left over from a prior sinan 1.0.1 build. After clearing it
out and then building with the new sinan, I am still not able to
publish with faxien.

Stan

Eric Merritt

unread,
Mar 14, 2012, 11:06:23 AM3/14/12
to erlwa...@googlegroups.com
On Tue, Mar 13, 2012 at 3:58 PM, Stan McQueen <stan.m...@gmail.com> wrote:
> That works; thanks very much. Now my problem is as follows:
>
> We're currently building with sinan, publishing to a portius repo with
> faxien, and finally using faxien to install new releases on our test
> and production servers. The new sinan doesn't seem to produce a
> configuration that faxien understands. Previously, i could build a
> release that contained a number of sub-projects, then "faxien publish"
> would publish the appropriate combination of libs and releases to
> portius. This process has been working very well for the 1.0 release
> of our new servers.
>
> Is there an erlware replacement for this build-publish-deploy process?

At the moment, no unfortunately. We are talking about a new and very
interesting replacement for faxien/sinan. I suspect strongly that that
will actually happen in the next few months. But it doesn't exist yet.
There is a further misfortune that it doesn't exist currently in the
larger erlang community either.

There are three routes I think for you though none super wonderful

1) Continue to use faxien/sinan 1.0.0 series
2) Migrate to native packages for your platform
3) Wait for the new replacement

I think 1 is probably not viable in the long term, as that
faxien/sinan series bitrots.

2 actually works well though there is a lot of upfront work. If you go
this route all of the usual build and deployment tools work. The
downside is you have to learn packages and setup a native repo etc.
However, this is the approach I took for the startup i am building.

3 would work as well, there is always a danger in waiting for
something that doesn't exist but I am becoming more and more confident
that we will build it. In this case you could continue down your
present path with faxien/sinan until the replacement happens.

There is an implicit 4th option that is rolling your own. I recommend
against this. If you want to go that route its probably better to
participate in 3 with us.

If you want to go the second route and are using debian I can help you
there. I have a lot of recent experiance packaging OTP Apps for
debian.

(not what you may have wanted to hear I know)

Eric Merritt

unread,
Mar 14, 2012, 11:07:32 AM3/14/12
to erlwa...@googlegroups.com
Stan,

I am not surprised. Sinan changed the layout of the build directory in
2.0 and that is probably what is screwing faxien. You can probably
point faxien directly to the built apps (via a path) and it will
handle things correctly though. Its more work but is doable.

Eric

Stan McQueen

unread,
Mar 14, 2012, 12:45:43 PM3/14/12
to erlwa...@googlegroups.com
Eric,

Thanks for your reply (and thanks again to you, Martin, and Richard
for writing "Erlang and OTP in Action." I have the original eBook
version as well as the published one. The original is what got me
started on the Erlware tools).

Unfortunately, I haven't been able to get sinan 1.x to run under
Erlang R15; that's what initiated this whole process. (I had to
upgrade to R15 to fix a bug in the public_key module, although I could
also attempt a patch). So at this point I am somewhat committed to
coming up with a deployment solution for the following version of our
server. We're preparing to deploy the second version (1.1) of our
server, but that one is still on R14B04, so our existing Erlware tools
work fine. The following version, version 1.2, is the one that
requires the public_key fix (apparently Macintosh self-signed SSL
certs aren't handled correctly by the R14B04 public_key module).

For some background, we have two eleven-machine clusters (not counting
the firewall and load balancers), one for production and one for test.
Of the eleven machines, two are Erlang servers (the others are tomcat
servers, MongoDB servers, RabbitMQ servers, etc), each with a
complement of several major Erlang components made up of several
applications each. Deploying a new version involves pulling down two
major packages from portius and installing them via faxien. One
package consists of four applications and the other has approximately
20 applications. So the deployment and installation is somewhat
complex. To date, we have used the Erlware tools quite successfully
and I am reluctant to move in another direction unless forced.

Sinan 2.x produces a directory structure that doesn't seem compatible
with faxien. Under sinan 1.x, the structure was
"_build/development/apps" while under sinan 2.x, it is
"_build/<NAME>/lib". I tried to point "faxien publish" at the
subdirectories under "lib", but got a function_clause error from
ewr_repo_paths, possibly caused by a mismatch between the erts version
and the compiler version. I'll continue to look at this.

The tar file produced by "sinan dist" appears to contain everything I
need to deploy, but I'm not sure how to do it. I'm thinking of storing
it in MongoDB and creating an escript to retrieve it, unpack it, and
distribute it to the Erlang lib and release directories to simulate
what the current faxien/portius combination does.

I would love to use the platform tools; unfortunately, although we
develop on Ubuntu and could use the Debian packages there, the
production servers are Gentoo (our IT department loves it for some
reason).

Stan

Eric Merritt

unread,
Mar 14, 2012, 1:08:39 PM3/14/12
to erlwa...@googlegroups.com
On Wed, Mar 14, 2012 at 11:45 AM, Stan McQueen <stan.m...@gmail.com> wrote:
> Eric,
>
> Thanks for your reply (and thanks again to you, Martin, and Richard
> for writing "Erlang and OTP in Action." I have the original eBook
> version as well as the published one. The original is what got me
> started on the Erlware tools).
>
> Unfortunately, I haven't been able to get sinan 1.x to run under
> Erlang R15; that's what initiated this whole process. (I had to
> upgrade to R15 to fix a bug in the public_key module, although I could
> also attempt a patch). So at this point I am somewhat committed to
> coming up with a deployment solution for the following version of our
> server. We're preparing to deploy the second version (1.1) of our
> server, but that one is still on R14B04, so our existing Erlware tools
> work fine. The following version, version 1.2, is the one that
> requires the public_key fix (apparently Macintosh self-signed SSL
> certs aren't handled correctly by the R14B04 public_key module).

Stan, I may be able to get a coupy of your version of sinan (the last
in the 1.0 series) and get that building under R15. It sounds like its
pretty important to your business. I wont commit to supporting it
indefinitely but I can probably help you out of this hole.

>
> For some background, we have two eleven-machine clusters (not counting
> the firewall and load balancers), one for production and one for test.
> Of the eleven machines, two are Erlang servers (the others are tomcat
> servers, MongoDB servers, RabbitMQ servers, etc), each with a
> complement of several major Erlang components made up of several
> applications each. Deploying a new version involves pulling down two
> major packages from portius and installing them via faxien. One
> package consists of four applications and the other has approximately
> 20 applications. So the deployment and installation is somewhat
> complex. To date, we have used the Erlware tools quite successfully
> and I am reluctant to move in another direction unless forced.
>
> Sinan 2.x produces a directory structure that doesn't seem compatible
> with faxien. Under sinan 1.x, the structure was
> "_build/development/apps" while under sinan 2.x, it is
> "_build/<NAME>/lib". I tried to point "faxien publish" at the
> subdirectories under "lib", but got a function_clause error from
> ewr_repo_paths, possibly caused by a mismatch between the erts version
> and the compiler version. I'll continue to look at this.

Sinan 2.0 changed to be more directly compatible with an OTP Release
and more or less disregarded faxien since it was deprecated at that
point.

>
> The tar file produced by "sinan dist" appears to contain everything I
> need to deploy, but I'm not sure how to do it. I'm thinking of storing
> it in MongoDB and creating an escript to retrieve it, unpack it, and
> distribute it to the Erlang lib and release directories to simulate
> what the current faxien/portius combination does.

Tristan does something very similar to this and has lots of experience
managing deployments like this. I will has him to chime in with
advice.

>
> I would love to use the platform tools; unfortunately, although we
> develop on Ubuntu and could use the Debian packages there, the
> production servers are Gentoo (our IT department loves it for some
> reason).

ah, understandable. Well lets get you out of this hole and then we can
figure out a long term solution.

Stan McQueen

unread,
Mar 14, 2012, 2:17:12 PM3/14/12
to erlwa...@googlegroups.com
That would be great, thanks. I've tried changing ERTS_VSN in the sinan
script to 5.9. When I do that, I get errors because prim_inet:open/2
is undefined. Using ERTS_VSN of 5.8.4 or 5.8.5 causes errors in
epp:parse_file. I've also tried using the new sinan to build
sinan-1.0.1 under R15, but get lots of errors trying that.

Stan

Eric Merritt

unread,
Mar 14, 2012, 5:42:19 PM3/14/12
to erlwa...@googlegroups.com
Stan,

Because of the nature of erlangs code loader you cant actually use
sinan to build sinan, at least not without a bunch of head twisting,
which is what the makefile does.

Attached is a version of sinan-1.0.1 compiled on R15. You can drop it
in though you will need to change the erts to 5.9.

You should also probably change the rel file and run make_script
again. (I actually suspect this is your problem on starting in 5.9)

I realize this is non-optimal, but I am really not set up to build
1.0.1 anymore. If we continue to run into problems I may just have to
though.

sinan-1.0.1.tar.gz

Stan McQueen

unread,
Mar 14, 2012, 6:57:04 PM3/14/12
to erlwa...@googlegroups.com
Thanks, Eric. It works up to a point. I updated sinan.rel with the R15
versions of all the dependencies and ran make_script to produce
sinan.script and sinan.boot. When I attempt to run "sinan dist" the
release step fails with the error message "build problem
sin_task_release:209 [release_script_generation_error] *WARNING* :
Missing application sasl. Can not upgrade with this release".
Interestingly, the .boot, .script, and .rel files are created, but the
error means that sinan doesn't proceed to the dist task to create a
tarball that faxien can publish.

Running "sinan shell" and starting appmon shows that sasl is running,
so I don't know what the problem is. Perhaps there is still a
configuration issue. Just in case you can use it, I've attached my
sinan.rel file.

I certainly appreciate all your efforts. I know that this is a
distraction from your normal workload and I'm very sorry for that. I
was able to deploy our server apps by hand to my development server
and verify that R15 does fix the problem with public_key, so it's
worthwhile for me to continue the effort to more to the new version of
Erlang.

Stan

sinan.rel

Eric Merritt

unread,
Mar 14, 2012, 9:23:48 PM3/14/12
to erlwa...@googlegroups.com
Stan,

I should have mentioned. In the rel file you will see a bunch of
tuples of <app>, <vsn>. The versions in the rel file there are
probably wrong for 5.9. It should be pretty easy to update it and
rerun the make_script. All the apps specified there and the versions
must exist.

On Wed, Mar 14, 2012 at 5:57 PM, Stan McQueen <stan.m...@gmail.com> wrote:
> Thanks, Eric. It works up to a point. I updated sinan.rel with the R15
> versions of all the dependencies and ran make_script to produce
> sinan.script and sinan.boot. When I attempt to run "sinan dist" the
> release step fails with the error message "build problem
> sin_task_release:209 [release_script_generation_error] *WARNING* :
> Missing application sasl. Can not upgrade with this release".
> Interestingly, the .boot, .script, and .rel files are created, but the
> error means that sinan doesn't proceed to the dist task to create a
> tarball that faxien can publish.
>
> Running "sinan shell" and starting appmon shows that sasl is running,
> so I don't know what the problem is. Perhaps there is still a
> configuration issue. Just in case you can use it, I've attached my
> sinan.rel file.
>
> I certainly appreciate all your efforts. I know that this is a
> distraction from your normal workload and I'm very sorry for that. I
> was able to deploy our server apps by hand to my development server
> and verify that R15 does fix the problem with public_key, so it's
> worthwhile for me to continue the effort to more to the new version of
> Erlang.

No worries and Let me know if there is anything I can do to help.

Martin Logan

unread,
Mar 14, 2012, 10:30:01 PM3/14/12
to erlwa...@googlegroups.com
Stan, send me the error log file from Faxien and I will take a look.
It may be rather easy to fix the faxien issue for you.

--
Martin Logan
Erlang & OTP in Action (Manning) http://manning.com/logan
http://twitter.com/martinjlogan
http://erlware.org

Stan McQueen

unread,
Mar 15, 2012, 10:39:34 AM3/15/12
to erlwa...@googlegroups.com
Right, yes I did that; make_script wouldn't run to completion until
all the tuples in the .rel file had the correct versions of each of
the apps. But even with the new .rel file, I get the error (actually a
"warning", but it terminates processing) that the sasl application is
missing. As I mentioned, it still creates the .script and .boot files,
but then terminates without proceeding to the tarball creation phase.

Stan

Stan McQueen

unread,
Mar 15, 2012, 11:10:48 AM3/15/12
to erlwa...@googlegroups.com
More information. I finally figured out that it is not the sinan.rel
that is causing the problem. The problem is that the generated .rel
file for the application being built does not contain an entry for
sasl. Version 2.2 of sasl requires that sasl be included in the .rel
file for the application to be upgradeable. If it is not there, you
can't upgrade the app. I have now succeeded in building sinan under
R15 myself (thanks for a few hints), so I can probably add an entry
for sasl when the .rel file is generated. I'll let you know how it
goes.

Stan

Stan McQueen

unread,
Mar 15, 2012, 12:57:51 PM3/15/12
to erlwa...@googlegroups.com
I created version 1.0.2 of sinan and modified sin_task_release.erl to
retrieve the version of the sasl application and add it to the .rel
file. That is now working and looks like our product is now buildable
and deployable on R15 with sinan 1.0.2. I did not have to make any
modifications to faxien. If anybody wants my code for this
(retro)version of sinan, I would be happy to provide it.

Thanks for all your help; it really got me over a rough spot for our
server development.

I would be very interested in participating in the future development
of sinan and whatever the replacement for faxien/portius will be.

Thanks again,
Stan

Eric Merritt

unread,
Mar 15, 2012, 1:03:02 PM3/15/12
to erlwa...@googlegroups.com
Stan,

Great! I am glad you are in a good place.

There has been an ongoing conversation between myself and a couple of
other folks on a faxien/sinan replacement for the last couple of weeks
on erlware-questions. I suspect strongly that we will actually build
this. If you want to participate going and picking up those archives
(basically anything from me or tim watson in the last few weeks) and
catching up would be very worthwhile. It looks like we are getting
started with a new phase of development and now is a great time to get
involved.

Eric

Stan McQueen

unread,
Mar 15, 2012, 4:44:53 PM3/15/12
to erlwa...@googlegroups.com
I tried to look at the erlware-questions group and got the following:

"Sorry...
The owner of this group has banned you from this group."

???

Stan

Eric Merritt

unread,
Mar 15, 2012, 5:01:10 PM3/15/12
to erlwa...@googlegroups.com
Stan,

I found another email address for you banned. I have no idea what that
is the case. I unbanned that email so hopefully you should be able to
get in now.

Eric

Stan McQueen

unread,
Mar 15, 2012, 5:42:52 PM3/15/12
to erlwa...@googlegroups.com
Great thanks!

I have several emails, all of which forward to my main gmail address
(bull...@gmail.com), so maybe one of those got banned somehow. In
any case, I'm in now!

By the way, we just finished deploying our 1.1 server a few minutes
ago (still under R14B04), so we'll be moving to R15 for the next
version. Your help couldn't have come at a better time!

I'm looking forward to seeing the next step!

Stan

Stan McQueen

unread,
Mar 15, 2012, 6:42:31 PM3/15/12
to erlwa...@googlegroups.com
Martin,

Thanks for the offer. The main issue is just that the new sinan
doesn't produce an output that is compatible with faxien. With much
help from Eric, I have been able to build a version of sinan 1.x under
R15, so for the moment we're able to press forward with converting our
server code to the R15 base. I'm hoping I can just wait for the new
faxien/portius replacement before moving up to the new sinan now that
I have the old one working. I also hope to be able to participate in
the development of that replacement.

stan

Reply all
Reply to author
Forward
0 new messages