Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/cf6a25a2/attachment.htm
I setup a subversion server and a trunk for my different server configs. You might look at that, it does not appear to keep file level versions, but it works great here. On 6/2/06, Douglas Garstang <dgarstang@oneeighty.com> wrote:> > Has anyone got any neat solutions for Asterisk .conf file revision > control? > > We have multiple Asterisk boxes here, that we'd like to maintain a > _mostly_ common set of conf files on. They aren't all the same though. > There's subtle differences. For example, in sip.conf, iax.conf etc, the > bindaddr setting is different. Dundi.conf is very different between each > system. > > At the moment I have a file tree on a separate server, and I use the m4 > processor to replace certain unique sections of the files. I have a bunch of > scripts to build sip.conf etc and then rsync the files out to the servers. > It works, mostly, but it isn't elegant. > > I'd like to revision control all this. I don't know how it could be done > with revision control though. As I said, not all the files are the same. I > don't know if we'd run a version control client on each Asterisk box, or if > we'd run it centrally, and then use rsync again, to copy the files out. > > Doug. > > > > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > >-- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/24e93d00/attachment.htm
The first situation you mention can be solved by creating separate files that contain the unique elements, and then including them in the main files where all the commonality is. That is how we do things, and it works well for us. It may be a little cumbersome if you have a *lot* of uniqueness, but if you really want to share a significant portion of the configs this is the only way I know of to do it. As for revision control, we use Subversion with a branch for each server containing the unique files. All of our configuration scripts also include automatic checkins of changed files (we can always revert if need be). It also makes it easy to spot changes if something goes wrong, as an svn diff will tell you. Regards, - Brad -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Douglas Garstang Sent: Friday, June 02, 2006 4:43 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Config Revision Control Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/c55a4e35/attachment.htm
But you still have to maintain a completely separate copy for each server by doing that don't you? That's what I am hoping to avoid. It doesn't keep file level versions? Subversion doesn't do that? -----Original Message----- From: Bruce Reeves [mailto:asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:03 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control I setup a subversion server and a trunk for my different server configs. You might look at that, it does not appear to keep file level versions, but it works great here. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/a89e538a/attachment.htm
Brad, Not sure if #include statments will help. For that to work, there would have to be a separate directory structure for each server. I'd like to keep it as common as possible. If we had, on our first pbx server... [general] context=frompstn_start allowguest=yes bindport=5060 #include "binaddr.conf" and bindaddr.conf had: binaddr=192.168.10.10 then it's specific to a certain host. It doesn't add any value. I might as well just stick it in the main file. Now, if we could do some sort of variable substition, THAT might work. Doug. -----Original Message----- From: Watkins, Bradley [mailto:Bradley.Watkins@compuware.com] Sent: Friday, June 02, 2006 3:06 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Config Revision Control The first situation you mention can be solved by creating separate files that contain the unique elements, and then including them in the main files where all the commonality is. That is how we do things, and it works well for us. It may be a little cumbersome if you have a *lot* of uniqueness, but if you really want to share a significant portion of the configs this is the only way I know of to do it. As for revision control, we use Subversion with a branch for each server containing the unique files. All of our configuration scripts also include automatic checkins of changed files (we can always revert if need be). It also makes it easy to spot changes if something goes wrong, as an svn diff will tell you. Regards, - Brad -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Douglas Garstang Sent: Friday, June 02, 2006 4:43 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Config Revision Control Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. =00The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/60e06ccb/attachment.htm
Bruce, Do you run a subversion client on every Asterisk box, and get the files directly, or do run the subversion client on a single central server, and distrubute them from there? Doug. -----Original Message----- From: Bruce Reeves [mailto:asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:03 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control I setup a subversion server and a trunk for my different server configs. You might look at that, it does not appear to keep file level versions, but it works great here. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/fc0db759/attachment.htm
Ok, does anyone know if anyone has already created a guide for using subversion with Asterisk? I've hit a wall already, where the subversion docs say that your files _must_ go into a directory called trunk(huh? What's with that?). That's going to break Asterisk, who obviously wants conf files in /etc/asterisk. Grrrrr. -----Original Message----- From: Watkins, Bradley [mailto:Bradley.Watkins@compuware.com] Sent: Friday, June 02, 2006 3:06 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: RE: [Asterisk-Users] Config Revision Control The first situation you mention can be solved by creating separate files that contain the unique elements, and then including them in the main files where all the commonality is. That is how we do things, and it works well for us. It may be a little cumbersome if you have a *lot* of uniqueness, but if you really want to share a significant portion of the configs this is the only way I know of to do it. As for revision control, we use Subversion with a branch for each server containing the unique files. All of our configuration scripts also include automatic checkins of changed files (we can always revert if need be). It also makes it easy to spot changes if something goes wrong, as an svn diff will tell you. Regards, - Brad -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Douglas Garstang Sent: Friday, June 02, 2006 4:43 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Config Revision Control Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. =00The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/ff66fb5a/attachment.htm
Aaron, I'm trying to check-in (is that the right term?) the files for the first time. There's nothing in the repository yet. Doug.> -----Original Message----- > From: Aaron Daniel [mailto:amdtech@shsu.edu] > Sent: Friday, June 02, 2006 3:34 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] Config Revision Control > > > No, if you do an "svn co > http://svn.server.com/svn/configs/trunk asterisk" > in /etc, it'll make a folder called asterisk in your /etc > directory. Once > that's done, any modifications made that are committed to the > server can > be downloaded into /etc/asterisk by running "svn up" inside > the directory. > > Might need to get your brakes checked if you keep hitting walls :) > > On Fri, 2 Jun 2006, Douglas Garstang wrote: > > > Ok, does anyone know if anyone has already created a guide > for using subversion with Asterisk? > > I've hit a wall already, where the subversion docs say that > your files _must_ go into a directory called trunk(huh? > What's with that?). That's going to break Asterisk, who > obviously wants conf files in /etc/asterisk. > > Grrrrr. > > > > -----Original Message----- > > From: Watkins, Bradley [mailto:Bradley.Watkins@compuware.com] > > Sent: Friday, June 02, 2006 3:06 PM > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > Subject: RE: [Asterisk-Users] Config Revision Control > > > > > > The first situation you mention can be solved by creating > separate files that contain the unique elements, and then > including them in the main files where all the commonality > is. That is how we do things, and it works well for us. It > may be a little cumbersome if you have a *lot* of uniqueness, > but if you really want to share a significant portion of the > configs this is the only way I know of to do it. > > > > As for revision control, we use Subversion with a branch > for each server containing the unique files. All of our > configuration scripts also include automatic checkins of > changed files (we can always revert if need be). It also > makes it easy to spot changes if something goes wrong, as an > svn diff will tell you. > > > > Regards, > > - Brad > > > > -----Original Message----- > > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > Douglas Garstang > > Sent: Friday, June 02, 2006 4:43 PM > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > Subject: [Asterisk-Users] Config Revision Control > > > > > > Has anyone got any neat solutions for Asterisk .conf file > revision control? > > > > We have multiple Asterisk boxes here, that we'd like to > maintain a _mostly_ common set of conf files on. They aren't > all the same though. There's subtle differences. For example, > in sip.conf, iax.conf etc, the bindaddr setting is different. > Dundi.conf is very different between each system. > > > > At the moment I have a file tree on a separate server, and > I use the m4 processor to replace certain unique sections of > the files. I have a bunch of scripts to build sip.conf etc > and then rsync the files out to the servers. It works, > mostly, but it isn't elegant. > > > > I'd like to revision control all this. I don't know how it > could be done with revision control though. As I said, not > all the files are the same. I don't know if we'd run a > version control client on each Asterisk box, or if we'd run > it centrally, and then use rsync again, to copy the files out. > > > > Doug. > > > > > > > > > > > > =00The contents of this e-mail are intended for the named > addressee only. It contains information that may be > confidential. Unless you are the named addressee or an > authorized designee, you may not copy or use it, or disclose > it to anyone else. If you received it in error please notify > us immediately and then destroy it. > > > > > > -- > Aaron Daniel > Computer Systems Technician > Sam Houston State University > amdtech@shsu.edu > (936) 294-4198 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Bruce, But, if you have three servers that function the same, don't you have to check the file out three times and check it back in three times? Doug. -----Original Message----- From: Bruce Reeves [mailto:asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:34 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control I use subversion on a central server and then store each server that is different. The purpose behind it for me was 2 fold, first I have a backup of my configs centeralized and I can roll-back any changes. Second, I can checkout a servers files on a different machine to edit them if I want and check them back when finished. What I meant by file-level is if I edit sip.conf and check it in then the whole svn goes to a new version, not just that file. We use a M$ product that has version control at the file level, so for each file in the library there is a version history. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Bruce, Do you run a subversion client on every Asterisk box, and get the files directly, or do run the subversion client on a single central server, and distrubute them from there? Doug. -----Original Message----- From: Bruce Reeves [mailto: asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:03 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control I setup a subversion server and a trunk for my different server configs. You might look at that, it does not appear to keep file level versions, but it works great here. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Has anyone got any neat solutions for Asterisk .conf file revision control? We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out. Doug. _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Bruce Nortex Networks _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/d05c92f1/attachment.htm
> -----Original Message----- > From: Hadley Rich [mailto:asterisk@nice.net.nz] > Sent: Friday, June 02, 2006 3:49 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Config Revision Control > > > On Saturday 03 June 2006 09:37, Douglas Garstang wrote: > > Aaron, > > > > I'm trying to check-in (is that the right term?) the files > for the first > > time. There's nothing in the repository yet. > > http://svnbook.red-bean.comThat's the documentation that I have been referring to. It isn't particularly helpful. It's example says you MUST have a trunk directory for a start.
Bruce, I've been referring to the book at <http://svnbook.red-bean.com/nightly/en/svn-book.html> http://svnbook.red-bean.com/nightly/en/svn-book.html. The svn book's quick start says that you must have a trunk directory before you try and import for the first time. "For reasons that will be clear later (see <http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.branchmerge> Chapter 4, Branching and Merging), your project's tree structure should contain three top-level directories named branches, tags, and trunk" The quick start also does not address how to log in with the credentials necessary to actually do this... I get... svn import /etc/asterisk svn://216.187.142.202/usr/subversion Authentication realm: <svn://216.187.142.202:3690> example realm Password for 'root': What's the syntax for specifying a user? Is it svn import /etc/asterisk user@svn://216.187.142.202/usr/subversion ??? Doug -----Original Message----- From: Bruce Reeves [mailto:asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:52 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control Are you following the quickstart in the SVN book? For the first time to import them in to a "folder" called trunk. Then as Aaron stated you can check or co the trunk to any folder. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Aaron, I'm trying to check-in (is that the right term?) the files for the first time. There's nothing in the repository yet. Doug.> -----Original Message----- > From: Aaron Daniel [mailto: <mailto:amdtech@shsu.edu> amdtech@shsu.edu] > Sent: Friday, June 02, 2006 3:34 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] Config Revision Control > > > No, if you do an "svn co > http://svn.server.com/svn/configs/trunk asterisk" > in /etc, it'll make a folder called asterisk in your /etc > directory. Once > that's done, any modifications made that are committed to the > server can > be downloaded into /etc/asterisk by running "svn up" inside > the directory. > > Might need to get your brakes checked if you keep hitting walls :) > > On Fri, 2 Jun 2006, Douglas Garstang wrote: > > > Ok, does anyone know if anyone has already created a guide > for using subversion with Asterisk? > > I've hit a wall already, where the subversion docs say that > your files _must_ go into a directory called trunk(huh? > What's with that?). That's going to break Asterisk, who > obviously wants conf files in /etc/asterisk. > > Grrrrr. > > > > -----Original Message----- > > From: Watkins, Bradley [mailto: Bradley.Watkins@compuware.com] > > Sent: Friday, June 02, 2006 3:06 PM > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > Subject: RE: [Asterisk-Users] Config Revision Control > > > > > > The first situation you mention can be solved by creating > separate files that contain the unique elements, and then > including them in the main files where all the commonality > is. That is how we do things, and it works well for us. It > may be a little cumbersome if you have a *lot* of uniqueness, > but if you really want to share a significant portion of the > configs this is the only way I know of to do it. > > > > As for revision control, we use Subversion with a branch > for each server containing the unique files. All of our > configuration scripts also include automatic checkins of > changed files (we can always revert if need be). It also > makes it easy to spot changes if something goes wrong, as an > svn diff will tell you. > > > > Regards, > > - Brad > > > > -----Original Message----- > > From: asterisk-users-bounces@lists.digium.com > [mailto: asterisk-users-bounces@lists.digium.com] On Behalf Of > Douglas Garstang > > Sent: Friday, June 02, 2006 4:43 PM > > To: Asterisk Users Mailing List - Non-Commercial Discussion > > Subject: [Asterisk-Users] Config Revision Control > > > > > > Has anyone got any neat solutions for Asterisk .conf file > revision control? > > > > We have multiple Asterisk boxes here, that we'd like to > maintain a _mostly_ common set of conf files on. They aren't > all the same though. There's subtle differences. For example, > in sip.conf, iax.conf etc, the bindaddr setting is different. > Dundi.conf is very different between each system. > > > > At the moment I have a file tree on a separate server, and > I use the m4 processor to replace certain unique sections of > the files. I have a bunch of scripts to build sip.conf etc > and then rsync the files out to the servers. It works, > mostly, but it isn't elegant. > > > > I'd like to revision control all this. I don't know how it > could be done with revision control though. As I said, not > all the files are the same. I don't know if we'd run a > version control client on each Asterisk box, or if we'd run > it centrally, and then use rsync again, to copy the files out. > > > > Doug. > > > > > > > > > > > > =00The contents of this e-mail are intended for the named > addressee only. It contains information that may be > confidential. Unless you are the named addressee or an > authorized designee, you may not copy or use it, or disclose > it to anyone else. If you received it in error please notify > us immediately and then destroy it. > > > > > > -- > Aaron Daniel > Computer Systems Technician > Sam Houston State University > amdtech@shsu.edu > (936) 294-4198 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >_______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/6cd9f07a/attachment.htm
Aaron, I followed the quick start guide and created the repository. It'd be really nice if it had some examples of directory structure so I could understand what I am doing. It also doesn't say how to pass the username and password from the svn client. It describes later, sort of, how to create users etc, but doesn't say how to log in, with the quick start guide. Doug.> -----Original Message----- > From: Aaron Daniel [mailto:amdtech@shsu.edu] > Sent: Friday, June 02, 2006 3:52 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] Config Revision Control > > > Read this: > > http://subversion.tigris.org/faq.html#repository > http://svn.collab.net/repos/svn/trunk/README > > That'll link you to the README that comes with subversion, > which has a > very detailed explanation on how to get a repo set up and > running :) If > it says anything in there about using "trunk", it's just a > suggestion. > Ours is split out by server name inside a "configs" folder. > > On Fri, 2 Jun 2006, Douglas Garstang wrote: > > > Aaron, > > > > I'm trying to check-in (is that the right term?) the files > for the first time. There's nothing in the repository yet. > > > > Doug. > > > >> -----Original Message----- > >> From: Aaron Daniel [mailto:amdtech@shsu.edu] > >> Sent: Friday, June 02, 2006 3:34 PM > >> To: Asterisk Users Mailing List - Non-Commercial Discussion > >> Subject: RE: [Asterisk-Users] Config Revision Control > >> > >> > >> No, if you do an "svn co > >> http://svn.server.com/svn/configs/trunk asterisk" > >> in /etc, it'll make a folder called asterisk in your /etc > >> directory. Once > >> that's done, any modifications made that are committed to the > >> server can > >> be downloaded into /etc/asterisk by running "svn up" inside > >> the directory. > >> > >> Might need to get your brakes checked if you keep hitting walls :) > >> > >> On Fri, 2 Jun 2006, Douglas Garstang wrote: > >> > >>> Ok, does anyone know if anyone has already created a guide > >> for using subversion with Asterisk? > >>> I've hit a wall already, where the subversion docs say that > >> your files _must_ go into a directory called trunk(huh? > >> What's with that?). That's going to break Asterisk, who > >> obviously wants conf files in /etc/asterisk. > >>> Grrrrr. > >>> > >>> -----Original Message----- > >>> From: Watkins, Bradley [mailto:Bradley.Watkins@compuware.com] > >>> Sent: Friday, June 02, 2006 3:06 PM > >>> To: Asterisk Users Mailing List - Non-Commercial Discussion > >>> Subject: RE: [Asterisk-Users] Config Revision Control > >>> > >>> > >>> The first situation you mention can be solved by creating > >> separate files that contain the unique elements, and then > >> including them in the main files where all the commonality > >> is. That is how we do things, and it works well for us. It > >> may be a little cumbersome if you have a *lot* of uniqueness, > >> but if you really want to share a significant portion of the > >> configs this is the only way I know of to do it. > >>> > >>> As for revision control, we use Subversion with a branch > >> for each server containing the unique files. All of our > >> configuration scripts also include automatic checkins of > >> changed files (we can always revert if need be). It also > >> makes it easy to spot changes if something goes wrong, as an > >> svn diff will tell you. > >>> > >>> Regards, > >>> - Brad > >>> > >>> -----Original Message----- > >>> From: asterisk-users-bounces@lists.digium.com > >> [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of > >> Douglas Garstang > >>> Sent: Friday, June 02, 2006 4:43 PM > >>> To: Asterisk Users Mailing List - Non-Commercial Discussion > >>> Subject: [Asterisk-Users] Config Revision Control > >>> > >>> > >>> Has anyone got any neat solutions for Asterisk .conf file > >> revision control? > >>> > >>> We have multiple Asterisk boxes here, that we'd like to > >> maintain a _mostly_ common set of conf files on. They aren't > >> all the same though. There's subtle differences. For example, > >> in sip.conf, iax.conf etc, the bindaddr setting is different. > >> Dundi.conf is very different between each system. > >>> > >>> At the moment I have a file tree on a separate server, and > >> I use the m4 processor to replace certain unique sections of > >> the files. I have a bunch of scripts to build sip.conf etc > >> and then rsync the files out to the servers. It works, > >> mostly, but it isn't elegant. > >>> > >>> I'd like to revision control all this. I don't know how it > >> could be done with revision control though. As I said, not > >> all the files are the same. I don't know if we'd run a > >> version control client on each Asterisk box, or if we'd run > >> it centrally, and then use rsync again, to copy the files out. > >>> > >>> Doug. > >>> > >>> > >>> > >>> > >>> > >>> =00The contents of this e-mail are intended for the named > >> addressee only. It contains information that may be > >> confidential. Unless you are the named addressee or an > >> authorized designee, you may not copy or use it, or disclose > >> it to anyone else. If you received it in error please notify > >> us immediately and then destroy it. > >>> > >>> > >> > >> -- > >> Aaron Daniel > >> Computer Systems Technician > >> Sam Houston State University > >> amdtech@shsu.edu > >> (936) 294-4198 > >> _______________________________________________ > >> --Bandwidth and Colocation provided by Easynews.com -- > >> > >> Asterisk-Users mailing list > >> To UNSUBSCRIBE or update options visit: > >> http://lists.digium.com/mailman/listinfo/asterisk-users > >> > > _______________________________________________ > > --Bandwidth and Colocation provided by Easynews.com -- > > > > Asterisk-Users mailing list > > To UNSUBSCRIBE or update options visit: > > http://lists.digium.com/mailman/listinfo/asterisk-users > > > > -- > Aaron Daniel > Computer Systems Technician > Sam Houston State University > amdtech@shsu.edu > (936) 294-4198 > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
But what if all the files are not the same? What if the binaddr is different in sip.conf on each server, or what about DUNDi? That's completely different. Do you have to go to each box one by one, check the file out, edit it, and check it back in again? I'm trying to find a way to avoid that. -----Original Message----- From: Bruce Reeves [mailto:asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:55 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control If all 3 servers are the same then no. I import to the svn server the check out the files on each server. I f I change a file on server A I can then commit the change to the repository, on the central server, and then do a svn update on the other 2. On 6/2/06, Douglas Garstang < dgarstang@oneeighty.com> wrote: Bruce, But, if you have three servers that function the same, don't you have to check the file out three times and check it back in three times? Doug. -----Original Message----- From: Bruce Reeves [mailto: asterisk@nortex-networks.com] Sent: Friday, June 02, 2006 3:34 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] Config Revision Control I use subversion on a central server and then store each server that is different. The purpose behind it for me was 2 fold, first I have a backup of my configs centeralized and I can roll-back any changes. Second, I can checkout a servers files on a different machine to edit them if I want and check them back when finished. What I meant by file-level is if I edit sip.conf and check it in then the whole svn goes to a new version, not just that file. We use a M$ product that has version control at the file level, so for each file in the library there is a version history. -- Bruce Nortex Networks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060602/ccefab21/attachment.htm
On 14:42, Fri 02 Jun 06, Douglas Garstang wrote:> Has anyone got any neat solutions for Asterisk .conf file revision control? > > We have multiple Asterisk boxes here, that we'd like to maintain a _mostly_ common set of conf files on. They aren't all the same though. There's subtle differences. For example, in sip.conf, iax.conf etc, the bindaddr setting is different. Dundi.conf is very different between each system. > > At the moment I have a file tree on a separate server, and I use the m4 processor to replace certain unique sections of the files. I have a bunch of scripts to build sip.conf etc and then rsync the files out to the servers. It works, mostly, but it isn't elegant. > > I'd like to revision control all this. I don't know how it could be done with revision control though. As I said, not all the files are the same. I don't know if we'd run a version control client on each Asterisk box, or if we'd run it centrally, and then use rsync again, to copy the files out.This is how I do this: I use subversion for this. Every server has its own branch. There's also a branch called 'common' All the server specific branches are svn-copied and svnmerge init from this branche. Then the svn automerge thingie Kevin wrote for the asterisk svn tree is automerging changes to the 'common' tree to all the server trees. In the server trees I make changes specific for one server. This works like a charm. Combine this with an auto svn update on the servers to get the same setup as I have ;) -- Michiel van Baak michiel@vanbaak.eu http://michiel.vanbaak.eu GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD "Why is it drug addicts and computer afficionados are both called users?"
On 2 Jun 2006, at 21:42, Douglas Garstang wrote:> Has anyone got any neat solutions for Asterisk .conf file revision > control? > > We have multiple Asterisk boxes here, that we'd like to maintain a > _mostly_ common set of conf files on. They aren't all the same > though. There's subtle differences. For example, in sip.conf, > iax.conf etc, the bindaddr setting is different. Dundi.conf is very > different between each system. > > At the moment I have a file tree on a separate server, and I use > the m4 processor to replace certain unique sections of the files. I > have a bunch of scripts to build sip.conf etc and then rsync the > files out to the servers. It works, mostly, but it isn't elegant. > > I'd like to revision control all this. I don't know how it could be > done with revision control though. As I said, not all the files are > the same. I don't know if we'd run a version control client on each > Asterisk box, or if we'd run it centrally, and then use rsync > again, to copy the files out.Here are some general rules we apply to this sort of config/ distribution/version-control set up across multiple non-identical servers (Mostly learnt in the web-server world, but it applies generally I think) 1) Never check in derived files. Only check in the _inputs_ to M4, never the outputs. 2) do the 'localization' (ie server specific config) on the target server itself, ideally automatically - never depend on user input - get the server to tell the install script what it needs to know. 3) don't user rsync unless all the files are identical so you might have checkitallout.sh (use appropriate svn stuff - I'm a cvs user, so can't help there) then a script that customizes and installs the files as needed, with likes like: cpp -Dhost=`uname -n` -Darch=`uname -m` iax.conf.generic /etc/ asterisk/iax.conf or even cpp -I`uname -n` iax.conf.generic /etc/asterisk/iax.conf with #include "iax.conf.local" in iax.conf.generic and subdirectories for each host with their own iax.conf.local Good luck. Tim Panton tim@mexuar.com
----- Michiel van Baak <michiel@vanbaak.info> wrote:> Then the svn automerge thingie Kevin wrote for the asterisk > svn tree is automerging changes to the 'common' tree to all > the server trees.Glad to see someone else is making use of it too :-) -- Kevin P. Fleming Senior Software Engineer Digium, Inc.
> -----Original Message----- > From: Michiel van Baak [mailto:michiel@vanbaak.info] > Sent: Monday, June 05, 2006 8:03 AM > To: asterisk-users@lists.digium.com > Subject: Re: [Asterisk-Users] Config Revision Control > > > On 09:41, Mon 05 Jun 06, Andrew Kohlsmith wrote: > > On Saturday 03 June 2006 02:47, Michiel van Baak wrote: > > > I use subversion for this. Every server has its own branch. > > > There's also a branch called 'common' > > > All the server specific branches are svn-copied and svnmerge > > > init from this branche. > > > Then the svn automerge thingie Kevin wrote for the asterisk > > > svn tree is automerging changes to the 'common' tree to all > > > the server trees. > > > In the server trees I make changes specific for one server. > > > > Can you give some more details? I am VERY interested in this! > > Most is already in my previous mail. > > This is my layout: > branches/common > branches/servers/home001 > branches/servers/home002 > branches/servers/cust001 > > Like that, you get the idea > The branches/common holds a full config, cept for sip users etc. So > all the [global] and [default] stuff. Also the > extensions.conf has some macro's and contexts I need on > every machine. > > The home001 etc hold the conf I actually run on a server. > All the specific sip and iax peers/users are defined in it. > Also the specific stuff for extensions.conf for that server. > > If I for example want the congestion in my default outbound > routing macro to play congestion for 5 seconds instead of 10 > I only alter extensions.conf in branches/common > The automerge will take care of the promoting it to all the > other branches.Hmmm. What do you do with other files such as AGI scripts, sound files, or music on hold? Do you maintain separate trees for each of these? If you do, to completely update a system, don't you have to check out etc, agi, sound and moh all independantly? Ideally it would be good if you could put it _ALL_ under a single tree, and then put Asterisk in a chrooted envionment. Then you could check out and update the configuration all in one go. While I was playing with svn, it was driving me nuts. It would ALWAYS re-create the current directory, even if I said to check out all files from inside that directory. Means if you went to /etc/asterisk and checked out asterisk, you'd get /etc/asterisk/asterisk. Yuk. Doug.
> -----Original Message----- > From: Michiel van Baak [mailto:michiel@vanbaak.info] > Sent: Monday, June 05, 2006 8:03 AM > To: asterisk-users@lists.digium.com > Subject: Re: [Asterisk-Users] Config Revision Control > > > On 09:41, Mon 05 Jun 06, Andrew Kohlsmith wrote: > > On Saturday 03 June 2006 02:47, Michiel van Baak wrote: > > > I use subversion for this. Every server has its own branch. > > > There's also a branch called 'common' > > > All the server specific branches are svn-copied and svnmerge > > > init from this branche. > > > Then the svn automerge thingie Kevin wrote for the asterisk > > > svn tree is automerging changes to the 'common' tree to all > > > the server trees. > > > In the server trees I make changes specific for one server. > > > > Can you give some more details? I am VERY interested in this! > > Most is already in my previous mail. > > This is my layout: > branches/common > branches/servers/home001 > branches/servers/home002 > branches/servers/cust001 > > Like that, you get the idea > The branches/common holds a full config, cept for sip users etc. So > all the [global] and [default] stuff. Also the > extensions.conf has some macro's and contexts I need on > every machine. > > The home001 etc hold the conf I actually run on a server. > All the specific sip and iax peers/users are defined in it. > Also the specific stuff for extensions.conf for that server. > > If I for example want the congestion in my default outbound > routing macro to play congestion for 5 seconds instead of 10 > I only alter extensions.conf in branches/common > The automerge will take care of the promoting it to all the > other branches. > > I use this script to do the automerging every hour: > http://svn.digium.com/view/repotools/svn-automerge?rev=54&view=markup > This also means you have to use the modified svnmerge from > the asterisk project: > http://svn.digium.com/view/repotools/svnmerge?rev=63&view=markup > > All my servers do auto svn up of the asterisk configs.I guess this is waaaay beyond my knowledge of subversion. I just started playing with the directory structure I might use, and first thought was something like this: dougg@monitor ~/cfg $ ls -l total 16 drwxr-xr-x 2 dougg users 4096 Jun 5 12:24 acd drwxr-xr-x 2 dougg users 4096 Jun 5 12:28 common drwxr-xr-x 2 dougg users 4096 Jun 5 12:28 pbx drwxr-xr-x 2 dougg users 4096 Jun 5 12:24 vm where acd, pbx and vm refer to a function, or class of systems. pbx/ would have systems pbx1, pbx2 and pbx3 beneath it. Some files, such as sound files, and AGI are common to all systems, and hence the common/ directory. However, I have no idea what to do with it beyond that. I don't know how to push common changes out to all the other servers, or inherit, or whatever, or how to stop a common directory being created on the servers instead of putting the files from common under /var/lib/asterisk/agi-bin and /usr/lib/asterisk/sounds etc. Arrgh. Doug.