ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.78k stars 921 forks source link

Install centos8 #2134

Closed tpolim008 closed 1 year ago

tpolim008 commented 4 years ago

Hello, will there be support to install this on centos8, we were recently forced to upgrade and looking to run oxidized however all installs fail using the centos 7 instructions.

davama commented 4 years ago

Did you try with rvm?

tpolim008 commented 4 years ago

Yes, it fails as well for incompatible I’ll send errors on Monday when I’m on shift if that’s helps

On Sat, Jun 20, 2020 at 10:15 AM Dave notifications@github.com wrote:

Did you try with rvm?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ytti/oxidized/issues/2134#issuecomment-647001290, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDS6K33Q2WKXZOOOBBP4YDRXTAALANCNFSM4ODFA7IQ .

davama commented 4 years ago

Interesting Ive been wanting to test with centos8 but havent been able to.

tpolim008 commented 4 years ago

I’m new to the oxidized so not sure on how all the inner workings are. I know that Perl Net-SNMP isn’t used in centos8. Using netdisco I had to use an interrupter package along with DNF install then build it with RPM. I’m curious to see if it something with version of ruby or other inner workings that block it (missing or in-compatibility dependencies.) hoping the creator and or support team has something to offer.

Even looked at rconfig, that as well won’t load it errors and complains about it being not compatible, where their guide shows works on centos8 I think a lot of this deals with how REHL 8 handles items now.

On Sat, Jun 20, 2020 at 10:36 AM Dave notifications@github.com wrote:

Interesting Ive been wanting to test with centos8 but havent been able to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ytti/oxidized/issues/2134#issuecomment-647003546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDS6K6JZC4PLEFYVXOXNYTRXTCNPANCNFSM4ODFA7IQ .

tpolim008 commented 4 years ago

as promised here the RVM install error I get if anyone can help with this that would be huge. I'm running open ssl1.1.1 this is on centos8

[root@netengsrv01 ~]# rvm install 2.3 ruby-2.3.8 - #removing src/ruby-2.3.8.. Searching for binary rubies, this might take some time. No binary rubies available for: centos/8/x86_64/ruby-2.3.8. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for centos. Requirements installation successful. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.3.8, this may take a while depending on your cpu(s)... ruby-2.3.8 - #downloading ruby-2.3.8, this may take a while depending on your connection... ruby-2.3.8 - #extracting ruby-2.3.8 to /usr/local/rvm/src/ruby-2.3.8..... ruby-2.3.8 -

configuring...........................................................

ruby-2.3.8 - #post-configuration.. ruby-2.3.8 -

compiling.................................................................................................................................................................................................................|

Error running '__rvm_make -j8', please read /usr/local/rvm/log/1592761497_ruby-2.3.8/make.log

There has been an error while running make. Halting the installation.

ossl_pkey.h:45:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]

if HAVE_BN_GENCB

 ^~~~~~~~~~~~~

ossl_pkey.h:45:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] ossl_pkey.h:45:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined] make[2]: [Makefile:302: ossl_digest.o] Error 1 make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/openssl' make[1]: [exts.mk:213: ext/openssl/all] Error 2 make[1]: Waiting for unfinished jobs.... linking shared-object objspace.so linking shared-object json/ext/generator.so installing default psych libraries linking shared-object psych.so make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/objspace' make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/json/generator' make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/psych' linking shared-object pathname.so make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/pathname' linking shared-object bigdecimal.so make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/bigdecimal' linking shared-object date_core.so make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/date' linking shared-object nkf.so make[2]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8/ext/nkf' make[1]: Leaving directory '/usr/local/rvm/src/ruby-2.3.8' make: [uncommon.mk:203: build-ext] Error 2 ++ return 2

On Sat, Jun 20, 2020 at 10:41 AM Tim Polimeni tpolim008@gmail.com wrote:

I’m new to the oxidized so not sure on how all the inner workings are. I know that Perl Net-SNMP isn’t used in centos8. Using netdisco I had to use an interrupter package along with DNF install then build it with RPM. I’m curious to see if it something with version of ruby or other inner workings that block it (missing or in-compatibility dependencies.) hoping the creator and or support team has something to offer.

Even looked at rconfig, that as well won’t load it errors and complains about it being not compatible, where their guide shows works on centos8 I think a lot of this deals with how REHL 8 handles items now.

On Sat, Jun 20, 2020 at 10:36 AM Dave notifications@github.com wrote:

Interesting Ive been wanting to test with centos8 but havent been able to.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ytti/oxidized/issues/2134#issuecomment-647003546, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDS6K6JZC4PLEFYVXOXNYTRXTCNPANCNFSM4ODFA7IQ .

davama commented 4 years ago

@tpolim008

Tested this with clean centos8 install. no issues...

Linux centos8-test-lab 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 8.2.2004 (Core) 

*minimal installation

Using how-to links: https://github.com/ytti/oxidized#installing-ruby-23-using-rvm <<< use guide to install rvm on centos8 https://computingforgeeks.com/how-to-install-ruby-2-5-on-rhel-8/

