Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolchain: Issues following a dev environment setup #221

Closed
mkalam-alami opened this issue Oct 9, 2016 · 14 comments
Closed

Toolchain: Issues following a dev environment setup #221

mkalam-alami opened this issue Oct 9, 2016 · 14 comments
Labels
bug Unintended behavior to be closed Resolved or outstanding issues that are obsolete or no longer necessary toolchain and development Related to Dairybox or the tooling used for development

Comments

@mkalam-alami
Copy link
Contributor

Hi,

I've seen the big "BROKEN" warning in the readme but you may be interested in this list of little tweaks I had to do to get things to run (after setting things up as documented):

Outside the VM

  • cd www/src/tools && chmod 777 *
  • (if the VM was up) vagrant halt && vagrant up

Inside the VM

sudo npm install -g svgo less clean-css buble rollup uglifyjs
cd /var/www
npm install
sudo chmod 777 src/tools/*
make
sudo service apache2 restart # I also renamed the Apache configs to remove an extra ^M, not sure if it was needed 

I didn't look into it too much but the all.min.svg files didn't appear in my - folder, though the svgo commands seemed to run without errors. So unfortunately I couldn't enjoy the new LD logo in its full SVG glory :P

@mikekasprzak
Copy link
Member

mikekasprzak commented Nov 2, 2016

Ah yes, I have been saying it's broken, but it's not actually broken, just not documented.

Using the ~/vvv folder should have proper permissions.

When the VM is running, you should be able to use http://ludumdare.org to access your webserver (it's mapped to 192.168.48.48). It will only work on your local machine though. To test locally on remote or mobile devices, you need a router that lets you change its hosts file. Accessing the site via IP addresses and ports probably wont be supported anymore, due to the way cookies across domains are handled.

There's a few tools that needed newer versions from 3rd party repos, I just can't remember which ones. SVGO might have been completely broken (that seems to ring a bell). Either that, or it needed an actual current version of NPM and Node (not what ships in the Ubuntu repos). That said, I might just be remembering the hell that was trying to get Grub to support multiple build targets, hence why it's now a Makefile.

On my setup, I have them installed outside the VM, and do my builds there. There was a reason for that, but I can't remember what (Grub again maybe). I run Ubuntu 16.04.

@mikekasprzak mikekasprzak added the bug Unintended behavior label Dec 4, 2016
@mikekasprzak mikekasprzak changed the title Issues following a dev environment setup Toolchain: Issues following a dev environment setup Dec 4, 2016
@mikekasprzak mikekasprzak added the toolchain and development Related to Dairybox or the tooling used for development label Dec 4, 2016
@mikekasprzak
Copy link
Member

mikekasprzak commented Dec 4, 2016

Some notes on installing the toolchain from outside the VM. These steps are untested inside the VM (i.e. vagrant ssh), but may work.

  • Install Dairybox, and follow the instructions there for setting up your repo
  • Make sure you're running a current version of NODE JS.
    • sudo apt-get install nodejs
    • node -v to check version
    • (optional) To upgrade to a newer version (the VM ships with 5.x).
sudo apt-get remove nodejs
sudo apt-get autoremove
rm -fr ~/.npm/
rm -fr www/node_modules/

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
  • Make sure the latest PHP is installed (OUTSIDE ONLY! VM has PHP)
    • sudo add-apt-repository -y ppa:ondrej/php (better than the version in the Ubuntu Repos)
    • sudo apt update
    • sudo apt-get install php
  • From www (or ~/vvv if inside the VM)
    • npm install (this installs several dependencies)
    • npm install -g svgo less clean-css buble rollup uglify-js
  • You should now be able to make from www (or ~/vvv if inside the VM)
    • make
    • make clean to nuke everything and fully rebuild
  • Finally, the last step must be done to create the database (and any time the tables change)
vagrant ssh
cd vvv/src/shrub/tools
sudo ./table_create

EDIT: Actually not finally. Don't forget to upgrade MySQL to MariaDB, or any features that rely on IP addresses wont work (Love). See #301

@mikekasprzak
Copy link
Member

mikekasprzak commented Dec 4, 2016

Alright, the above added instructions should work for anyone attempting to install the toolchain. My bad, but it looks like I forgot to push an update to the DairyBox repo way back in August. It was in my repo, but not mainline Ludum Dare's.

If you decide to upgrade your NodeJS via NodeSource, you'll need to use sudo any time -g is used.

Node dependencies can be upgrade as follows.

npm upgrade
npm upgrade -g

@mikekasprzak
Copy link
Member

mikekasprzak commented Dec 5, 2016

Getting PHP7 running in the VM isn't necessarily straightforward.

scotch-io/scotch-box#157 (comment)

That said, I did try following my instructions above but with sudo apt-get upgrade php --fix-missing instead of install, and it did install with a bunch of errors. I haven't tested it it that well though. It probably breaks APCu.

@mikekasprzak
Copy link
Member

mikekasprzak commented Dec 5, 2016

A "stock" install of Starship has no content, no users, nothing.

  • Run the ./start_mailcatcher.sh script from inside the VM, and you should be able to sign up for accounts (and not bother anybody on the REAL internet).
  • You can inject data using PHPMyAdmin. You'll have to download it separately (not integrated yet). Place it in DairyBox's /dev/ folder (I suggest naming it `/dev/phpmyadmin/).

@mikekasprzak
Copy link
Member

mikekasprzak commented Dec 13, 2016

Alright! This should finally be fixed.

  • All required apps are now installed inside the VM, so can always build from inside the VM (it's just slower)
  • ~/www inside the VM is now what you'd expect it to be, and have correct permissions
  • Updated README.md with instructions

Windows setup instructions still need to be added, but that's a different issue.

@mikekasprzak mikekasprzak added the to be closed Resolved or outstanding issues that are obsolete or no longer necessary label Dec 13, 2016
@Jezzamonn
Copy link
Contributor

In the README, the URL for PHPMyAdmin is missing the 'dev' part, it's currently http://192.168.48.48/phpmyadmin/, and should be http://192.168.48.48/dev/phpmyadmin/

@mikekasprzak
Copy link
Member

Ah shoot. I think I did merge in a fix that corrected this, but I might have messed it up.

@mikekasprzak
Copy link
Member

Okay this is fixed. I see why it wasn't fixed.

@Jezzamonn
Copy link
Contributor

I still get a 404 not found at http://192.168.48.48/phpmyadmin/, after updating and running vagrant up again

@mikekasprzak
Copy link
Member

It was moved to /dev/

@mikekasprzak
Copy link
Member

You might have to run vagrant destroy and vagrant up again

@Jezzamonn
Copy link
Contributor

Ok, my bad. I was looking at the documentation in my own fork and wondering why the url hadn't been updated 😅 I can access it at http://192.168.48.48/dev/phpmyadmin/

@mikekasprzak
Copy link
Member

Proudly, I'm going to close this. There are new issues of course (toolchain should generate some sample content), but that is a separate issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unintended behavior to be closed Resolved or outstanding issues that are obsolete or no longer necessary toolchain and development Related to Dairybox or the tooling used for development
Projects
None yet
Development

No branches or pull requests

3 participants