If you prefer to use Vagrant to run Snipe-IT, you can use Laravel Homestead to manage your installation. Homestead is basically a Vagrant image that already has all of the server components Snipe-IT needs, with some additional tools layered over it.
There is a great Homestead primer here which will be useful in figuring out how Homestead works overall, but your overall steps will look like this:
vagrant box add laravel/homestead ==> box: Loading metadata for box 'laravel/homestead' box: URL: https://vagrantcloud.com/laravel/homestead ==> box: Adding box 'laravel/homestead' (v0.2.2) for provider: virtualbox box: Downloading: https://vagrantcloud.com/laravel/boxes/homestead/ versions/0.2.2/providers/virtualbox.box ==> box: Successfully added box 'laravel/homestead' (v0.2.2) for 'virtualbox'!
Then install the Homestead cli tools using Composer.
composer global require "laravel/homestead=~2.0" Changed current directory to /Users/wjgilmore/.composer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing symfony/process (v2.6.3) Downloading: 100% - Installing laravel/homestead (v2.0.8) Downloading: 100% Writing lock file Generating autoload files
You can do this anywhere on your system, it doesn't have to be in a special Snipe-IT directory.)
After this command has completed, make sure your
~/.composer/vendor/bin directory is available within your system PATH. This is because the laravel/homestead package includes a command-line utility (aptly named homestead) which you’ll use to create your Homestead configuration directory:
homestead init Creating Homestead.yaml file... ok Homestead.yaml file created at: /Users/agianotto/.homestead/Homestead.yaml
Next you'll want to edit your
Homestead.yml file to look something like this:
--- ip: "192.168.10.10" memory: 2048 cpus: 1 databases: - homestead authorize: /Users/agianotto/.ssh/id_rsa.pub keys: - /Users/agianotto/.ssh/id_rsa folders: - map: /Users/agianotto/projects to: /home/snipe-it sites: - map: snipe-it.app to: /home/vagrant/Code/snipe-it/public variables: - key: APP_ENV value: local
In your Homestead.yml file, you'll be mapping the directory on your local machine to the Homestead instance, since Homestead simply shares files from your local computer.
Make sure you use the absolute path to the directories you want to share with your Homestead instance.
To SSH into your Homestead instance, run:
ssh [email protected] -p 2222
(Remember you already associated your Homestead instance with your SSH key in your Homestead.yml file.)
Please see the Laravel Homestead configuration documentation for additional details on the Homestead confiuguration file.
Updated about a year ago