Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc

vmod-bootstrap

 

 

Varnish misc RSS feed   Index | Next | Previous | View Threaded


cosimo at streppone

Mar 23, 2012, 10:26 AM

Post #1 of 6 (479 views)
Permalink
vmod-bootstrap

During today's VUG5 dev meeting, we discussed
vmod development, and looks like most people
are interested in it.

Now, I may be a bit slow to understand how to build
a vmod, but my personal view is I don't like copying and
pasting stuff around to start something new.

For this reason, during this morning dev meeting,
I hacked together, with a bit of spit and duct tape,
sorry for that, vmod-bootstrap.

https://github.com/cosimo/vmod-bootstrap/

vmod-bootstrap is a script that will generate
a new vmod skeleton for you.

It needs a "vmod.conf" file:

{
"name" : "frobnicator",
"author" : "James J. Hacker",
"version" : "0.01",
"src" : "src/vmod_frobnicator.vcc",
"required_libs" : [
{
"name" : "mhash",
"function" : "mhash_count",
},
],
"copyright" : "Copyright (c) 2012 James J. Hacker",
"repository" : "git://github.com/jamesjhacker/vmod-frobnicator",
...
yadda yadda
...
}

Run vmod-bootstrap and it will:

- check pre-requisite packages (automake, libtool and friends)
- build autoconf and automake files
- inflate "m4" and "src" dirs

so you can hopefully run ./autogen.sh && ./configure.

Pointless? Yeah, probably. It helps me in 3 ways:

- understanding which of these files are actually necessary
- saves me time doing search/replace
- keeps all files consistent

Additional intelligence can be hardwired directly into the bootstrap tool,
which makes it really interesting going forward, where now is quite
stupid.

Bonus idea: take all the vmod.conf you can find, and
build a tool that automatically clones the sources, builds
and installs/packages the vmod, cpanm-like.

Thoughts?

--
Cosimo

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


straightflush at gmail

Mar 23, 2012, 11:35 AM

Post #2 of 6 (449 views)
Permalink
Re: vmod-bootstrap [In reply to]

You should try and merge with the existing template out there
https://github.com/varnish/libvmod-example



On Fri, Mar 23, 2012 at 1:26 PM, Cosimo Streppone <cosimo [at] streppone>wrote:

> During today's VUG5 dev meeting, we discussed
> vmod development, and looks like most people
> are interested in it.
>
> Now, I may be a bit slow to understand how to build
> a vmod, but my personal view is I don't like copying and
> pasting stuff around to start something new.
>
> For this reason, during this morning dev meeting,
> I hacked together, with a bit of spit and duct tape,
> sorry for that, vmod-bootstrap.
>
> https://github.com/cosimo/**vmod-bootstrap/<https://github.com/cosimo/vmod-bootstrap/>
>
> vmod-bootstrap is a script that will generate
> a new vmod skeleton for you.
>
> It needs a "vmod.conf" file:
>
> {
> "name" : "frobnicator",
> "author" : "James J. Hacker",
> "version" : "0.01",
> "src" : "src/vmod_frobnicator.vcc",
> "required_libs" : [.
> {
> "name" : "mhash",
> "function" : "mhash_count",
> },
> ],
> "copyright" : "Copyright (c) 2012 James J. Hacker",
> "repository" : "git://github.com/**jamesjhacker/vmod-frobnicator<http://github.com/jamesjhacker/vmod-frobnicator>
> "**,
> ...
> yadda yadda
> ...
> }
>
> Run vmod-bootstrap and it will:
>
> - check pre-requisite packages (automake, libtool and friends)
> - build autoconf and automake files
> - inflate "m4" and "src" dirs
>
> so you can hopefully run ./autogen.sh && ./configure.
>
> Pointless? Yeah, probably. It helps me in 3 ways:
>
> - understanding which of these files are actually necessary
> - saves me time doing search/replace
> - keeps all files consistent
>
> Additional intelligence can be hardwired directly into the bootstrap tool,
> which makes it really interesting going forward, where now is quite
> stupid.
>
> Bonus idea: take all the vmod.conf you can find, and
> build a tool that automatically clones the sources, builds
> and installs/packages the vmod, cpanm-like.
>
> Thoughts?
>
> --
> Cosimo
>
> ______________________________**_________________
> varnish-misc mailing list
> varnish-misc [at] varnish-cache
> https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc<https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc>
>


cosimo at streppone

Mar 23, 2012, 11:39 AM

Post #3 of 6 (444 views)
Permalink
Re: vmod-bootstrap [In reply to]

