Re: [rancid] Help Using git with RANCID

2018-08-23 Thread Ryan Melville
> Was or is? Big difference!

"is", from my perspective.

"was", from your perspective, due to email transit time. :)


Regards,



Ryan Melville

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Help Using git with RANCID

2018-08-23 Thread Vacheslav
So not a native english speaker? Was means not working anymore, wonder how you 
can manage a network if the basics are scewed!

 

From: Ryan Melville  
Sent: Thursday, August 23, 2018 2:38 PM
To: Vacheslav ; 'heasley' 
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Help Using git with RANCID

 

> Was or is? Big difference!

"is", from my perspective. 

"was", from your perspective, due to email transit time. :) 

 

Regards,

 

Ryan Melville

 

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Help Using git with RANCID

2018-08-23 Thread Vacheslav
 

 

From: Rancid-discuss  On Behalf Of
Ryan Melville
Sent: Wednesday, August 22, 2018 5:41 PM
To: heasley 
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Help Using git with RANCID

 

>Thank you for the advice, which got me on the right track.  I think those
commands probably would have worked as-is, but my ideal state was having
RANCID's local git workspace wire directly back to my git server *only* and
not also push to the local ($CVSROOT) git repo.

 

>So my steps were the following, picking up after the "sudo -H -u rancid
/mnt/rancid/rancid/bin/rancid-cvs" command:

 

>1) Create new empty 'rancid-' repository on my (external) master git
server (Atlassian Bitbucket, in my case).

 

>2) Create 'rancid' user on my master git server, and give it read/write
permission to the new repo.

 

>3) Store 'rancid' user git credentials on my RANCID server, which requires
a temporary clone that is then immediately deleted.

 

sudo -H -u rancid git config --global user.name "rancid"

sudo -H -u rancid git config --global user.email "rancid@"

sudo -H -u rancid git config --global credential.helper store

sudo -H -u rancid git clone https://rancid@
<https://rancid@%3cmy-git-server%3e/scm/rancid-%3cgroup%3e.git>
/scm/rancid-.git

(enter 'rancid' user passwords when prompted)

sudo -H -u rancid rm -rf rancid-all

 

>4) Re-wire RANCID's git workspace to the master git server, instead of its
local git server/repo.  Uses my particular RANCID installation path and
group name ("all").

 

>cd /mnt/rancid/rancid/var/all

sudo -H -u rancid git remote set-url origin https://rancid@
<https://rancid@%3cmy-git-server%3e/scm/rancid-all.git>
/scm/rancid-all.git

sudo -H -u rancid git push -u origin --all

sudo -H -u rancid git push origin --tags

 

 

>At this point, I made a change to a network device, waited for my next cron
execution of rancid-run, and then observed the changes in my master git
repo, so I believe it was all working well.

 

Was or is? Big difference!

 

>Regards,

 

>Ryan Melville

 

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Help Using git with RANCID

2018-08-22 Thread Ryan Melville
Thank you for the advice, which got me on the right track.  I think those 
commands probably would have worked as-is, but my ideal state was having 
RANCID's local git workspace wire directly back to my git server *only* and not 
also push to the local ($CVSROOT) git repo.

So my steps were the following, picking up after the "sudo -H -u rancid 
/mnt/rancid/rancid/bin/rancid-cvs" command:

1) Create new empty 'rancid-' repository on my (external) master git 
server (Atlassian Bitbucket, in my case).

2) Create 'rancid' user on my master git server, and give it read/write 
permission to the new repo.

3) Store 'rancid' user git credentials on my RANCID server, which requires a 
temporary clone that is then immediately deleted.

sudo -H -u rancid git config --global user.name "rancid"
sudo -H -u rancid git config --global user.email "rancid@"
sudo -H -u rancid git config --global credential.helper store
sudo -H -u rancid git clone 
https://rancid@/scm/rancid-.git
(enter 'rancid' user passwords when prompted)
sudo -H -u rancid rm -rf rancid-all

