davmillar / DavesMapper

The juicy bits behind Dave's Mapper
22 stars 13 forks source link

Improve vagrantfile and provision script. #41

Open davmillar opened 8 years ago

devdrops commented 8 years ago

Hi @davmillar! Could you please provide more details on the subject? Like what exactly is required for the environment, like:

davmillar commented 8 years ago

Hey @devdrops! To be totally honest, I've only really learned about devops enough to stumble my way through this in the last year or two.

I forgot I had previously made a working Vagrantfile and provisioning bash script, but last night I discovered the provisioning script wasn't quite working like it used to, or there may've been manual steps I never remembered to document or automate. There is a copy of it in the repo here. The main needs were something *nix-y, PHP 5.something, MySQL, and Apache.

Any help making it more stable would be much appreciated! And if there's any other info you need about the hosting I use, let me know.

devdrops commented 8 years ago

@davmillar awesome! Let me get deeper on everything you have here and I'll provide an approach for this issue ;)

beporter commented 3 years ago

I'd like to take on some improvements here. A couple Q's:

davmillar commented 3 years ago

I think an iterative approach with vagrant would be fine, and I can work on getting a more bare bones SQL schema for you.

I’m running the production app on a shared hosting plan through HostGator and will see what PHP versions are supported. I’m open to upgrading to 8+ if available. I’m also open to any other bootstrap modification suggestions you have, but may need to have additional chats to provide you necessary details or for me to ask questions and better understand proposed suggestions.

Thanks!

Dave

On Sat, Oct 23, 2021 at 12:48 PM Brian Porter @.***> wrote:

I'd like to take on some improvements here. A couple Q's:

  • Is PHP v5.x still the target? If the source code is compatible, I'd gently (but strongly) recommend trying for v8+.
  • Vagrant setups can get pretty advanced/flexible... if it's okay with you @davmillar https://github.com/davmillar maybe an iterative approach is best? Multiple small, useful improvements till we reach a point of diminishing returns?
  • The bootstrap example you have seems like a perfectly reasonable starting point to me (if maybe a wee bit out of date for 2021). I'm a fan of letting automation take you as far as it can, so I'd like to propose converting it from an example to "official" so that it will work with Vagrant out of the box. (For example: If we're setting up a mysql server inside vagrant, why not provision the app's cgi-bin/db.php to default to a vagrant-compatible config that is properly isolated to the developer's local computer?) Objections?
  • Can you please provide an .sql file that contains only the schema (no data) needed for the application? Part of the provisioning process should be to load this schema and any appropriate development data. I can't find anything like this in the codebase though.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davmillar/DavesMapper/issues/41#issuecomment-950188104, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEM3PST6BSK7O7RE6WWVZ3UILYOFANCNFSM4CTISMPQ .

-- David Millar Puzzle Author & Software Engineer https://davegoesthedistance.com +1-616-819-9218

beporter commented 3 years ago

Gotcha. Shared hosting should take care of most of the necessary environment, but I'll try to structure the bootstrap file so it could potentially be reusable between vagrant and a cloud server instance (EC2) or a VPS like linode.

I also meant to include this yesterday, but the mysql schema command should end up looking something like this, btw (replace the variables as appropriate):

mysqldump -h $SERVER -u$USER -p$PASS --no-data $DBNAME > schema_only.sql
beporter commented 3 years ago

Oh and I noticed that the apache virtual host config mentioned in the .vagrant/bootstrap.sh.example doesn't seem to exist in the repo either. I'm going to write a basic one, but if there are any customizations in there, those will need a second pass.

davmillar commented 2 years ago

Reviewing the PR branch now.

Regarding PHP, the current version the production site uses is 7.3 and it appears 7.4 is the highest version currently supported from my shared hosting plan.

I want to say the apache virtual host config in the bootstrap example was already in existence in the machine originally so I just edited or appended to it as necessary, but that may have changed since the older versions of the packages have been updated.