Coder Social home page Coder Social logo

civicrm-buildkit-vagrant's Introduction

civicrm-buildkit-vagrant (cividev)

This software is derived from Varying Vagrant Vagrants. It is an open source Vagrant configuration focused on CiviCRM development. Cividev inherits VVV's MIT License.

Overview

The Purpose of cividev

The primary goal of civicrm-buildkit-vagrant (cividev) is to provide a complete and easily installable development environment for CiviCRM with a standard server setup and CiviCRM configuration templates.

Cividev is ideal for testing new releases, developing extensions and contributing to CiviCRM core.

How to Use cividev

Software Requirements

Cividev requires recent versions of both Vagrant (1.7+) and VirtualBox (4.3+) to be installed. If you use it for development, it will work with your favorite locally installed development environment.

Vagrant is a "tool for building and distributing development environments". It works with virtualization software such as VirtualBox to provide a virtual machine sandboxed from your local environment.

Cividev as a MAMP/XAMPP Replacement

Once Vagrant and VirtualBox are installed, download or clone cividev and type vagrant up to automatically build a virtualized Ubuntu server on your computer containing everything needed to test or develop with any combination of CMS and CiviCRM versions. See our section on The First Vagrant Up for detailed instructions.

Multiple projects can be developed at once in the same environment. Cividev is pre-configured with the following CiviCRM configurations:

  • d7-master with Drupal 7 and the current development version of CiviCRM
  • wp-master with WordPress
  • d8-master with Drupal 8
  • b-master with Backdrop

Cividev's config, database, log and www directories are shared with the virtualized server.

These shared directories allow you to work, for example, in cividev/www/d7-master in your local file system and have those changes immediately reflected in the virtualized server's file system and http://d7-master.test/. Likewise, if you vagrant ssh and make modifications to the files in /srv/www/, you'll immediately see those changes in your local file system.

