-
- Notifications
You must be signed in to change notification settings - Fork 634
[WIP] Issue #320: add a dashboard #404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be replaced with the Drupal VM logo instead
| I think @oxyc is trying to win contributor of the millenium award. I think I owe you something like six beers now. This is already awesome, and looks exactly like what I would like. Since it's using the default path (at least for Debian, have to verify for RedHat) for the default server, the IP address of the domain should just open up to this, correct? We might need to set the apache/nginx roles to not delete the default vhost file though. |
| That's what I thought, that it would only take over the IP, but then it took over the hostname too. Not that familiar with configuring apache though. Haha, I'm running low on tasks at work so I'm trying to find other things to spend the day doing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo:
Drupal VM is A VM...
Appears in https://github.com/geerlingguy/drupal-vm/blob/master/docs/index.md as well.
| I got it working as expected if I changed the filenaming so that But I feel like it's supposed to work out of the box. Is there some hostname variable somewhere that says the IP maps to the hostname locally? Edit: also works if I set the |
| So some more research for apache under ubuntu.
So the default vhost resolves to the hostname due to the following in Guess we should really be creating a new vhost using the IP. Then we dont need to care about saving the default vhost file either. Easiest would be to continue bloating - servername: "{{ vagrant_ip }}" documentroot: "/var/www/dashboard" |
| So this works for both nginx and apache on Ubuntu at least. diff --git a/example.config.yml b/example.config.yml index 3072d80..c402358 100644 --- a/example.config.yml +++ b/example.config.yml @@ -97,6 +97,9 @@ apache_vhosts: extra_parameters: | ProxyPassMatch ^/(.*\.php(/.*)?)$ "fcgi://127.0.0.1:9000/usr/share/php/pimpmylog" + - servername: "{{ vagrant_ip }}" + documentroot: "/var/www/dashboard" + apache_remove_default_vhost: true apache_mods_enabled: - expires.load @@ -125,6 +128,10 @@ nginx_hosts: root: "/usr/share/php/pimpmylog" is_php: true + - server_name: "{{ vagrant_ip }}" + root: "/var/www/dashboard" + + nginx_remove_default_vhost: true # MySQL Databases and users. If build_makefile: is true, first database will diff --git a/provisioning/tasks/dashboard.yml b/provisioning/tasks/dashboard.yml index 142f198..bf52847 100644 --- a/provisioning/tasks/dashboard.yml +++ b/provisioning/tasks/dashboard.yml @@ -1,6 +1,11 @@ +- name: Ensure the dashboard directory exists + file: + path: /var/www/dashboard + state: directory + mode: 0755 + - name: Copy dashboard page into place. template: src: ../templates/dashboard.html.j2 - dest: /var/www/html/index.html - force: yes + dest: /var/www/dashboard/index.html mode: 0644Any other ideas? |
Let's do it. I have some long term ideas for config.yml... but I'm happy to keep it growing for now as long as little features like this are enabled by that growth! |
| Still requires a bit of testing I think. |
| The XHProf role has been updated, and 1.1.1 contains the new |
| Needs fixup if #408 gets merged. I'm ending up defining |
I'm planning on bumping the minor release (at least) for the next revision of Drupal VM. Sheesh, with all these little improvements adding up to something huge, it's worthy of 3.x imo :/ I'm okay with a breaking variable change—we have had a couple in the 2.x cycle already, let's keep adding a tiny bit of pain and then I'll try to re-stabilize once we get the rest of these sweeping architectural fixes in place. |
| I could also add a revertable commit that uses a temporary Edit: Just realized we have another breaking change already though: |
44e8c4f to f74f75c Compare | I'm having some very odd connection issues (I cant fetch the roles O.o) where I'm located at the moment so cant provision this locally. It still needs testing |
So the block |
| Yeah, macros are a little more widely supported in my experience (though I generally avoid using them if possible because templates start getting more logic-y—in this case it's definitely necessary). |
be8786c to 6c21e45 Compare | Yeah, Unfortunately I have no clue what's going on with my connection, so I cant test this locally until next week. @geerlingguy any requests or changes to get this merged? I guess the template is a bit complex but I feel it needs to be in this case. I cant really see anything that could be stripped away... To me everything looks useful. |
| Yeah, as long as the template is contained, I'm fine with it being a little complex. Rather that than add complexity to one of the other bits of the system! |
| file: | ||
| path: "{{ dashboard_install_dir }}" | ||
| state: directory | ||
| mode: 0755 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add (for backwards compatibility, and to give people a way to disable it if they want):
when: dashboard_install_dir is defined To both this task and the next? Or if it looks cleaner, inside provisioning/playbook.yml.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I would also need to add a check to the drush alias templates. That's no biggy though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the default filter does not work in the set assignment. O.o
39517f4 to b94197b Compare | @geerlingguy I force updated the last commit so it uses a variable file instead of that redefinition of Tested on ubuntu 14.04 and centos 7 with and without the |
[WIP] Issue #320: add a dashboard
| WIP no more... I'm loving this, and we can tweak things in a follow-up. Everything about this screams AWESOME! |
First take at a dashboard mentioned in #320. I'm not sure how we would want to add this to the webserver actually? At the moment it doesn't work 😄 It works if you set
apache_remove_default_vhost: falseheheAlso I've only tested minimally (only apache for example).
I used bootstrap so this wouldn't work if the user is offline. I feel that's still okay (the stylesheet is loaded at the end of the document not to pause the rendering), maybe add some minimal styling for such cases.
One minor hack is the
Adminerlink for each database. This links toadminer.drupalvm.dev/?username=root&db=drupal, which is actually an auto-login feature, but it fails due to not being configured. Instead it redirects the user back to login screen with an error message AND also pre-fills the fields.