Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 847 forks source link

How to declare plugin options (`version`, `activate`, etc.) in vvv-custom.yml ? #1935

Closed looshi closed 5 years ago

looshi commented 5 years ago

Is it possible to declare plugins and plugin options in vvv-custom.yml ?

I don't see any information about how to declare plugins in vvv-custom.yml in the vvv documentation here: https://varyingvagrantvagrants.org/docs/en-US/vvv-config/.

For example:

      plugins:
        - { plugin: "akismet", activate: true, etc. }  # Doesn't seem to work.
      plugins:
        - akismet  # Seems to work, but can't set any options 

Here is the full vvv-custom.yml that I am trying to use.

After editing I run vagrant reload --provision.

vvv-custom.yml
---
# IMPORTANT, if you change this file, you have to reprovision:
# `vagrant reload --provision` OR `vagrant up --provision`

sites:
  my-site:
    skip_provisioning: false
    description: "My Site"
    repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git
    hosts:
      - my-site.test

    custom:
      admin_user: admin
      admin_password: password
      admin_email: example@gmail.com
      title: My Site
      db_prefix: wp_
      multisite: false
      xipio: false
      version: 5.2.2
      locale: en_US
      plugins:
        - { plugin: "akismet", activate: true }
      themes:
        - astra
      delete_default_plugins: true
      delete_default_themes: true

# Utilities https://varyingvagrantvagrants.org/docs/en-US/utilities/
# are system level items that aren't websites, that install tools or packages
# the core utilities install tools such as phpmyadmin
utilities:
  core: # The core VVV utility
    - tls-ca # HTTPS SSL/TLS certificates
    - phpmyadmin # Web based database client
    #- memcached-admin # Object cache management
    #- opcache-status # opcache management
    #- webgrind # PHP Debugging
    #- mongodb # needed for Tideways/XHGui
    #- tideways # PHP profiling tool, also installs xhgui check https://varyingvagrantvagrants.org/docs/en-US/references/tideways-xhgui/
    #- php56
    #- php70
    #- php71
    #- php72
    #- php73

# vm_config controls how Vagrant provisions the virtual machine, and can be used to
# increase the memory given to VVV and the number of CPU cores.
# It can also be used to override the default provider being used within Vagrant.

vm_config:
  # For WP core development we recommend at least 2GB ( 2048 ),
  # If you have 4GB of RAM, lower this to 768MB or you may encounter issues
  memory: 2048
  # CPU cores:
  cores: 2

  # this tells VVV to use the prebuilt box copied from the USB drive at contributor days
  # once set to false, do not change back to true, and reprovision
  # wordcamp_contributor_day_box: false

  # Due to a limitation within Vagrant, the specified provider is only respected on a clean `vagrant up`
  # as Vagrant currently restricts you to one provider per machine
  # https://www.vagrantup.com/docs/providers/basic_usage.html#vagrant-up
  # provider: vmware_workstation

# General VVV options
general:
  # Backup the databases to the database/backups subfolder on halt/suspend/destroy, set to false to disable
  db_backup: true
  # Import the databases if they're missing from backups
  db_restore: true
  # set to true to use a synced shared folder for MariaDB database storage
  db_share_type: false
  # GitHub token to use from composer
  #github_token: xxxxxx

After the vagrant provisioner has completed, if I visit the admin portion of the site no plugins are installed :

Screen Shot 2019-08-31 at 9 10 00 AM

thanks!

tomjn commented 5 years ago

Hello! I’m on my phone at the moment but your “my-site” site is using the standard custom site template, yet it has definitions for things the site template does not support such as xipio etc, not all site templates work the same and it looks like you’ve copy pasted a definition from a 3rd party site template

Look at the readme for the site template for a full list of what it supports, otherwise you’ll need to fork it and modify the provision to do the custom provisioning you desire

On Sat, 31 Aug 2019 at 16:18, looshi notifications@github.com wrote:

