Code Monkey home page Code Monkey logo

dreambox's Introduction

DreamBox

Recreates the DreamHost shared hosting environment as a Vagrant box.

This project repo contains the code for building the Dreambox base box. To use Dreambox in your project, check out the "Getting Started" section of the Wiki.

Package Versions

Ubuntu 14.04 LTS

Package Version
ndn-php56 5.6.36
ndn-php70 7.0.30
ndn-php71 7.1.19
ndn-apache22 2.2.31-5
mysql-server-5.6 5.6.33

The following are installed, but may require additional configuration and/or packages (Contributions are welcome and appreciated):

  • Perl
  • PostgreSQL
  • Python
  • Ruby
  • SQLite

See the Wiki for additional documentation.

References

CHANGELOG

0.3.0

  • ADDED: Uses Dreamhost NDN repositories (#36)
    • Prefixed with ndn- in dpkg -l
  • ADDED: Create multiple vhosts during vagrant up (#5)
  • ADDED: Choose between multiple PHP versions
  • ADDED: Run more than one version of PHP
  • ADDED: Installs phpMyAdmin (#6)
  • ADDED: Certificate Authority (no more self-signed certificates) (#54)
  • ADDED: Subdomain support
  • ADDED: Support for host aliases
  • ADDED: The ability to create a database during provisioning
  • ADDED: dream.box admin page and links
  • CHANGED: Moves configuration to external YAML file
  • CHANGED: Updates Ubuntu to 14.04.5
  • CHANGED: Updates MySQL to 5.6.33
  • CHANGED: Updates PHP to versions 5.6.33, 7.0.27, and 7.1.13
  • CHANGED: Build scripts improved for a more streamlined VM.
  • FIXED: Corrects user home directory permissions.
  • FIXED: Uses subjectAltName for all hosts
  • REMOVED: Configuration via a hash of settings values

0.2.5

  • ADDED: A message about testing Dreambox 0.3.0-beta-1

0.2.4

  • FIXED: SSL no longer automatically enabled (#37)

0.2.3

  • ADDED: Git
  • ADDED: Ruby 1.8
  • ADDED: Public folder setting
  • ADDED: Passwordless sudo for all users
  • ADDED: Log in with provisioned user
  • CHANGED: Reverts useradd removal
  • FIXED: Invalid MySQL socket path
  • FIXED: Sets correct sync folder permissions

Thanks to @jbtule and @meowsus.

0.2.2

  • ADDED: Initial SSL support (#1)
  • CHANGED: Updates MySQL to use readline
  • CHANGED: Updates PHP to 5.6.29
  • CHANGED: Updates Apache to 2.2.31
  • CHANGED: Sets test as primary development VM and prevents dev autostart
  • CHANGED: Updates motd with Wiki links
  • REMOVED: Removes userdel from user_setup

0.2.1

  • CHANGED: Moves documentation to the Wiki
  • FIXED: Adds missing Vagrantfile template

0.2.0

BREAKING CHANGES on 0.2.x: See 0.2.x Archived Notes

  • ADDED: Example Vagrantfile
  • ADDED: Packaged Vagrantfile to simplify the setup process
  • CHANGED: The main sync folder for the web root is now created automatically (#7)
  • CHANGED: user_setup is now automatically run during vagrant up
  • FIXED: Fixed MySQL autostart (#9)
  • FIXED: Build error when dropbox_pre isn't found
  • REMOVED: Removes ModSecurity (#10)
  • REMOVED: user_setup no longer creates a user

Thanks to @NReilingh.

0.1.1

  • ADDED: Dreambox Message of the Day (motd)
  • ADDED: Compiled package files
  • CHANGED: Cleaned up documentation (more to come...)
  • CHANGED: Disabled Sendfile mitchellh/vagrant#351 (comment)
  • CHANGED: Restructured source files and development workflow
  • CHANGED: Enabled and loaded shared Apache modules
  • FIXED: An issue preventing sites from displaying when accessed via IP address (#4)
  • FIXED: Broken MySQL build script
  • FIXED: PROJECT_ROOT variable used by user_setup
  • FIXED: Broken package source URLs (#3)

0.1.0

Initial release

dreambox's People

Contributors

goodguyry avatar jbtule avatar nreilingh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dreambox's Issues

Issue installing phpMyAdmin

We use mysql successfully on our dreambox VM. I successfully set up remote phpmyadmin to access databases on this VM but cannot get phpmyadmin installed in the VM for folks unable to configure their phpmyadmin to talk to the VM.

Steps taken:

ssh to the running VM

sudo apt-get update
sudo apt-get dist-upgrade

apparently succeed
sudo apt-get install phpmyadmin fails in the canned install process, trying to connect to mysql.

Is there something special about installing phpmyadmin on dreambox?

Archive `master` branch

When v0.3.0 is ready for release, the master branch will be archived and a new master will be created from the 0.3.0-base branch.

  • Archive the master branch as v0.2.5-archive
  • Cut a new master branch from 0.3.0-base
  • Delete the develop branch
  • Cut a next branch from the new master branch

Set web root as sync folder

Rather than relying on a flaky symlink, set Vagrant to sync the project web root and the vm web root during vagrant up.

config.vm.synced_folder [project_dir], [site_root]

This will likely require adjustments to files/user_setup

Enable SSL support

Make it easier to enable SSL, especially since everything gets wiped on vagrant destroy.

  • Create a self-signed certificate
  • Listen on port 443
  • Documentation

Install and configure phpMyAdmin

Another low priority enhancement suggestion:

Many people will be able to do what they need to do over the command line, but phpMyAdmin is part of the Dreamhost environment (4.6.0 is the current version).

Possibly related to #5, since the user would need to access the phpMyAdmin application, and doing this through a hostname (phpmyadmin.dreambox.dev?) would be a simple solution.

Use MySQL 5.6

If I'm not mistaken, Dreamhost has updated to MySQL 5.6 as of June 2017.

I noticed the difference in versions when trying to load a UTF8mb4 collated database into my Dreambox and got an error.

Allow for multiple "domains" to be configured for the user.

The way this box works right now, you can configure one user to be created, and one vhost to be created for the user. This maps well onto how most projects will exist on dreamhost in the wild, but some projects may span multiple domains. That is, a single site might use a few subdomains for different components, or someone could want to set up a development/staging/deployment environment with three different vhosts and DocumentRoots in the same user directory.

From a configuration standpoint, it would be great to see a way of defining a short list of vhosts for the user being provisioned, where each has a definable DocumentRoot, local project directory, and hostname.

(I would consider this to be a low-priority feature suggestion.)

Accessing vhost from host only works with port forwarding

I've been testing different networking configurations for vagrant so that I can access the guest server from a browser on the host machine. So far, the only thing I've gotten to work is if I use config.vm.network :forwarded_port, guest: 80, host: 4321, and then access http://localhost:4321 in a browser.

If I try to access 127.0.0.1:4321 in a browser, I get a 403 forbidden error. If I use a private_network setup with a hostname instead of forwarded_port, I get the same 403 error when accessing by IP, but accessing by the set hostname gets me Apache's default host (files in /usr/local/apache2/htdocs).

Ideally I would like to use a local hostname like dreambox.dev so that the project I'm working on can pretend that it has a hostname, but I haven't been able to figure out how to change apache's vhost configuration so that the /home/user DocumentRoot is served in all instances. I think that would be best because we can't guess at which networking configuration people will try to use.

Allow opt-out of "enhanced web security"

I keep running into 403 errors caused by various mod_security rules. This may be indicative of a different issue, but whatever the case, the Dreamhost panel allows you to opt out of "enhanced web security" if you choose which would bypasses the issue in the first place.

I think there's an argument for just having it turned off by default if it's not easy to introduce a user setting in the Vagrantfile somehow, since generally development environments are "anything goes" (no root password, etc.). Of course I do see the value in replicating this aspect of the server configuration, but I don't believe the current set of rules works for an accurate representation of the dreamhost environment.

Aside: what I'm doing when running into these 403 errors is trying to use the Wordpress Duplicator plugin install script to restore a wordpress archive to the dreambox. I'm 99% sure I've done this successfully in Dreamhost with enhanced web security turned on, but when I tried in dreambox, I hit a mod_security rule, then I bypassed this rule in the vhost directive and hit a DIFFERENT rule, so eventually I just commented out the apache activated_rules/*.conf include line entirely and had no further problems.

Right now I just want to turn these off, but later I'll try to identify specific differences in rule trigger conditions, since I have a hunch that the weirdness of the vagrant environment is causing them to "misfire".

getting started directions no longer lead to working system

I'm following getting started but failing to end up with a usable system. Please advise what I'm doing wrong. I had previously been using dreambox 0.2.1 with no problems, but the new version doesn't seem to work.

This is an ubuntu box.

$ vagrant version
Installed Version: 1.9.7
Latest Version: 1.9.7
 
You're running an up-to-date version of Vagrant!
$ VBoxManage --version
5.1.26r117224
$ mkdir ~/dboxTest
$ cd ~/dboxTest
$ curl https://raw.githubusercontent.com/goodguyry/dreambox/master/Vagrantfile-example > Vagrantfile
$ mkdir web
$ vagrant up
[output, no errors displayed]

Browse to http://192.168.200.200/

All that is displayed is the Apache-default "It works!"

Adding index.php to the web subdirectory has no effect.

What am I missing?

Thanks!

mysql version doesn't match dreamhost's

Apparently the version of MySQL being used on DH shared servers is 5.6.34. Dreambox has 5.5.40.

On the dreambox:

mysql -u root -e "SELECT @@version";
+------------+
| @@version  |
+------------+
| 5.5.40-log |
+------------+

On Dreamhost server:

mysql -u myuser -p -h mysql.myserver.com -e "SELECT @@version;"
Enter password: 
+------------+
| @@version  |
+------------+
| 5.6.34-log |
+------------+

mysql doesn't autostart

This seems to be replicable from a simple vagrant init goodguyry/dreambox (v0.1.1) and vagrant up โ€” sudo service mysql.server status returns * MySQL is not running, but PID file exists, and running the mysql cli client errors since the socket doesn't exist.

Manually running sudo service mysql.server start gets it going, but then if you do a vagrant halt followed by vagrant up it will no longer be running.

No-MySQL-hostname-was-specified as MySQL Sock value?

I was curious about this line:

--with-mysql-sock=/No-MySQL-hostname-was-specified \

I was just installing a platform via it's Installation Wizard and /No-MySQL-hostname-was-specified popped up as the value of my MySQL server socket field in the advanced settings.

This value seems like it was a relic from an automatic compilation, but I might be mistaken.

Package Script `zip` path incorrect

The zip command in the package build scripts is pointing to the old path. Files were shifted prior to posting the project, but some paths were not updated.

SSL no longer works (0.2.4; goodguyry/dreambox.box)

Trying to use the 0.2.4 box (with the Vagrantfile-Example) and build were getting me a NET::ERR_CERT_COMMON_NAME_INVALID in Chrome 66, which I tracked down to actually be a subjectAltName issue.

From what I can tell, you've fixed this issue in 0.3.0, which I forked and managed to get running... for a little bit...

I'm writing this to you in hopes to encourage you to finish up the few things that are holding you back from releasing 0.3.0: I can't offer much, but could make a pull request to contribute the handful of things I found that help.

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.