Which folder or files created in vagrant should not be push in a repository on GitHub - 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.

Related

What's the fastest way to install and set up TYPO3 locally?

I want to install and set up TYPO3 on my local machine. What's the best practice and fastest way to do so?
For running TYPO3 on a local machine you need a web server running on your machine.
This can be done in different ways:
Native Web Server, PHP and database on a Linux based machine
Virtual Machine (VirtualBox, VMWare, Parallels, etc.)
Vagrant
Docker
Currently the fastest way to a "non power user" in my opinion is ddev.
ddev is a user-friendly possibility to run a perfect environment for TYPO3 on a docker base. It runs on Linux, Mac and Windows (minimum version 10, hyper-v recommended) and it brings all technologies you need for best experience.
Install Docker and ddev, see https://ddev.readthedocs.io/en/stable/
Create a folder for your installation, e.g. ~/Websites/my-website/ or C:\Websites\my-website\ and go into it.
Run ddev config and set these three options in the dialog:
Project name (default is your folder name): Whatever you like
Docroot location: public and say yes for creating
Project type: typo3
Run ddev start to start the Docker containers and add your root password to set the hosts entry (for accessing it via local domain)
Run ddev composer create typo3/cms-base-distribution ^9 and say yes for overwriting
Run ddev config again and just hit enter for every dialog to create a file which provides the DB credentials for your TYPO3 installation
Run ddev exec vendor/bin/typo3cms install:setup --no-interaction --admin-user-name=admin --admin-password=password --site-setup-type=site
That's all, you have a running TYPO3 instance on your local machine.
You can access it by using <project-name>.ddev.site in your browser, in our example it should be http://my-website.ddev.site. To get into the TYPO3 backend you only need to put the credentials admin:password on http://my-website.ddev.site/typo3.
For troubleshooting go to:
https://ddev.readthedocs.io/en/stable/users/troubleshooting/
https://docs.typo3.org/typo3cms/InstallationGuide/Troubleshooting/Index.html
https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/Appendix/SettingUpTypo3Ddev.html

Some beginner questions about Centreon

I am new to Centreon and I have a few questions I need to figure out. I have these services:
I just want to know how can I have these services like this.
2nd question
on Github, I find that the plugin is end with .pm not .pl, which is I wonder why, and how to use the plugin on Github, because I already put it in on a folder on Centreon and restart it on the poller, but I do not see the plugin I downloaded.
3rd question
For interfaces:
--plugin=os::linux::snmp::plugin --mode=interfaces --add-status --add-traffic
For services (if it's windows):
--plugin=os::windows::snmp::plugin
Is this just command or I have to modify it on a plugin ?
You must have create a new host and link to this host an host template. This host template is linked to services and this why you have services created. Do not hesitate to check this documentation
To use our centreon plugin you have two different way to do:
Clone our GitHub repository Here, and manage your script file by file use the centreon_plugins.pl to call the .pm file through the --plugin option, through the following command line you can download the repo:
git clone https://github.com/centreon/centreon-plugins.git
Use the Centreon RPM packages, who they correspond to the GitHub script, but all build per kind of devices (one .pl script per devices). You can install them with the following command line:
yum install --nogpgcheck centreon-plugins\*
By default all nagios plugins are stored in "/usr/lib64/nagios/plugins/" and the centreon plugins are stored in "/usr/lib/centreon/plugins/"
'--plugin' option is related to a command and it just indicate the plugin that will be used, you don't need to modify any plugin just the command unless you want to change something inside the plugin.

Vagrant Berkshelf - Shelf Path?

Is it possible to set the path where the berkshelf plugin puts the cookbooks it installs? (As in the .berkshelf folder)
I am running Windows 7.
I am currently trying to install a mysql server using an opscode cookbook to a vm and here at work they have the %HOMEDRIVE% system variable set to a network drive. So when .berkshelf starts at the beginning of the Vagrantfile, it pushes the cookbooks to the network drive and it causes it to be slow and well, its not where it should be. Is there a fix to this?
VirtualBox did this as well, but I fixed it by altering the settings. I tried looking for some sort of equivalent settings for berkshelf, but the closest I got was for the standard berkshelf (thats not a vagrant plugin), it appears you can set this environment variable:
ENV['BERKSHELF_PATH']
Found here:
http://www.rubydoc.info/github/RiotGames/berkshelf/Berkshelf#berkshelf_path-class_method
I need to be able to have the cookbooks it reads from the berksfile store to my laptops local drive instead, as in my scenario I cannot have the mobility of the VM limited to the building because of files that are stored on the network.
Any incite would be much appreciated.
Perhaps its better to use the actual berkshelf over the vagrant plugin?
Thanks.
If you want to have the portability - a full chef-repo ready for chef-solo runs, better off using standalone berkshelf instead of the vagrant-berkshelf plugin - which is NOT that flexibly.
For complex cookbooks, I prefer to use standalone berkshelf as it allows me to do berks install --path chef/cookbooks to copy all cookbooks required from ~/.berkshelf/cookbooks, then I can just tar the whole thing and transfer to other machines for the same chef-solo run. some people use capistrano automate the tar and scp/rsync over the network. I just use rysnc/scp;-)
HTH

What does "source" create or activate the virtual env?

I'm brand new to python, using terminal, pip and virtual env.
From what I gather, the command 'source' activates the virtual environment and anything you do after that stays in the virtual environment like installing something with pip installs it only in your virtual environment. However, do I need to actually create a folder or choose a location first before I run source? In other words, does source create the virtual environment or only activate one that already exists?
This stuff is really hard to wrap my head around. I think one of the things that is hindering my development is that I'm not familiar with certain directory structures like bin, ect.
Once you create a virtualenv, you will see source created in the directory.
You must cd to that particular source and do source activate to start working on that particular virtualenv. Each virtualenv has its own source.
You can also use virtualenv wrapper to make things easier.
Look, you need to create the virtual enviroment first, with something like this:
virtualenv venv
Where 'venv' is the destination directory. After that you can run:
source venv/bin/activate
You can take a look at virtualenv help with:
virtualenv --help

Issues with meteor app on vagrant share

I have a vagrant VM (virtualbox) setup with meteor. My host and guest are both Ubuntu. The VM contains a vboxfs share folder setup through the Vagrantfile. The behavior I am noticing is similar to a NFS mount.
I am able to create a meteor project in this shared folder, but when I run the project I get errors pointing to mongodb.
If I follow instructions on
https://github.com/pixelhandler/vagrant-dev-env/blob/master/README.md
my app works just fine.
Upon further investigation it seems that MongoDB does not work on NFS shares, http://www.mongodb.org/display/DOCS/NFS
Has anyone else run in to this issue? and if so, have you figured out a (non-rsync) solution?
I plan to send link of this question to 10gen, perhaps someone from their team can answer it.
Not sure what Mongo's plans are re running on NFS / vboxfs, but you could work around this by running your own MongoDB not in the shared folder (eg, use the ubuntu mongodb package). Use the MONGO_URL environment variable to tell meteor where to connect. If you pass this variable, meteor will not try to start MongoDB in the meteor project directory.
You can move the data dir somewhere inside the VM, and use a symlink from the vagrant folder:
cd /vagrant/.meteor/local
ln -s ~/db/
This means the data will not be shared, but you probably want it git ignored anyway.
(https://grahamrhay.wordpress.com/2013/06/18/running-meteor-in-a-vagrant-virtualbox/)
grahamrhay's solution would not work with the vagrant box started on Windows. There is no way to make symbolic links on windows for vagrant, at least not for administrator accounts.