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

Moodle plugin as exe file

I was trying to create windows .exe file to install moodle local plugin.
Is this doable installing plugin with .exe file?
Appreciate your suggestions. Reference to documentation access!
Are you trying to install Moodle? There are packages available for installing Moodle on a Windows machine:
https://docs.moodle.org/39/en/Complete_install_packages_for_Windows
Otherwise, using an exe to install a local plugin doesn't make any sense. You just need to copy the code to the local folder. Or unzip the code into a local folder.
Then either upgrade via your site yourmoodlesite/admin/ or use the command line:
php admin/cli/upgrade.php
See https://docs.moodle.org/39/en/Administration_via_command_line#Upgrading

MongoDB .msi installer not working on Windows 10

I have downloaded the .msi multiple times and tried to run in a variety of ways, however, I cannot install MongoDB on my windows 10 machine. When I click the .msi, I get the first "preparing to install" pop-up and then it just goes away. Nothing happens.
I tried downloading the zip folder which contains a bunch of .exes.. but still nothing. I'm not sure how to get this to work on my local.
Thoughts?
For some reason, the latest documentation doesn't include the manual installation process.
Download the distribution ZIP and extract it to c:\mongodb\ or equivalent.
Then from the resultant bin directory you can run an administrative powershell command (be sure to replace the paths with real paths that exist on your system):
PS C:\mongodb\bin> ./mongod.exe --install --logpath="c:\\path\\to\\logfile.log" --dbpath="c:\\path\\to\\data\\on\\disc"
This will create a windows service named "MongoDB" which should start automatically. If it doesn't, you can run net start MongoDB from your admin PS prompt.
Please download Mongodb from there official sites and also there is a very easy guide to install the mongodb on various OS.
Reference:- https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/

Which folder or files created in vagrant should not be push in a repository on GitHub

I would like to create a vagrant with some utilities installed, such like a configured LAMP, npm installed, etc... and later doing a push in a public github account.
I should create a .gitignore file with which restrictions? A simple vagrant project have this structure:
.vagrant (folder).
html (folder).
vagrantfile (file).
And I don't want some script shell for install the utilities when the user run vagrant up. For that I want to share an environment with everything and installed via vagrant ssh.
You definitely want your Vagrantfile. That's what defines your Vagrant environment. And you almost certainly want to ignore .vagrant/.
gitignore.io seems to agree:
# Created by https://www.gitignore.io/api/vagrant
### Vagrant ###
.vagrant/
You might also want to use this utility with the rest of your stack, e.g. here is a .gitignore generated for Composer, NodeJS and Vagrant.

How can I use Microsoft installer (msi) to group JBoss and Postgres database and make an .exe file?

I'm completely new to Microsoft installer and have installed advinst.msi, and I'm wondering how to use it.
I have to group Jboss where my Java application is deployed and postgres database and want to create an .exe file and deploy it to clients windows system.
Where the client can run the .exe file and start the application.
The Jboss package you can add a as a prerequisite. This will make Advanced Installer to install it when you install your application, see the link from above.
To deploy a database you have two options. Either you execute an SQL script that creates and populates it, as in this SQL scripts execution tutorial, or you deploy directly the binary files of your database, by placing them in the target folder from Files and Folders page, as you do with a normal file. The second option will make your installer to copy the files into the desired folder upon installation, so you database manager/explorer can access it.
To have all this bundled into a single executable you need to go to Media page and set the package output type to "Single setup EXE". From there you can also customize the EXE name, icon and output folder.

Recommended approach to deploy VMware PowerCLI command line console application

PowerCLI with .NET has some dependencies on dll's that you get only when you install PowerCLI on each machine you want to run.
I have a console app with command line arguments, which when deployed using the usual method doesn't work because of the unmet dependencies...these assemblies are part of the GAC.
Clickonce deployment proved to be useless..it didnt recognize my arguments although I passed them as query params.
Finally, I installed VMware PowerCLI on this remote machine. Then ran the .exe and it worked. Is there a way to avoid installing PowerCLI and be able to include all the dependencies with my exe during deployment?
Depending on where exactly you want to deploy your console application, you may be out of luck. According to this page and the most relevant forum post I could find, the PowerCLI assemblies are not redistributable. Your best bet if you want to distribute this application outside your company is to use the Web Services SDK - a huge pain since you've already developed the app.
Assuming your application is for internal use only and you just want to deploy it on its destination server, you can do the following to reference the assemblies locally:
On the development machine, copy whichever PowerCLI .dlls you reference from the GAC (in %WINDIR%\assembly) to your solutions local directory.
Change your references in the project to point to the local versions of the .dlls.
Open the 'Properties' view for each of the references, and make sure 'Copy Local' is set to True.
Compile and deploy your console application (and it's coresident .dlls) to the target machine, it should reference them in the local directory and run without external dependencies.
Hope that helps!
You could also automate PowerCLI installation with a silent installation one-line Powershell script, if the problem is hiding the installation from the users.
Invoke-Expression ("cmd /c '$powerCLIexeFilePath'/S /VADDLOCAL=ALL /V/qn")