On Fri, 23 Mar 2012 19:35:28 +0100, AD <straightflush [at] gmail> wrote:

> You should try and merge with the existing template out there
> https://github.com/varnish/libvmod-example

Okay...

that's exactly what I thought I did.

The files that vmod-bootstrap builds are exactly
the same files that you find in libvmod-example.

Maybe I didn't understand your comment?

--
Cosimo

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


straightflush at gmail

Mar 23, 2012, 12:45 PM

Post #4 of 6 (451 views)
Permalink
Re: vmod-bootstrap [In reply to]

no i just wasnt sure if you were aware of it since I think its what people
are using to start their vmod dev. Sorry, i didnt fully check your repo i
was just pointing it out.


On Fri, Mar 23, 2012 at 2:39 PM, Cosimo Streppone <cosimo [at] streppone>wrote:

> On Fri, 23 Mar 2012 19:35:28 +0100, AD <straightflush [at] gmail> wrote:
>
> You should try and merge with the existing template out there
>> https://github.com/varnish/**libvmod-example<https://github.com/varnish/libvmod-example>
>>
>
> Okay...
>
> that's exactly what I thought I did.
>
> The files that vmod-bootstrap builds are exactly
> the same files that you find in libvmod-example.
>
> Maybe I didn't understand your comment?
>
>
> --
> Cosimo
>
> ______________________________**_________________
> varnish-misc mailing list
> varnish-misc [at] varnish-cache
> https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc<https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc>
>


cosimo at streppone

Mar 23, 2012, 3:48 PM

Post #5 of 6 (443 views)
Permalink
Re: vmod-bootstrap [In reply to]

On Fri, 23 Mar 2012 20:45:31 +0100, AD <straightflush [at] gmail> wrote:

> no i just wasnt sure if you were aware of it since I think its what
> people are using to start their vmod dev.
> Sorry, i didnt fully check your repo i was just pointing it out.

No problem.

I've been thinking more about this coming back from VUG5.
Trying to imagine the future a little... :)
What if vmod-bootstrap was renamed into varnishmod?

Could it grow into a tool to be shipped with varnish?
Examples:

# Create a new module skeleton
varnishmod bootstrap [--config vmod.conf]

# Operate on the local module in ./ ?
varnishmod {build,test,install}

# List all available VMODs, consulting a central db SomeWhere(tm)
varnishmod list

# Publish this new module in the central db (w/ some screening?)
varnishmod push [--config vmod.conf]

# Download a remote module and optionally install it
varnishmod download digest
cd libvmod-digest
varnishmod install

So, it just makes it simpler to boot the process of VMOD
development, but it also paves the way for further
interesting next steps.

--
Cosimo

_______________________________________________
varnish-misc mailing list
varnish-misc [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


straightflush at gmail

Mar 26, 2012, 6:24 AM

Post #6 of 6 (427 views)
Permalink
Re: vmod-bootstrap [In reply to]

Interesting concept kind of like gems in ruby. I would be up for helping
out with something like that.

On Fri, Mar 23, 2012 at 6:48 PM, Cosimo Streppone <cosimo [at] streppone>wrote:

> On Fri, 23 Mar 2012 20:45:31 +0100, AD <straightflush [at] gmail> wrote:
>
> no i just wasnt sure if you were aware of it since I think its what
>> people are using to start their vmod dev.
>> Sorry, i didnt fully check your repo i was just pointing it out.
>>
>
> No problem.
>
> I've been thinking more about this coming back from VUG5.
> Trying to imagine the future a little... :)
> What if vmod-bootstrap was renamed into varnishmod?
>
> Could it grow into a tool to be shipped with varnish?
> Examples:
>
> # Create a new module skeleton
> varnishmod bootstrap [--config vmod.conf]
>
> # Operate on the local module in ./ ?
> varnishmod {build,test,install}
>
> # List all available VMODs, consulting a central db SomeWhere(tm)
> varnishmod list
>
> # Publish this new module in the central db (w/ some screening?)
> varnishmod push [--config vmod.conf]
>
> # Download a remote module and optionally install it
> varnishmod download digest
> cd libvmod-digest
> varnishmod install
>
> So, it just makes it simpler to boot the process of VMOD
> development, but it also paves the way for further
> interesting next steps.
>
>
> --
> Cosimo
>
> ______________________________**_________________
> varnish-misc mailing list
> varnish-misc [at] varnish-cache
> https://www.varnish-cache.org/**lists/mailman/listinfo/**varnish-misc<https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc>
>

Varnish misc RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.