Everything i did:

Some pgcks that needed to be manually installed

> yum install -y tar cmake libicu-devel

*Note:*
Instead installed `@ruby2.6` and `rvm install 2.6`

*How-To*
> yum install @ruby:2.6
> curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import -
> curl -L get.rvm.io | sudo bash -s stable
> useradd -c "oxidized account" -r -m oxidized
> usermod -aG rvm oxidized
> gem install oxidized
> gem install oxidized-web oxidized-script
# additional gems for my specific setup
> gem install sqlite3 sequel
> su - oxidized
# created config, db file, and other folders for my oxidized setup (logs/repo/model etc)
> oxidized
I, [2020-06-23T13:03:48.038255 #16799]  INFO -- : Oxidized starting, running as pid 16799
D, [2020-06-23T13:03:48.039167 #16799] DEBUG -- : Hook "first_hook" registered Exec for event :post_store
D, [2020-06-23T13:03:48.039376 #16799] DEBUG -- : Hook "second_hook" registered Exec for event :post_store
I, [2020-06-23T13:03:48.154737 #16799]  INFO -- : lib/oxidized/nodes.rb: Loading nodes
D, [2020-06-23T13:03:48.182572 #16799] DEBUG -- : resolving DNS for <redacted>...
D, [2020-06-23T13:03:48.182636 #16799] DEBUG -- : IPADDR <redacted>
D, [2020-06-23T13:03:48.182790 #16799] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'dsb'
D, [2020-06-23T13:03:48.182850 #16799] DEBUG -- : node.rb: setting node key 'model' to value 'junos' from global
D, [2020-06-23T13:03:48.182910 #16799] DEBUG -- : node.rb: returning node key 'model' with value 'dsb'
D, [2020-06-23T13:03:48.182958 #16799] DEBUG -- : lib/oxidized/node.rb: Loading model "dsb"
D, [2020-06-23T13:03:48.184971 #16799] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list
D, [2020-06-23T13:03:48.185239 #16799] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value ''
D, [2020-06-23T13:03:48.185311 #16799] DEBUG -- : node.rb: returning node key 'input' with value 'ssh, telnet'
D, [2020-06-23T13:03:48.327553 #16799] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value ''
D, [2020-06-23T13:03:48.327666 #16799] DEBUG -- : node.rb: returning node key 'output' with value 'git'
D, [2020-06-23T13:03:48.376603 #16799] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value ''
D, [2020-06-23T13:03:48.376694 #16799] DEBUG -- : node.rb: setting node key 'username' to value 'config' from global
D, [2020-06-23T13:03:48.376754 #16799] DEBUG -- : node.rb: setting node key 'username' to value 'root' from group
D, [2020-06-23T13:03:48.376831 #16799] DEBUG -- : node.rb: returning node key 'username' with value 'root'
D, [2020-06-23T13:03:48.376875 #16799] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value ''
D, [2020-06-23T13:03:48.376927 #16799] DEBUG -- : node.rb: setting node key 'password' to value '<redacted>' from global
D, [2020-06-23T13:03:48.376979 #16799] DEBUG -- : node.rb: returning node key 'password' with value '<redacted>'
...
...
I, [2020-06-23T13:03:48.392220 #16799]  INFO -- : lib/oxidized/nodes.rb: Loaded 6 nodes
D, [2020-06-23T13:03:48.806815 #16799] DEBUG -- : lib/oxidized/core.rb: Starting the worker...
Puma starting in single mode...
* Version 3.11.4 (ruby 2.6.5-p114), codename: Love Song
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://localhost:9002
Use Ctrl-C to stop

Hope this helps you.

Best, Dave

tpolim008 commented 4 years ago

Thanks, Dave ill have to see whats going on, for some reason, it looks like I can not install anything via GEM as the connection timeout. Ill have to check out ACLs and more.

[root@netengsrv01 ~]# rvm use 2.6 --default Using /usr/local/rvm/gems/ruby-2.6.5 [root@netengsrv01 ~]# gem install oxidized ERROR: Could not find a valid gem 'oxidized' (>= 0), here is why: Unable to download data from https://rubygems.org/ - timed out ( https://rubygems.org/specs.4.8.gz) [root@netengsrv01 ~]#

[root@netengsrv01 oxidized]# gem install bundler ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - timed out ( https://rubygems.org/specs.4.8.gz)

On Tue, Jun 23, 2020 at 1:14 PM Dave notifications@github.com wrote:

@tpolim008 https://github.com/tpolim008

Tested this with clean centos8 install. no issues...

Linux centos8-test-lab 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

CentOS Linux release 8.2.2004 (Core)

*minimal installation

Using how-to links: https://github.com/ytti/oxidized#installing-ruby-23-using-rvm <<< use guide to install rvm on centos8 https://computingforgeeks.com/how-to-install-ruby-2-5-on-rhel-8/

Everything i did:

Some pgcks that needed to be manually installed

yum install -y tar cmake libicu-devel

Note: Instead installed @ruby2.6 and rvm install 2.6

How-To

yum install @ruby:2.6 curl -sSL https://rvm.io/mpapis.asc | sudo gpg --import - curl -L get.rvm.io | sudo bash -s stable useradd -c "oxidized account" -r -m oxidized usermod -aG rvm oxidized gem install oxidized gem install oxidized-web oxidized-script

additional gems for my specific setup

gem install sqlite3 sequel su - oxidized

created config, db file, and other folders for my oxidized setup (logs/repo/model etc)

oxidized I, [2020-06-23T13:03:48.038255 #16799] INFO -- : Oxidized starting, running as pid 16799 D, [2020-06-23T13:03:48.039167 #16799] DEBUG -- : Hook "first_hook" registered Exec for event :post_store D, [2020-06-23T13:03:48.039376 #16799] DEBUG -- : Hook "second_hook" registered Exec for event :post_store I, [2020-06-23T13:03:48.154737 #16799] INFO -- : lib/oxidized/nodes.rb: Loading nodes D, [2020-06-23T13:03:48.182572 #16799] DEBUG -- : resolving DNS for ... D, [2020-06-23T13:03:48.182636 #16799] DEBUG -- : IPADDR D, [2020-06-23T13:03:48.182790 #16799] DEBUG -- : node.rb: resolving node key 'model', with passed global value of '' and node value 'dsb' D, [2020-06-23T13:03:48.182850 #16799] DEBUG -- : node.rb: setting node key 'model' to value 'junos' from global D, [2020-06-23T13:03:48.182910 #16799] DEBUG -- : node.rb: returning node key 'model' with value 'dsb' D, [2020-06-23T13:03:48.182958 #16799] DEBUG -- : lib/oxidized/node.rb: Loading model "dsb" D, [2020-06-23T13:03:48.184971 #16799] DEBUG -- : lib/oxidized/model/model.rb Added all to the commands list D, [2020-06-23T13:03:48.185239 #16799] DEBUG -- : node.rb: resolving node key 'input', with passed global value of 'ssh, telnet' and node value '' D, [2020-06-23T13:03:48.185311 #16799] DEBUG -- : node.rb: returning node key 'input' with value 'ssh, telnet' D, [2020-06-23T13:03:48.327553 #16799] DEBUG -- : node.rb: resolving node key 'output', with passed global value of 'git' and node value '' D, [2020-06-23T13:03:48.327666 #16799] DEBUG -- : node.rb: returning node key 'output' with value 'git' D, [2020-06-23T13:03:48.376603 #16799] DEBUG -- : node.rb: resolving node key 'username', with passed global value of '' and node value '' D, [2020-06-23T13:03:48.376694 #16799] DEBUG -- : node.rb: setting node key 'username' to value 'config' from global D, [2020-06-23T13:03:48.376754 #16799] DEBUG -- : node.rb: setting node key 'username' to value 'root' from group D, [2020-06-23T13:03:48.376831 #16799] DEBUG -- : node.rb: returning node key 'username' with value 'root' D, [2020-06-23T13:03:48.376875 #16799] DEBUG -- : node.rb: resolving node key 'password', with passed global value of '' and node value '' D, [2020-06-23T13:03:48.376927 #16799] DEBUG -- : node.rb: setting node key 'password' to value '' from global D, [2020-06-23T13:03:48.376979 #16799] DEBUG -- : node.rb: returning node key 'password' with value '' ... ... I, [2020-06-23T13:03:48.392220 #16799] INFO -- : lib/oxidized/nodes.rb: Loaded 6 nodes D, [2020-06-23T13:03:48.806815 #16799] DEBUG -- : lib/oxidized/core.rb: Starting the worker... Puma starting in single mode...

  • Version 3.11.4 (ruby 2.6.5-p114), codename: Love Song
  • Min threads: 0, max threads: 16
  • Environment: development
  • Listening on tcp://localhost:9002 Use Ctrl-C to stop

Hope this helps you.

Best, Dave

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ytti/oxidized/issues/2134#issuecomment-648298252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDS6KZKHK2TPS2R56QESLTRYDPIVANCNFSM4ODFA7IQ .

davama commented 4 years ago

I was behind a proxy If you too make sure your bash env variables are setup

tpolim008 commented 4 years ago

Hey Dave, I’m it behind a proxy, I have no issue connecting to any yum repository from my sever. It appears the only issue I have is when using GEM commands. Doing a trace from my server it looks like my traffic isn’t making is past Comcast’s backbone in ashburn

On Sat, Jun 27, 2020 at 5:17 AM Dave notifications@github.com wrote:

I was behind a proxy If you too make sure your bash env variables are setup

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ytti/oxidized/issues/2134#issuecomment-650529203, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDS6KY5EYQ2QAX2BZFBRA3RYW2KBANCNFSM4ODFA7IQ .

mortzu commented 2 years ago

https://stackoverflow.com/a/4187271