Is it possible to declare plugins and plugin options in vvv-custom.yml ?

I don't see any information about how to declare plugins in vvv-custom.yml in the vvv documentation here: https://varyingvagrantvagrants.org/docs/en-US/vvv-config/.

For example:

  plugins:
    - { plugin: "akismet", activate: true, etc. }  # Doesn't seem to work.

  plugins:
    - akismet  # Seems to work, but can't set any options

Here is the full vvv-custom.yml that I am trying to use.

After editing I run vagrant reload --provision.

vvv-custom.yml

IMPORTANT, if you change this file, you have to reprovision:

vagrant reload --provision OR vagrant up --provision

sites: my-site: skip_provisioning: false description: "My Site" repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template.git hosts:

  • my-site.test

    custom: admin_user: admin admin_password: password admin_email: example@gmail.com title: My Site dbprefix: wp multisite: false xipio: false version: 5.2.2 locale: en_US plugins:

    • { plugin: "akismet", activate: true } themes:
    • astra delete_default_plugins: true delete_default_themes: true

Utilities https://varyingvagrantvagrants.org/docs/en-US/utilities/

are system level items that aren't websites, that install tools or packages

the core utilities install tools such as phpmyadmin

utilities: core: # The core VVV utility

  • tls-ca # HTTPS SSL/TLS certificates
  • phpmyadmin # Web based database client

    - memcached-admin # Object cache management

    - opcache-status # opcache management

    - webgrind # PHP Debugging

    - mongodb # needed for Tideways/XHGui

    - tideways # PHP profiling tool, also installs xhgui check https://varyingvagrantvagrants.org/docs/en-US/references/tideways-xhgui/

    - php56

    - php70

    - php71

    - php72

    - php73

vm_config controls how Vagrant provisions the virtual machine, and can be used to

increase the memory given to VVV and the number of CPU cores.

It can also be used to override the default provider being used within Vagrant.

vm_config:

For WP core development we recommend at least 2GB ( 2048 ),

If you have 4GB of RAM, lower this to 768MB or you may encounter issues

memory: 2048

CPU cores:

cores: 2

this tells VVV to use the prebuilt box copied from the USB drive at contributor days

once set to false, do not change back to true, and reprovision

wordcamp_contributor_day_box: false

Due to a limitation within Vagrant, the specified provider is only respected on a clean vagrant up

as Vagrant currently restricts you to one provider per machine

https://www.vagrantup.com/docs/providers/basic_usage.html#vagrant-up

provider: vmware_workstation

General VVV options

general:

Backup the databases to the database/backups subfolder on halt/suspend/destroy, set to false to disable

db_backup: true

Import the databases if they're missing from backups

db_restore: true

set to true to use a synced shared folder for MariaDB database storage

db_share_type: false

GitHub token to use from composer

github_token: xxxxxx

After the vagrant provisioner has completed, if I visit the admin portion of the site no plugins are installed :

[image: Screen Shot 2019-08-31 at 9 10 00 AM] https://user-images.githubusercontent.com/1656829/64065803-9fbad080-cbcf-11e9-9052-de6e7563de42.png

thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Varying-Vagrant-Vagrants/VVV/issues/1935?email_source=notifications&email_token=AAAOLZ5XTVSBCZIHXA57HRDQHKDV5A5CNFSM4IST6NSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIS6AJQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAOLZYZTGSO24JFMQMZOGLQHKDV5ANCNFSM4IST6NSA .

looshi commented 5 years ago

@tomjn okay, thanks.

Mte90 commented 5 years ago

Check at https://github.com/Varying-Vagrant-Vagrants/custom-site-template/. Right now is not possible to specify versions but only the plugin to install and activate

GitHub
Varying-Vagrant-Vagrants/custom-site-template
For when you just need a simple dev site. Contribute to Varying-Vagrant-Vagrants/custom-site-template development by creating an account on GitHub.
Mte90 commented 5 years ago

I think that can I improve the docs after this suggestions :-)

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.