The First Vagrant Up

  1. Start with any local operating system such as Mac OS X, Linux, or Windows.
  2. Install Git.
  • Windows users: Be sure to add the Git executables to your path (See, e.g. this guide, under "Prerequisites")
  1. Install VirtualBox 4.3 or above
  2. Install Vagrant 1.7 or above
    • vagrant will now be available as a command in your terminal, try it out.
    • Note: If Vagrant is already installed, use vagrant -v to check the version. You may want to consider upgrading if an older version is in use.
    • if you are on Windows, please install git with ssh as described here
  3. Windows Users - if using the bash shell (usually the Git Bash Shell) make sure the process runs as administrator.
  4. Windows users should be certain that their BIOS' virtualization settings are enabled. (Intel owners should enable VT-x while AMD owners should enable AMD-v. See here for a better explanation.)
  5. Install the vagrant-hostsupdater plugin with vagrant plugin install vagrant-hostsupdater
    • Note: This step is not a requirement, though it does make the process of starting up a virtual machine nicer by automating the entries needed in your local machine's hosts file to access the provisioned VVV (Varying Vagrant Vagrants) domains in your browser.
    • If you choose not to install this plugin, the following entries should be added to your local hosts file:
      192.168.123.10  cividev civi.test d7-master.test wp-master.test d7-46.test wp-46.test
      192.168.123.10  d8-46.test b-46.test d8-master.test b-master.test
      
  6. Install the vagrant-triggers plugin with vagrant plugin install vagrant-triggers
    • Note: This step is not a requirement. When installed, it allows for various scripts to fire when issuing commands such as vagrant halt and vagrant destroy.
    • By default, if vagrant-triggers is installed, a db_backup script will run on halt, suspend, and destroy that backs up each database to a dbname.sql file in the {vvv}/database/backups/ directory. These will then be imported automatically if starting from scratch. Custom scripts can be added to override this default behavior.
    • If vagrant-triggers is not installed, VVV will not provide automated database backups.
  7. Clone or extract the civicrm-buildkit-vagrant project into a local directory
    • git clone git://github.com/civicrm/civicrm-buildkit-vagrant.git cividev
    • OR download and extract the repository master zip file to a cividev directory on your computer.
    • OR download and extract a stable release zip file if you'd like some extra comfort.
  8. In a command prompt, change into the directory where you placed the files. Use cd from the command prompt to do this.
  9. Start the Vagrant environment with vagrant up
    • Be VERY patient as the magic happens (time for a coffee or lunch break?). This will take a while on the first run as your local machine downloads the required files and builds all.
    • Watch as the script ends, as an administrator or su password may be required to properly modify the hosts file on your local machine.
  10. Visit any of the following default sites in your browser:
  11. Build additional instances:
    • ssh into your machine with 'vagrant ssh' from the cividev directory
    • type 'civibuild create ' with one of the predefined configurations (ie. wp-46 for example)
    • go to 'http://.test' in your local browser to acces the new instance (ie. http://wp-46.test)

Fancy, yeah?

What Did That Do?

The first time you run vagrant up, a packaged box containing a basic virtual machine is downloaded to your local machine and cached for future use. The file used by Varying Vagrant Vagrants contains an installation of Ubuntu 14.04 and is about 332MB.

After this box is downloaded, it begins to boot as a sandboxed virtual machine using VirtualBox. Once booted, it runs the provisioning script included with VVV. This initiates the download and installation of around 100MB of packages on the new virtual machine. Then buildkit is downloaded, configured and the d7-master configuration is built (therefore pre-seeding all caches).

The time for all of this to happen depends a lot on the speed of your Internet connection. If you are on a fast cable connection, it will likely take around 30 minutes.

On future runs of vagrant up, the packaged box will be cached on your local machine and Vagrant will only need to apply the requested provisioning.

  • Preferred: If the virtual machine has been powered off with vagrant halt, vagrant up will quickly power on the machine without provisioning.
  • Rare: If you would like to reapply the provisioning scripts with vagrant up --provision or vagrant provision, some time will be taken to check for updates and packages that have not been installed.
  • Very Rare: If the virtual machine has been destroyed with vagrant destroy, it will need to download the full 100MB of package data on the next vagrant up.

Now What?

Now that you're up and running, start poking around and modifying things.

  1. Access the server via the command line with vagrant ssh from your vagrant-local directory. You can do almost anything you would do with a standard Ubuntu installation on a full server.
    • MS Windows users: An SSH client is generally not distributed with Windows PCs by default. However, a terminal emulator such as PuTTY will provide access immediately. For detailed instructions on connecting with PuTTY, consult the VVV Wiki.
    • From within a remote ssh to vagrant, you'll find the civicrm files in /srv/www/cms_branch/sites/all/modules/civicrm. For example, /srv/www/d7-master/sites/all/modules/civicrm. Careful, you may also find some civicrm files in /vagrant/www/... these are old artifacts, and aren't the right ones.
  2. Power off the box with vagrant halt and turn it back on with vagrant up.
  3. Suspend the box's state in memory with vagrant suspend and bring it right back with vagrant resume.
  4. Reapply provisioning to a running box with vagrant provision.
  5. Destroy the box with vagrant destroy. Files added in the www directory will persist on the next vagrant up.
  6. Start modifying and adding local files to fit your needs. Take a look at Auto Site Setup for tips on adding new projects.

Caveats

The network configuration picks an IP of 192.168.123.10. It could cause conflicts on your existing network if you are on a 192.168.123.x subnet already. You can configure any IP address in the Vagrantfile and it will be used on the next vagrant up

Cividev relies on the stability of both Vagrant and Virtualbox. These caveats are common to Vagrant environments and are worth noting:

  • If the directory cividev is inside of is moved once provisioned, it will break.
    • If vagrant destroy is used before moving, this should be fine.
  • If Virtualbox is uninstalled, cividev will break.
  • If Vagrant is uninstalled, cividev will break.

The default memory allotment for the cividev virtual machine is 1024MB. If you would like to raise or lower this value to better match your system requirements, a guide to changing memory size is in the wiki.

Credentials and Such

All CMS usernames and passwords for these installations are demo / demo and admin / admin by default.

The MySQL/phpMyAdmin username and password is root / root by default.

Please note that cividev is a development and testing environment, it is NOT secure and NOT intended to be used in production or on any Internet-accessible server.

Running Unit Tests

CD to /srv/www/d7-master/sites/all/modules/civicrm/tools/scripts Run phpunit /srv/www/d7-master/sites/all/modules/civicrm/tests/phpunit/HelloTest.php

What do you get?

A bunch of stuff!

  1. Ubuntu 18.10
  2. apache 2.4.x
  3. mysql 5.7.x
  4. php5 7.2.x and all extensions needed for CiviCRM
  5. memcached
  6. PHP memcache extension
  7. PHP xdebug extension
  8. PHPUnit
  9. git
  10. ngrep
  11. dos2unix
  12. Composer
  13. phpMemcachedAdmin
  14. phpMyAdmin (multi-language)
  15. Opcache Status
  16. Webgrind
  17. NodeJs
  18. grunt-cli
  19. Mailcatcher
  20. [buildkit] and all related tools
  21. Drupal 7 and 8, Wordpress latest version, Backdrop

Need Help?

  • Let us have it! Don't hesitate to open a new issue on GitHub if you run into trouble or have any tips that we need to know.

Copyright / License

Cividev is derivative work based on VVV. VVV is copyright (c) 2014-2015, the contributors of the VVV project under the MIT License.

civicrm-buildkit-vagrant's People

Contributors

barnabycourt avatar demeritcowboy avatar eileenmcnaughton avatar homotechsual avatar jhoskins98 avatar johnff avatar kcristiano avatar litespeedmarc avatar mattwire avatar nganivet avatar totten avatar xurizaemon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

civicrm-buildkit-vagrant's Issues

Is this project still supported?

I have been experimenting with using this project to build my CiviCRM dev environment but it appears to produce a large number of errors when run and does not appear able to produce a functional vagrant VM for CiviCRM development at this stage.

Are there any plans to update this project - I think it is a great project btw good work - or is that unlikely at this stage?

This project is currently still listed as the default Vagrant based development tool at docs.civicrm.org.

Configuration Check failed

I am having the issue with installation on

Windows 10
Vagrant 2.1.1
Virtual Box 5.2.12

Here are the results When I run vagrant up

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 4.3.36
    default: VirtualBox Version: 5.2
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater] Writing the following entries to (C:/WINDOWS/system32/drivers/etc/hosts)
==> default: [vagrant-hostsupdater]   192.168.123.10  civi.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  civi.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  d7-46.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  d7-master.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  wp-46.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  wp-master.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  d8-46.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  d8-master.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  b-46.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater]   192.168.123.10  b-master.dev  # VAGRANT: a16bb0b2673a8b35cde49c6cc2212bb1 (default) / 85b375ff-ff3c-483c-b03d-b153c6a4ccd1
==> default: [vagrant-hostsupdater] This operation requires administrative access. You may skip it by manually adding equivalent entries to the hosts file.
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /srv/www => E:/cividev/www
    default: /srv/log => E:/cividev/log
    default: /vagrant => E:/cividev
    default: /srv/config => E:/cividev/config
    default: /srv/database => E:/cividev/database
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
    default: Running: inline script
    default: mysql stop/waiting
    default: mysql start/running, process 2277
==> default: Running provisioner: shell...
    default: Running: inline script
    default:  * Restarting web server apache2
    default:    ...fail!
    default:  * The apache2 configtest failed.
    default: Output of config test was:
    default: (2)No such file or directory: AH02291: Cannot access directory '/home/vagrant/.amp/log/' for error log of vhost defined at /etc/apache2/conf-enabled/civi.dev.conf:3
    default: AH00014: Configuration check failed
    default: Action 'configtest' failed.
    default: The Apache error log may have more information.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Am I doing something wrong

Permissions issue on building backdrop sites

civibuild install b-master fails when trying to install Backdrop

/home/vagrant/buildkit/src/civibuild.lib.sh: line 815: ./core/scripts/install.sh: Permission denied

I was not able to work out why this happens. However I was able to work around it by editing
~/buildkit/src/civibuild.lib.sh line 815

and specifying php so that line now reads

php ./core/scripts/install.sh ...

rather than relying on the hashbang. Not sure why this occurs, everything is running as the vagrant user. On OSX 10.14.3 if relevant.

Problems with NPM

After installing this into Ubunto 17.04

I could reach 'civi.dev' in the browser, but not 'http://d7-master.dev/'

It appears civibuild didn't build the instance...

vagrant ssh

I try 'civibuild d7-46'

And I get:
npm WARN npm npm does not support Node.js v0.10.25
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm You can find the latest version at https://nodejs.org/

/usr/local/lib/node_modules/npm/lib/install.js:298
[this, (next) => { computeMetadata(this.idealTree); next() }],
^
npm ERR! Unexpected token >

npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-07-04T17_21_09_231Z-debug.log

Problem to try $drush cr or any drush command

Problem to try $drush cr or any drush command

I have the same problem to try another command like $drush cpex config --changelist

Command cache-rebuild needs a higher bootstrap level to run - you [error]
will need to invoke drush from a more functional Drupal environment
to run this command.
Command cache-rebuild requires Drupal core version 8+ to run. [error]
The drush command 'cr' could not be executed. [error]

$drush status
PHP configuration : /etc/php/7.0/cli/php.ini
PHP OS : Linux
Drush script : /usr/local/bin/drush
Drush version : 8.1.13
Drush temp directory : /tmp
Drush configuration :
Drush alias files :

Drush Version : 8.1.13

I need help fix that...

can't even find civi.dev with IE

I just finished my first vagrant up. I'm not able to browse to http://civi.dev with any browser. I can sort of understand why that happens with Chrome and FF, but why would I get a 404 with IE?

I can ping civi.dev with no trouble, but I could use some help browsing there. Does this mean my installation failed somehow?

Install error: Cannot access directory '/home/vagrant/.amp/log/'

Noted during vagrant up at #CiviBCN.

    default: (2)No such file or directory: AH02291: Cannot access directory '/home/vagrant/.amp/log/' for error log of vhost defined at /etc/apache2/conf-enabled/civi.test.conf:3
    default: AH00014: Configuration check failed

phpunit4 PHP Fatal error: Cannot redeclare

From the civicrm root, running env CIVICRM_UF=UnitTests phpunit4 ./tests/phpunit/CRM/AllTests.php returns PHP Fatal error: Cannot redeclare civicrm_api3_price_field_value_create()

printenv shows CIVICRM_UF=UnitTests is set

NO phpunit4 ./tests/phpunit/CRM/AllTests.php (returns error above)
OK phpunit4 tests/phpunit/CRM/Contact/BAO/IndividualTest.php
OK phpunit4 ./tests/phpunit/CRM/Contact/BAO/IndividualTest.php
OK phpunit4 ./tests/phpunit/CRM/PCP/BAO/PCPTest.php
OK phpunit4 tests/phpunit/api/v3/PriceFieldTest.php
OK phpunit4 tests/phpunit/api/v3/PriceFieldValueTest.php
NO phpunit4 tests/phpunit/api/v3/PcpTest.php (returns cannot redeclare civicrm_api3_pcp_create())

Any ideas? Disabled opcache and same issue. Cant find where to disable memcache.

The apache2 configtest failed

Initially I tried using the manual method to install the buildkit but I swiched to using the vagrant installation method. everything went well except at the last part were I ran

vagrant up

but I keep getting this set of error...

==> default: * The apache2 configtest failed.
==> default: Output of config test was:
==> default: (2)No such file or directory: AH02291: Cannot access directory '/home/vagrant/.amp/log/' for error log of vhost defined at /etc/apache2/conf-enabled/civi.dev.conf:3
==> default: AH00014: Configuration check failed
==> default: Action 'configtest' failed.
==> default: The Apache error log may have more information.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Please I need help with this>_

use .test gTLD rather than .dev

Since 2017, .dev gTLD has shipped with a preconfigured HSTS entry in Chrome and Firefox that requires the browser to use SSL. .dev is owned by Google.

RFC6761 reserves .test, .local, .example and .invalid domains for this sort of use.

If we switch to .test (or .local), there's no HSTS entry and we can rely on it remaining so. My proposal is .test.

Internal DNS resolution flaky, cause of phpmyadmin not installing

Internal DNS was not working for files.phpmyadmin.net. Adding external DNS entry to resolve.conf - "nameserver 8.8.8.8" - fixed issue, allowed phpmyadmin to be installed using steps in provision.sh. This DNS issue may have caused other failed installations too.

xDebug

It'd also be neat if the Vagrant came with xDebug installed.

I haven't been able to get xDebug working with netbeans (or insert your fave IDE here) for CLI php (including phpunit) but I have for running it through the browser, as follows. Please could a maintainer look at how to make it work for the CLI?

Find location of xdebug.so. Mine was in /usr/lib/php5/20121212/xdebug.so

In vagrant@civi:/etc/php5/apache2/php.ini, at bottom:

zend_extension = /usr/lib/php5/20121212/xdebug.so
xdebug.remote_enable=1
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=10.0.2.2
xdebug.remote_port=9001
xdebug.remote_connect_back = 1
xdebug.max_nesting_level = 200

If that can't be added to the Vagrant box in some way (I wasn't able to figure out how), perhaps it could be added to the docs?

Drush

Hi,

On the d7-master, drush wasn't installed. I resolved this by altering /srv/www/d7-master/sites/all/modules/civicrm/composer.json.

Under require, adding
"drush/drush": "8.1.3"

And changing symfony finder to
"symfony/finder": "~2.7",

However, I can't find where in this repo I can add these! Some won't want drush installed on a non-dev server, but on a dev server it's pretty standard.

Cannot connect to new install - .dev domain issue

Chrome and Firefox have implemented HSTS on the now-Google-owned .dev TLD. Those browsers MUST connect securely to .dev domains; however, no security certificate is available, and even making a self-signed available - Firefox cannot provide a security exception in this case.

I think the TLD used needs to be changed to .test or .localhost or something.

Help for Ubuntu 17.04

Very Cool Stuff!

Successfully installed civicrm-build-vagrant on Ubuntu 17.04
Started with plain vanilla 17.04

For people working to install this on a Ubuntu 17.04 with Secure Boot enabled to allow UEFI dual boot with Windows, see this:
https://stegard.net/2016/10/virtualbox-secure-boot-ubuntu-fail/

I had to run the vagrant commands as sudo
'sudo vagrant up'

Without this, the hosts were not able to be written to get to the provided addresses like 'civi.dev'

Also, after successful install, the 'sudo vagrant up' said it was successfully up, and I could use 'sudo vagrant ssh' to ssh into the virtualbox, but I couldn't reach 'civi.dev' in the browser

After much stabbing in the dark, I by chance tried to run 'ifconfig', and realized that the package 'net-tools' was not installed...

So I installed that by:
'sudo apt-get install net-tools'

then halted the vagrant, and brought it up again

after that I could reach
'civi.dev' in the browser

Improve Windows setup

I attended CiviCon and hoped to use this project to set up a development environment for developing on Windows. This has taken quite a bit of support, so this ticket is to record specific issues we identified (and resolutions where we found them).

This was on a University network at CiviCon so it's possible some issues were environment specific. Provider was Virtualbox.

dnsmasq

Provision would fail when dnsmasq restarted - dnsmasq would point /etc/resolv.conf to 127.0.0.1, and after this all DNS requests would fail, preventing provision tasks which required internet access. Workaround was to back up the initial /etc/resolv.conf, dpkg -r dnsmasq on the client, restore the default resolv.conf, and comment out the dnsmasq package in provision.sh

initial permissions

After provision, some files in ~vagrant/ belonged to root rather than vagrant. Resolution was sudo chown -R vagrant: ~vagrant

apache not configured to use amp / incomplete provision

Post-install, Apache was not configured to use AMP. The First Vagrant Up section suggests the client would come up with http://d7-master.dev, but that showed Apache's default start page instead. This might have been a failed provision.sh run - wget had timed out fetching hub.tgz, but the final message was "Provisioning completed in 1200s". To resolve, vagrant ssh then run sudo /vagrant/provision/provision.sh again. This completed the provision but didn''t leave d7-master.dev working - we also had to manually create /etc/apache2/conf-available/amp.conf with the line below, then enable that config.

Include /home/vagrant/.amp/apache.d/*.conf

.dev sites on google chrome

This is a minor quality of life issue.

Since version 66 (Dec 2017) Chrome now force redirects all sites ending in the .dev domain to https even on the localhost. see this write up on the issue.

This causes a server response error when trying to view the pre-generated sites on chrome (Other browsers work fine).

We can manually add/modify existing host setting but it if it is not too large a job it may be worth modifying the .dev to something else like .devel or .localhost in the default settings.

Again thank you so much for all the work on this project!

Install error: /tmp/vagrant-shell: line 534: /srv/www/phpcs/scripts/phpcs: No such file or directory

Hey @mattwire, I'm just noting a bunch of possibly harmless errors during install.

We don't need to prioritise them, but I think it's worth putting them on the radar; if we can catch them and silence them then people will be better able to tell "real" problems from noise.

    default: Cloning into '/srv/www/phpcs/CodeSniffer/Standards/WordPress'...
    default: /tmp/vagrant-shell: line 534: /srv/www/phpcs/scripts/phpcs: No such file or directory
    default: /tmp/vagrant-shell: line 535: /srv/www/phpcs/scripts/phpcs: No such file or directory
    default: /tmp/vagrant-shell: line 536: /srv/www/phpcs/scripts/phpcs: No such file or directory

Running Unit Tests

I'm encountering the following error when trying to run unit tests out of the box on this awesome vagrant.

vagrant@civi:/srv/www/d7-master/sites/all/modules/civicrm/tools/scripts$ phpunit
PHPUnit 4.3.5 by Sebastian Bergmann.
...
vagrant@civi:/srv/www/d7-master/sites/all/modules/civicrm/tools$ scripts/phpunit
bash: scripts/phpunit: Permission denied
vagrant@civi:/srv/www/d7-master/sites/all/modules/civicrm/tools$ sudo scripts/phpunit
sudo: scripts/phpunit: command not found

The following works fine however. Perhaps it could be added to the instructions?

vagrant@civi:/srv/www/d7-master/sites/all/modules/civicrm/tools/scripts$ phpunit /srv/www/d7-master/sites/all/modules/civicrm/tests/phpunit/HelloTest.php

PHPUnit 4.3.5 by Sebastian Bergmann.
Configuration read from /srv/www/d7-master/sites/all/modules/civicrm/tools/scripts/phpunit.xml
.
Time: 144 ms, Memory: 3.00MB
OK (1 test, 1 assertion)

Missing Config Directory

I am missing the entire config directory in /home/vagrant/buildkit/app/ so when I run buildkit create I get ERROR: Missing main script (/home/vagrant/buildkit/app/config/d7-master.dev/download.sh).

This is what my directory structure looks like.

screen shot 2017-05-12 at 10 38 50 am

Thank you for helping me figure out how to get this config directory in the right place.

Thanks,
Steve

A customization command failed: setting amount of memory

On latest, after running vagrant up for the first time on a fresh instance, and subsequently.

A customization command failed:

["modifyvm", :id, "--memory", 6041]

The following error was experienced:

#<Vagrant::Errors::VBoxManageError: There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "845e0e02-a047-4a96-acff-e262cbc762e1", "--memory", "6041"]

Stderr: VBoxManage: error: Invalid RAM size: 6041 MB (must be in range [4, 3584] MB)
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMSETTER(MemorySize)(ValueUnion.u32)" at line 625 of file VBoxManageModifyVM.cpp

Please fix this customization and try again.

vagrant up not working after vagrant suspend

Hi, I am noobi with civicrm/vagrant.
This is my first install. I have a slow internet so before running the vagrant, i downloaded the ubuntu/trusty64 from vagrant atlas and and added it manually.
vagrant box add ubuntu/trusty64 [filepath]. it worked but it says version 0.
I shot down vagrant with vagrant suspend then tried vagrant up but id did not recognized my already existing VM and tried to build new one and failed.
So i got my VM's UUID and replaced the value in \.vagrant\machines\default\virtualbox\id file.
didn't worked at first but then i manually shot down the VM (from saved status to power off).
Now when i do vagrant up i get this :

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...
    default: Warning: Authentication failure. Retrying...

it keeps repeating default: Warning: Authentication failure. Retrying... and then gives timeout error.

I also added v.gui = true to vagrantfile so now i have VM screen that is asking for login

Ubuntu 14.04.5 LTS civi tty1
civi login :

now if i run vagrant up while vm is already running i get this out put :

Bringing machine 'default' up with 'virtualbox' provider...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 civi.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 civi.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 d7-46.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 d7-master.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 wp-46.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 wp-master.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 d8-46.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 d8-master.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 b-46.dev
==> default: [vagrant-hostsupdater]   found entry for: 192.168.123.10 b-master.dev
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
==> default: Running provisioner: shell...
SSH Authentication failed , this is cuased by public/private keypair not properly set on guest vm.

I read in some post that i need to chmod 0600 ~/.ssh/authorized_keys but first i need to get into the vm os.
I tried admin:admin, demo:demo, root:root no success.

So whats the user/password to get into the vm ?
and why did this happened? did i do something wrong?

download.sh script missing error

Hello,
I'm trying to create a builtkit for d7-46.dev but it gives me following error:

vagrant@civi:~/buildkit$ civibuild create d7-46.dev
[[Download d7-46.dev (type 'd7-46.dev' in '/srv/www/d7-46.dev')]]
[[Update caches]]
ERROR: Missing main script (/home/vagrant/buildkit/app/config/d7-46.dev/download.sh)

Please Help!
Thanks

WP Install fails due to soft link creation issues

At the St Louis sprint, some uses experienced issues with civibuild create wp-master Traced this to creating a soft link here https://github.com/civicrm/civicrm-buildkit/blob/master/app/config/wp-demo/download.sh#L15

This appears to be intermittent, and looks to be permissions related to running Virtual Box on Windows.

As wp-cli does not need yml file in each site, for the Vagrant buildkit we can add a single yml file at ~/.wp-cli/config.yml see theb docs:
https://make.wordpress.org/cli/handbook/config/#config-files

We will need a corresponding patch to buildkit since the fact that we can create a single yml here will not address the code that shows the error. Perhaps we should test to see if ~/.wp-cli/config.yml exists before creating the soft link.

Permissions for phpunit

First, thanks for this amazing tool!

But ( ;] ) I'm having trouble running phpunit tests. It looks like the /tools/scripts/phpunit script is not executable, even though it's group is 'vagrant'?

I'm trying to run the equivalent of:

cd /path-to/civicrm/tools
scripts/phpunit AllTests

Errors on halt trigger stop halt

I can't seem to run vagrant halt on my cividev. Even vagrant halt --force doesn't work.

I get the following output:

The local command "vagrant ssh -c 'vagrant_halt'" returned a failed exit
code or an exception. The error output is shown below:

/home/vagrant/bin/db_backup: line 12: /srv/database/backups/d7masterci_7vf98.sql: No such file or directory
/home/vagrant/bin/db_backup: line 12: /srv/database/backups/d7mastercm_mrxti.sql: No such file or directory
/home/vagrant/bin/db_backup: line 12: /srv/database/backups/d7masterte_eo19x.sql: No such file or directory

I suspect this is a Guest Additions issue, so I was trying to halt and up to trigger a resync. In the end I manually used the VirtualBox GUI to halt the VM.

I don't know if this is a vagrant issue, or an issue with the vagrant halt script.

Invalid state

Following these instructions on Ubuntu 14.04.4 LTS, I get an error, the end of which looks like:

==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

I tried vagrant up again and it gave me the same error. I wonder if the new vagrant has an issue? I followed the instructions and used the latest (1.8.1) version.

PHP 7

Hi,

As we're trying to get more people using PHP7, is it a good idea to upgrade this to PHP 7?

There doesn't seem to be an easy way to get manual upgrades working!

John

Vagrant triggers plugin warning

Running vagrant up with the vagrant triggers installed leaves a warning

WARNING: Vagrant has detected the `vagrant-triggers` plugin. This plugin conflicts
with the internal triggers implementation. Please uninstall the `vagrant-triggers`
plugin and run the command again if you wish to use the core trigger feature. To
uninstall the plugin, run the command shown below:

  vagrant plugin uninstall vagrant-triggers

Note that the community plugin `vagrant-triggers` and the core trigger feature
in Vagrant do not have compatible syntax.

To disable this warning, set the environment variable `VAGRANT_USE_VAGRANT_TRIGGERS`.

```

dnsmasq fails configuration on provision

During first provision, I see the following error output and dnsmasq is left in an unconfigured state.

default: Setting up dnsmasq (2.68-1ubuntu0.2) ...
default: Configuration file '/etc/dnsmasq.conf'
default:  ==> File on system created by you or by a script.
default:  ==> File also in package provided by package maintainer.
default:    What would you like to do about it ?  Your options are:
default:     Y or I  : install the package maintainer's version
default:     N or O  : keep your currently-installed version
default:       D     : show the differences between the versions
default:       Z     : start a shell to examine the situation
default:  The default action is to keep your current version.
default: *** dnsmasq.conf (Y/I/N/O/D/Z) [default=N] ?
default: Configuration file '/etc/dnsmasq.conf'
default:  ==> File on system created by you or by a script.
default:  ==> File also in package provided by package maintainer.
default:    What would you like to do about it ?  Your options are:
default:     Y or I  : install the package maintainer's version
default:     N or O  : keep your currently-installed version
default:       D     : show the differences between the versions
default:       Z     : start a shell to examine the situation
default:  The default action is to keep your current version.
default: *** dnsmasq.conf (Y/I/N/O/D/Z) [default=N] ?
default: dpkg: error processing package dnsmasq (--configure):

See https://gist.github.com/xurizaemon/1ca971c1fde285701f0f377d32f79283 for example run output.

I don't think this is caused by the changes in #41, pretty sure it was happening beforehand too ๐Ÿ˜„

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.