I have installed chefdk In my workstation and created a directory called chef-repo - chefdk

I have a question here.
I have installed chefdk In my workstation and created a directory called chef-repo. Now my question is how can I test the cookbook? And the bin folder is having all the binaries related to chefdk location /opt/chefdk/ From where is can upload the cookbook

if you have acess to your chef server running then I would refer to this url on how to upload your cookbook with knife
https://learn.chef.io/modules/manage-a-node-chef-server/rhel/hosted/upload-a-cookbook#/
If you want to test you cookbook locally on your workstation you will have to run the chef in local-mode.
chef-client --local-mode --runlist 'recipe[<<cookbook-name>>::<<recipe-name>>]'

Related

installing loadrunner on linux

i have Linux red hat installed on my system as virtual machine
i have already installed Load runner community edition on my windows host and i want to install it on Linux guest virtual machine
i red the guide bu got so lost with first 4 steps .. changing directory especially .. how and where to i have to change it ? i need alot of explain on this step
Kill any Load Runner agent process that may be running on the machine. Type:
cd /opt/HP/HP_LoadGenerator/bin;./m_daemon_setup -kill;su -;
Change to super user.
If you have an earlier version of the load generator installed on the machine, you must first
uninstall it. Type:
cd /opt/HP/HP_LoadGenerator/;cd _HP_LoadGenerator_Installation/;sh ./Change_HP_
LoadGenerator_Installation;
Change directory to //InstData/Linux/VM. The is any path that contains the Web_Installers folder, for example /tmp/Web_
Installers. Copy the installation folder to this location

How can I install patches directly in a local server from a central server?

Every time we do yum update, so what are the latest pkgs are available will be downloaded into our local server and then we can start installation. Is there any chance to install pkgs directly from central server to local server (without downloading pkgs in local server)?
At first ,You should make sure your remote source server is configured well ,then you can go to /etc/yum.repos.d to config the file "CentOS-Base.repo"
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?
release=$releasever&arch=$basearch&repo=os
baseurl=http://[**your remote source server**]$releasever/os/$basearch/
gpgcheck=1
gpgkey=file://[**the path of your gpgkey**]
I hope it works to you

Oracle Linux 7 repository to update channels in Spacewalk

I've been deploying VMs with kickstart files and OSes like CentOS7 and Oracle Linux 7 in Spacewalk, I even update the VM with a yum update in the post installation kickstart script, which is amazingly cool. After installation though, it doesn't really keep up to date with the latest version of the operating system, I'd have to download and upload the .ISO to Spacewalk every time an update comes around or do a yum update on the VM itself. Then I found out you can link and schedule an OS repository. I already have a setup of this kind for CentOS7 in Spacewalk.
This works for me:
CentOS7 repository for spacewalk channel example
The link to the CentOS7 repo
However, I haven't found any public repos for OL7. Does this kind of repo simply not exist for Oracle Linux 7?
Also, is there perhaps a better solution to this problem? I'm planning on using Puppet with this setup for the software aspect.
Thanks in advance.
From: Oracle® Linux Administrator's Guide for Release 7
https://docs.oracle.com/cd/E52668_01/E54669/html/ol7-downloading-yum-repo.html
2.3 Downloading the Oracle Linux Yum Server Repository Files
Note
The following procedure assumes that yum on your system is configured to expect to find repository files in the default /etc/yum.repos.d directory.
To download the Oracle Linux Yum Server repository configuration file:
As root, change directory to /etc/yum.repos.d.
cd /etc/yum.repos.d
Use the wget utility to download the repository configuration file that is appropriate for your system.
wget http://yum.oracle.com/public-yum-release.repo
For Oracle Linux 7, enter:
wget http://yum.oracle.com/public-yum-ol7.repo
The /etc/yum.repos.d directory is updated with the repository configuration file, in this example, public-yum-ol7.repo.
You can enable or disable repositories in the file by setting the value of the enabled directive to 1 or 0 as required.
Oracle provides publicly accessible yum repos at yum.oracle.com. They even have their own build of Spacewalk available to customers.
Further, I added ULN support to Spacewalk a while ago, so you can configure it to sync content from ULN if you're a customer. See the Oracle Spacewalk Client Life Cycle Guide for more info: https://docs.oracle.com/cd/E52668_01/E71078/html/swk24-crreposwc.html
Alright REW and Djelibeybi both gave me good answers, instead of using the repo file though I opten to fully use Spacewalk and use the links in the repo file to update the channel. In hindsight I can't believe I didn't come up with this sooner because I knew of the yum public file.
The link to repo file was wrong,
I instead should have just used the links in the repo file to create multiple Spacewalk Channel repositories.
Thank you all, I'm very happy with this solution.

How to deploy to Tomcat on Debian

I'm really confused about how Tomcat works on Debian vs. Ubuntu.
This is on a clean Ubuntu on DigitalOcean:
sudo apt-get install tomcat
This creates /opt/tomcat with all the directories
I rename my war to ROOT.war and upload it under /opt/tomcat/webapps
I restart tomcat and everything works just fine
Now I'm trying to do the same thing on a clean Debian on Google Cloud Platform:
sudo apt-get install tomcat7
This sprinkles tomcat directories in multiple locations:
/etc/tomcat7 with config files
/usr/share with tomcat7, tomcat-7-admin, tomcat7-docs, tomcat7-root, etc directories
/var/lib/tomcat7 with webapps and other directories
How do I deploy my ROOT.war in this setup?
If I upload it through manager interface, it puts it under /var/lib/tomcat7/webapps/, but I don't see it from the URL.
Moreover, I even deleted tomcat7-root directory altogether (which has the "It works!" page), but that page still somehow shows up at the :8080 port.
So, what's the right way to deploy my application so that it's at the root of my URL? I would appreciate detailed explanation that a novice can understand :)

Getting Tomcat to play well with Netbeans 6.7 on Linux

I have an external Tomcat server configured to run J2EE applications on my development (Gentoo Linux install) machine. This works great if the server is started prior to opening Netbeans and deploying the code [within the IDE]. This fails when I try to restart the server or to debug the server application. The error I get is that it is unable to find "catalina.sh" and the shutdown/start scripts for tomcat.
The Gentoo guide for this suggests that the scripts were outdated and were replaced with the init.d scripts. Does anyone have a suggestion on where I could find these scripts or how they solved this issue?
The lack of a script is due to an issue with the Gentoo Tomcat ebuild... all of the script files were in the bin directory of the src build.
Gentoo Bug Site
Solution:
1. un-tar the src
Copy all of the script files into the tomcat/bin directory
Change group ownership of the script files to tomcat
Enable execute and write group permissions to the script files

Resources