4) Re-wire RANCID's git workspace to the master git server, instead of its 
local git server/repo.  Uses my particular RANCID installation path and group 
name ("all").

cd /mnt/rancid/rancid/var/all
sudo -H -u rancid git remote set-url origin 
https://rancid@/scm/rancid-all.git
sudo -H -u rancid git push -u origin --all
sudo -H -u rancid git push origin --tags


At this point, I made a change to a network device, waited for my next cron 
execution of rancid-run, and then observed the changes in my master git repo, 
so I believe it was all working well.

Regards,

Ryan Melville

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Help Using git with RANCID

2018-08-17 Thread Ryan Melville
Thank you! I will try this and report back.

Regards,

Ryan Melville

From: heasley 
Sent: Thursday, August 16, 2018 2:53 AM
To: Ryan Melville
Cc: rancid-discuss@shrubbery.net
Subject: Re: [rancid] Help Using git with RANCID

Wed, Aug 15, 2018 at 08:17:28PM +, Ryan Melville:
> Hi,
>
> I have tried my darndest to git RANCID working with a remote git server based 
> on the few web articles and forum threads, but am still missing something.  
> Assistance would be appreciated.
>
> rancid.conf
> LIST_OF_GROUPS="all"
> RCSSYS=git; export RCSSYS
> CVSROOT=$BASEDIR/repos; export CVSROOT
>
> I ran sudo -H -u rancid /mnt/rancid/rancid/bin/rancid-cvs and it seemed happy.

perfect.
cd $BASEDIR/
git remote add  
git remote set-url --add --push origin $CVSROOT/all
git remote set-url --add --push origin 

test (and initial push) it:
git push 
This must not require interactive authentication, which i leave to your
own research.
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Re: [rancid] Help Using git with RANCID

2018-08-16 Thread heasley
Wed, Aug 15, 2018 at 08:17:28PM +, Ryan Melville:
> Hi,
> 
> I have tried my darndest to git RANCID working with a remote git server based 
> on the few web articles and forum threads, but am still missing something.  
> Assistance would be appreciated.
> 
> rancid.conf
> LIST_OF_GROUPS="all"
> RCSSYS=git; export RCSSYS
> CVSROOT=$BASEDIR/repos; export CVSROOT
> 
> I ran sudo -H -u rancid /mnt/rancid/rancid/bin/rancid-cvs and it seemed happy.

perfect.
cd $BASEDIR/
git remote add  
git remote set-url --add --push origin $CVSROOT/all
git remote set-url --add --push origin 

test (and initial push) it:
git push 
This must not require interactive authentication, which i leave to your
own research.

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] Help Using git with RANCID

2018-08-15 Thread Ryan Melville
Hi,

I have tried my darndest to git RANCID working with a remote git server based 
on the few web articles and forum threads, but am still missing something.  
Assistance would be appreciated.

rancid.conf
LIST_OF_GROUPS="all"
RCSSYS=git; export RCSSYS
CVSROOT=$BASEDIR/repos; export CVSROOT

I ran sudo -H -u rancid /mnt/rancid/rancid/bin/rancid-cvs and it seemed happy.

My "/mnt/rancid/rancid/var" directory is now:

   all/
   logs/
   repos/

Under "all/" is now:

  configs/
  .git/
  router.db
  routers.all
  routers.down
  routers.up

Under "repos/" is:

  all/

This article (https://www.cryptomonkeys.com/2016/11/rancid-git/) implies one 
needs to do a clone of a remote repo.  If so, into what local directory?  And 
must I first remote something rancid-cvs created?

The forum threads do not mention a clone.  They imply creating a remote.  But 
in which of the two git-repo-like directories created by rancid-cvs 
(var/all/.git or var/repos/all)?

I am expecting the end result to be a clone of a remote repo (for each group) 
somewhere under rancid/var, and for rancid-run to operate in that location and 
after making changes effectively does a "git push" back to my remote git server.

I just cannot seem to cobble together the correct series of commands from the 
multiple sources of information.

Regards,

Ryan Melville
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss