treasure-data / omnibus-td-agent

td-agent (Fluentd) Packaging Scripts
https://docs.treasuredata.com/articles/td-agent-changelog
Apache License 2.0
82 stars 131 forks source link

Could not generate td-agent RPM for linux #74

Closed Manikantan22 closed 8 years ago

Manikantan22 commented 8 years ago

I have tried different approaches to generate td-agent 2 RPM but nothing worked out. Could you please provide some steps to generate RPM, it would be really great.

Thanks in advance. I appreciate your help.

repeatedly commented 8 years ago

'nothing worked out' is less information... I and other users follow this step: https://github.com/treasure-data/omnibus-td-agent#usage

Manikantan22 commented 8 years ago

I am not sure if the 'Omnibus build' command creates RPM for Redhat or not. As of now, I didn't make any changes with this repository and I just want to take the code as it is and run.

I have installed ruby(2.0.0), bundler(1.11.2), and Ominbus(5.2.0). I ran the below command in centos 7 but none of the elements that are in td-agent2.rb file are recognized.

omnibus build td-agent --config config/projects/td-agent2.rb

Error:

/app/platform/omnibus-td-agent-master/config/projects/td-agent2.rb:5:in evaluate': undefined methodname' for #<Omnibus::Config (Cleanroom)> (NoMethodError) from /usr/local/share/gems/gems/cleanroom-1.0.0/lib/cleanroom.rb:70:in instance_eval' from /usr/local/share/gems/gems/cleanroom-1.0.0/lib/cleanroom.rb:70:inevaluate' from /usr/local/share/gems/gems/cleanroom-1.0.0/lib/cleanroom.rb:56:in evaluate_file' from /usr/local/share/gems/gems/omnibus-5.2.0/lib/omnibus/config.rb:34:inload'

Another approach:

Tried to install Vagrant rpm and tried to run 'Vagrant up' but getting below error

[root@localhost omnibus-td-agent-master]# vagrant up

VirtualBox is complaining that the kernel module is not loaded. Please run VBoxManage --version or open the VirtualBox GUI to see the error message which should contain instructions on how to fix this error.

So kindly let me know what command I should use to generate RPM for CentOS 7. Should I be using Vagrant or Berksfile or Omnibus build.

repeatedly commented 8 years ago

omnibus build td-agent --config config/projects/td-agent2.rb

Your command is bad. --config option is for omnibus configuraiton, not project. bin/omnibus build td-agent2 is also failed? Could you follow README step? > https://github.com/treasure-data/omnibus-td-agent#build

I succeeded the build by 'vagrant up centos-7.2' with Vagrant 1.7.4.

VirtualBox is complaining that the kernel module is not loaded. Please

Did you install VMware on VM machine?

Manikantan22 commented 8 years ago

Thank you for the help. I am able to generate rpm by using bin/omnibus build td-agent2.

One more question, I want to start or stop the td-agent server using non root user (i.e, user does not has root access). so I tried to change the values of TD_AGENT_USER, TD_AGENT_GROUP to actual user (non root user) that I need, but I am getting below error. Also I changed the directory structure of TD_AGENT_PID_FILE,TD_AGENT_LOCK_FILE to different one where the non root user has the access to read and write.

Error:

runuser: may not be used by non-root users

repeatedly commented 8 years ago

runuser: may not be used by non-root users

It seems runuser can't be run by non-root users? I'm not familiar with runuser so asking it on other forum is better.