Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Development environment for Delphin - built with Vagrant and Puppet

License

Notifications You must be signed in to change notification settings

Automattic/delphin-bootstrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Delphin Bootstrap

Delphin Bootstrap is a portable development environment for Delphin. It allows you to install, configure, and start a virtual machine that is ready to run Delphin - with a single command. This sandbox makes it very easy to learn about, test, and hack Delphin without messing with the configuration of your computer. It uses some cool technologies such as Vagrant, Puppet, and VirtualBox under the hood.

Prerequisites

You need to have the following software already installed:

Note you should be able to use another virtual machine provider, but currently only VirtualBox is supported.

Make sure Vagrant is available from your terminal or console with:

$ vagrant version

Installed Version: 1.8.1
Latest Version: 1.8.1

Installing

Installing Delphin is very easy - just load a terminal or console and:

  1. Clone the Delphin Bootstrap repository to your computer
  2. Go to your fresh new Delphin Bootstrap directory
  3. Type vagrant up to bring the sandbox to life

On Linux, it will probably look like this:

$ git clone git@github.com:Automattic/delphin-bootstrap.git
$ cd delphin-bootstrap
$ vagrant up

On Windows, it's going to be very similar:

C:\>git clone git@github.com:Automattic/delphin-bootstrap.git
C:\>cd delphin-bootstrap
C:\delphin-bootstrap>vagrant up

Note this installation process can take quite some time the first time you perform a vagrant up since it will basically:

  1. Download an image of the current stable version of Ubuntu
  2. Load it into the virtual machine and update it
  3. Install all necessary packages such as Git or Node.js
  4. Download the Delphin repository

Finally, just add 127.0.0.1 delphin.localhost to your hosts file.

Running

You should have a virtual machine up and running by now. The next step is simply to connect to this sandbox via SSH with your favorite terminal or console, either by typing vagrant ssh, or using the following parameters:

  • Host name: 127.0.0.1
  • Port: 2222
  • User name: vagrant
  • User password: vagrant

These parameters should be pretty standard. However, if you encounter any issues connecting to the virtual machine, you can check them with the vagrant ssh-config command.

Note your SSH client should be configured to allow SSH agent forwarding if you want to be able to use your local SSH keys to connect to GitHub from inside the virtual machine (using agents such as ssh-agent or Pageant).

You should then be presented with something similar to the following:

       _      _       _     _
    __| | ___| |_ __ | |__ (_)_ __
   / _` |/ _ \ | '_ \| '_ \| | '_ \
  | (_| |  __/ | |_) | | | | | | | |
   \__,_|\___|_| .__/|_| |_|_|_| |_|
               |_|

vagrant@delphin:~$

Now simply head to the Delphin directory:

vagrant@delphin:~$ cd /var/sources

The first step is to build Delphin, which can be a lengthy process the first time because that will download all dependencies:

vagrant@delphin:/var/sources$ yarn install

Then the only step left is just starting the application with:

vagrant@delphin:/var/sources$ yarn start

Hopefully at some point you'll see:

Server listening on http://delphin.localhost:1337
Backend listening on http://localhost:1338

You should now be able to access Delphin in your browser at http://delphin.localhost:1337!

Hacking

The Delphin repository is located in /var/sources on the sandbox. This isn't a shared folder (i.e. a directory that is shared between the virtual machine - the guest system - and your own computer - the host system). This was done for performance reason as well as to work around a number of limitations (most of them originating from running Windows as host system).

With Delphin Bootstrap you can either work from the virtual machine itself or from your computer. In the former case, you would edit files in the /var/sources folder directly. In the latter, you would have to clone the Delphin repository to your computer and edit files there using your favorite editing tools. You would then have to sync this repository with the one on the sandbox in /var/sources using a tool such as rsync or unison. In both cases, Delphin will pick up the changes, potentially rebuild some files, and apply them to the page in your browser.

Relaxing

You can shutdown the virtual machine with vagrant halt and start it again with vagrant up. You can also pause it with vagrant suspend and unpause it with vagrant resume.

Good job, you deserve a cup of coffee now!

Troubleshooting

If you encounter any issues, check the Delphin readme file. If you're still stuck, feel free to open an issue.

License

Delphin Bootstrap is licensed under GNU General Public License v2 (or later).

About

Development environment for Delphin - built with Vagrant and Puppet

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published