how to start puppet master while installing from source code..? - puppet

I have tried to install from source code, I checked out from github and installed the puppet. I followed the following link to install puppet. In this process I am not able to start the puppet master.
https://docs.puppetlabs.com/guides/install_puppet/from_source.html
I am getting this following error:
$: bundle exec puppet master --verbose --no-daemonize --autosign true
Error: Could not run: cannot load such file -- puppet/network/server
anyhelp would be appreciated ..!!!

Related

yarn install for repositories with git+https not working in Jenkins

I am trying to configure my project on Jenkins so that each commit will result in an automatic build.
When I run yarn install using Jenkins NodeJS script, it resist to install the the dependencies that are being imported from git repository. I am doing it the following way.
"some-component": "git+https://bitbucket.org/owner/repo.git"
It shows following error:
error Command failed.
Exit code: 128
Command: git
Arguments: clone git+https://bitbucket.org/owner/repo.git
Output:
fatal: destination path 'some path' already exists and is not an empty directory.
error Command failed with exit code 1.
If the file is empty it show following error
error Couldn't find the binary git
error Command failed with exit code 1.
Although the same yarn install works perfectly on IDE e.g. VS Code.
I am using the following code to execute yarn install in NodeJS Script on Jenkins
var exec = require('child_process').exec,
child;
child = exec('yarn install ',
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
I was receiving the same error while trying to add a package from a git repository while in a docker container.
$ yarn add git+https://git#github.com/username/some_repo.git
error Couldn't find the binary git
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
I thought there was an issue with yarn trying to parse the url I used; there are different variations you can use (like https, git+https, ssh).
Come to find out, the docker container I was in, did not have git installed.
So when yarn was tasked with trying to retrieve the git repository, it didn't have the git binary to do so.
Solution: Install git in the docker container
Hopefully even though the context of my solution is different (I was in a docker container and not in Jenkins job), it might help solve your problem if you ensure that git is accessible in your Jenkins job.
You can test this by running git --version and there should be a version output proving that you do or don't have git available.

Installing a puppet module on master with Puppetfile

I'm using R10K to manage my configuration files.
I want to install a puppet module on my master server using a Puppet file.
I go to the branch and add the following to Puppetfile:
mod 'puppetlabs-certregen', '0.2.0'
I then run puppet agent -t on the server. It seems the command is successful, in that the commands in my manifest are run, but when I run puppet certregen healthcheck the module doesn't seem to be installed.
What's the correct way to use the Puppetfile to install a module?
The Puppetfile is similar to a Ruby Gemfile, Python requirements.txt: it lists dependancies which are then installed by a separate tool.
For Puppetfiles, this is r10k.
It's documented here https://puppet.com/docs/pe/2018.1/puppetfile.html
You can also directly download the module with the command line:
puppet module install puppetlabs-certregen
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/Users/petersouter/.puppetlabs/etc/code/modules
└─┬ puppetlabs-certregen (v0.2.0)
└── puppetlabs-stdlib (v4.17.1)
Note, however, that r10k and puppet module install don't play well together:
Restriction: If you are using Code Manager or r10k, do not install, update, or uninstall modules with the puppet module command. With code management, you must install modules with a Puppetfile. Code management purges modules that were installed with the puppet module command. See the Puppetfile documentation for instructions.

wedriverio jenkins - npm command not found error

I am trying to run webdriverio test from jenkins and following this . I installed nodeJS plugin for jenkins and under global tool config, for NodeJS , added a name and installation directory as /usr/local/bin (node executable is in this folder)
In Jenkins, in project config , under build environment, I have checked
Provide Node & npm bin/ folder to PATH and chosen the node installation name from previous step
But when I am trying to run npm install
npm test ,by adding these commands under execute shell under Build and building it, I receive this error
Building in workspace /Users/Shared/Jenkins/Home/workspace/wdio-project
[wdio-project] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh
+ npm install
/Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh: line 2: npm: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
In case someone is looking for same issue, I resolved the above error by adding export PATH=/usr/local/bin to the execute shell under build. This post helped me
There is currently a bug opened about this (JENKINS-26583 and JENKINS-27170)
I could workaround this bug by adding explicitly node on the PATH by adding this line :
export PATH=$PATH:/home/jenkins/.jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node_js/bin/
I had just fixed the same issue as you did.
I wonder if my fix would also help you. When I was using the alpine-based docker image, the Jenkins can never find the npm, but when I use the debian-based docker image, problem solved immediately.
Try this export PATH=/usr/local/bin:$PATH
After installation of NodeJS restart pc
In my case this worked -
export PATH=$PATH:/usr/local/bin

Gitlab CE has no Layout

I have a problem with my Gitlab. After the installation it has no Layout.
When i try
bundle exec rake assets:precompile RAILS_ENV=production
It outputs
Could not locate Gemfile or .bundle/ directory
Gitlab is running on Debian with Apache. nginx is disabled.
from your directory run the following command
bundle install
if you see permission error the try above with command by appending "sudo"
You need to install rails app first then you can compile it's assets.

Gitlab 6.0 is not creating new repository

I'm trying to create a new project in 6.0. Gitlab says that repository was created successfully, but there is no repository created.
I was able to create project with repositories before. Suddenly these newly created repositories are not published on server.
Any help is highly appreciated!
Please switch in your gitlab install directory and run these commands to check your installation. Maybe something is not running:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Resources