VVV-Dashboard
VVV-Dashboard copied to clipboard
Dashboard does not load domains that were provisioned via VVV
I'm using the new provisioning system in VVV to create sites. When the sites are complete I go to the VVV dashboard and purge the hosts cache and refresh the page. New sites show as N/A (pictured in screenshot).
All of the links also display as "N/A" for the domain portion of the URL. For instance, the link to wp-admin is http://n/A/wp-admin
.
I always used VV but I will try to look into this weekend.
+1, confirmed. Just upgraded to VVV 2.0 and have the same issue. VV isn't ready for VV 2.0 yet, there are couple open issues.
![screen shot 2017-03-22 at 8 40 50 am](https://cloud.githubusercontent.com/assets/2056045/24188995/4a9caa64-0edb-11e7-8556-8c539d871faa.png)
This is still an issue when using the new provisioning system in VVV2. New sites show as N/A with bad paths - http://n/A/wp-admin or http://n/A/. Using vv -create works after manually adding a new site to vvv-custom.yml but is not in line with current provisioning.
+1
There are 2 things ongoing actually. The first is that VV doesn't provision in the expected format for VVV2.0 yet. And the second is that VVV-Dashboard builds its hosts_list relying on {host_path}/vvv-hosts,
I have done a 'standard' install in VVV2.0 using the provided example setup. With the 2.0 provisioning options and the way sites are being handled everything looks quite different. Main player would be the vvv-config.yml OR vvv-custom.yml (if exists) in the root of the VVV install. This is where all 2.0 sites are listed.
Setup of the example structure site is surprisingly easy and requires just 3 lines in the new yml file using the example repo (config is provided in vvv-config.yml). A site in itself gets a new directory structure, without vvv-hosts and using public_html instead of htdocs. Provisioning information and logs reside in subdirs.
<example-site>
- log
- provision
- public_html
wp-cli.yml
The vvv-config.yml / vvv-custom.yml files allow for full customization paths (vm_dir / local_dir) but these latter can be omitted and then the new 'default' paths will be used.
With the breaking changes on the VVV2.0 release, migration documentation has been provided - but like many - I am not inclined to spend time on moving sites. So I will continue with a mix of sites in old structures - as setup by VV) and use the new VVV2.0 format setting up future developments.
I hope the above provides a little bit more insight on what has happened under the hood. I believe for the dashboard to work with VVV2.0 it has to use yml files for knowledge of the site configuration. Sites setup for VVV1.x could be added to this file.
+1 bump
Okay. I have had the same issue and after looking into the source files, I was able to fix this with some minor modifications. Now creating a pull request.
I merged in the changes that @swashata made in the PR. Could you all do a pull on the dashboard and verify its working properly for you now. NOTE: you need to copy the newly changed dashboard-custom.php to the default root overwriting the old one or make the changes from the PR which is just an addition to the paths.
Working for me. VVV-Dashboard shows new sites created with vvv-custom.yml after manually adding the site to dashboard/vvv_dash/hosts/defaults.php
I tried this but it's still not adding new sites provisioned in VVV2 - I am using - Version: 0.2.0, Branch: 61e7ac6 master
@neilgee Try manually adding sites created with VVV2 to dashboard/vvv_dash/hosts/defaults.php. That worked for me.
@ryanemitchell thanks - i see in the host_list
function - I was hoping the PR was going to automatically add the sites.
It should. You should not have to edit code. I'll have to setup a fresh copy and go through the code and fix what ever is missing.
Ok, I can not get the adding a new site mentioning in the first original post to work at all. So if someone wants to shed light on that because following the instructions here https://develop.varyingvagrantvagrants.org/docs/en-US/adding-a-new-site/ is not working and each provision talks 10 minutes which in my opinion is crap. After 2.5 hours of changing little things and provisioning trying to get a site loaded I am not wasting more time. So someone using this process needs to explain.
One reason the domains are not loading in VVV Dashboard is they no longer use the vvv-hosts
files, which is funny because its still included with the default WP installs.
So create that file, probably in the sites directory and add the domain to the first line. THen purge the dashboard cache and the domain should load. Not sure about the rest since I can't get the instructions to work.
This is not obvious in those docs but actually you can provision in just about 20secs with a single site command - so add the site first in vvv-custom.yml
like so...
example:
repo: https://github.com/Varying-Vagrant-Vagrants/custom-site-template
hosts:
- example.dev
Then to provision run vagrant provision --provision-with=site-example
https://tomjn.com/2017/01/16/whats-new-vvv-2-0/
I don't know how topdown works right now, but is it not possible for topdown to parse the vvv-custom.yml file to assess which sites are setup? Vagrant provisions have always been slow, but if you use @neilgee recommendation, it will limit the provision to just the 1 install you need to deal with.
@neilgee that command doesn't do anything for me other than add the domain to the hosts. I am using the default init, so it should be running that and downloading wp (not) When provisioning is done (only adding the domain to hosts) it just redirects to the dashboard even if I have files in the public_html. Something is missing.
Actually, I can not get anything to provision other than the default sites.
@topdown Can you paste your yml file in here? I'm pretty sure indentation and exact syntax matters.
I was having that behaviour at some stage - can't quite remember how it rectified, make sure you do a git pull on VVV2 to have the latest.
Okay since this is working for me (auto listing sites added with new vvv method) I am going to break it down on how this is working. I am assuming the site in question is xyz.dev
so naturally it should reside inside www/xyz
directory.
- No, it doesn't look into the
vvv-custom.yaml
orvvv-config.yaml
file at all. I know it should, but it doesn't. - It looks for directories inside
www
. Here in our case it findswww/xyz
. - For each directory it finds, it looks for a
vvv-hosts
and if not foundprovision/vvv-hosts
file. This is used to get the domain name (xyz.dev). With the new method, we are supposed to place insideprovision/vvv-hosts
. - For each directory it finds, it looks for a
wp-cli.yml
file from where it gets the public folder. It washtdocs
before, but now it ispublic_html
.
And that's it really. So make sure that
- You have
vvv-hosts
orprovision/vvv-hosts
file inside the sites directory. - You have
wp-cli.yml
file sayingpath: public_html
or what-ever path where WordPress is actually installed. - Under
www/default
dashboard you have copied over the new filecp dashboard/dashboard-custom.php .
- You have cleared host cache under http://vvv.dev
I don't have any vvv-hosts file in the www/xyz/provision/ folder, just these three:
- vvv-init.sh
- vvv-nginx.conf
- vvv-nginx.conf.tmpl
but there are vvv-hosts files int the wodpress-default and develop folders.
I did a fresh vvv installation after VVV2 was relased, and I created all website with the new yml method
Same here, confirm that no vvv-hosts
file in newly provisioned sites in VVV2 .
@ironicmoka @neilgee
I see that. So with the new provisioning I need to read settings from the vvv-custom.yml file. I will see if I can make something like that. But for now, could you please put a vvv-hosts
file inside provision
directory with the following content
yoursite.dev
This won't break anything and VVV dashboard will start working again.
Any updates for that? In the meantime I changed on hosts.php line 85 "N/A" with basename($this->host_path) . '.dev'
in that way also on N/A the domain is right because often the folder name is the same of the domain
I added a new branch vvv2 with @Mte90 suggestion above if you guys want to checkout that branch and try it.
I still can not get VVV2 to do anything with vvv-custom.yml So testing the custom site setup via https://github.com/Varying-Vagrant-Vagrants/custom-site-template is useless and does literally nothing. I don't know how you guys are getting it to work but at this point, the custom site thing and vvv2 are no good to me and has already cost me 4 days of screwing around trying to get this to work.
The reality is for me to work on the dashboard VVV2 and the custom site process has to be working and it's just not on my end. No idea why.
Hoping that can help this is my vvv-custom.yml https://gist.github.com/Mte90/a94e6fb73f68f0958809308dea94c2d3
Also I saw (already reported) that if the folder of the new website added not exist on VVV/www doesn't exist doesn't download anything.
The commando vagrant --provision-with site-name
do the provision only of the new website.
@Mte90 I striped yours down to just the demo site https://gist.github.com/topdown/4fbb740ffc7c6e875c23caaf9f2aa15c
Then created the folder demo
Ran vagrant provision --provision-with=demo
It created the host entry and ended, screenshot attached. No downloading or anything, its like the process just ends. This is the same result I have been having the entire time. I event reinstalled triggers
and hostupdater
thinking maybe that would fix it.
Seems that this flag is not working :-/