Ignite is a high-level utility tool to fire up local environments easily based on a configuration file. This is as simple as setting up your Ignitefile (ignite init and modify it accordingly), then ignite up!.
This works thanks to Vagrant and VirtualBox or VMWare. This means you will need to install these dependencies first before trying to run Ignite.
This is still in early stages, it is fully functional but more features like packages and site types are still being worked on. In the meanwhile, you're free to submit pull requests with more Ansible packages support and site types default configuration.
npm install -g @ignitionwolf/ignite
$ ignite init
initializing Ignitefile... initialized
$ ignite up
booting the machine... booted
$ ignite ssh
...
It's as simple as running ignite init, however, you can see a detailed template below:
## Local development machine information
meta:
name: 'Default Ignite Box'
box: 'centos/7'
ip: 192.168.10.33
## Sites that will be automatically configured by
sites:
- hostname: custom.local ## You'll have to configure this in your hosts file
path: /path/to/project/files ## This will be ported to the development machine
public_folder: './public' ## Relative path in the project to the public directory
- hostname: laravel.local
git: https://github.com/user/laravel-local.git
type: laravel
## Must be any supported dependency by Ignite.
dependencies:
- name: php
version: 7.4
extensions:
- gd
- name: composer
- name: apache
- name: nodejs
## Runs before the dependencies are installed.
pre_tasks:
- path: '/var/www/git-example'
cmd: 'composer install'
## Runs after the dependencies are installed.
tasks:
- path: '/var/www/git-example'
cmd: 'composer install'
## Utilities/programs to install.
utilities:
- htop
ignite destroyignite downignite help [COMMAND]ignite init [NAME]ignite sshignite ssh-configignite statusignite suspendignite up
Turn off an environment machine
USAGE
$ ignite destroy
OPTIONS
-f, --force proceed forcefully
-p, --path=path target path (optional)
-v, --verbose verbose output
DESCRIPTION
This will put the environment machine offline.
See code: src/commands/destroy.ts
Turn off an environment's machine
USAGE
$ ignite down
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
This will put the environment's machine offline.
See code: src/commands/down.ts
display help for ignite
USAGE
$ ignite help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Initialize a Ignitefile configuration file
USAGE
$ ignite init [NAME]
OPTIONS
-p, --path=path Target path (optional)
DESCRIPTION
Modify this file to instruct Ignite on how to setup your desired environment.
See code: src/commands/init.ts
SSH in the provisioned machine
USAGE
$ ignite ssh
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
This will not load keys
See code: src/commands/ssh.ts
Get the SSH config to access the machine
USAGE
$ ignite ssh-config
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
You can use this to configure your IDE remote connection.
See code: src/commands/ssh-config.ts
Get the status of the environment machine.
USAGE
$ ignite status
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
This will tell you if the machine is running, offline, or suspended.
See code: src/commands/status.ts
Turn off an environment machine
USAGE
$ ignite suspend
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
This will put the environment machine offline.
See code: src/commands/suspend.ts
Ignite an environment based on Ignitefile
USAGE
$ ignite up
OPTIONS
-p, --path=path Target path (optional)
-v, --verbose verbose output
DESCRIPTION
This might take some time while the configuration is processed and the machine is ignited.
See code: src/commands/up.ts
A "dependency" is a configuration class that links the required dependency to an Ansible role. You can't directly install an Ansible role, it has to be supported by Ignite first. If you don't see a package listed here that you need, please write an issue or a pull request with the respective Ansible role. It's important to note that it must work in different linux distributions.
Supported Packages
- Apache Web Server
apache - PHP
php - Composer
composer - NodeJS
nodejs - Redis
redis
dependencies:
- name: php
version: 7.4
extensions:
- gd
- name: composer
- name: apache
- name: nodejs
You can load a site project files from a local path in your machine or from a git repository.
sites:
- hostname: example.local
public_folder: ./public
git: https://github.com/user/repo.git
- hostname: laravel.local
type: laravel
path: /path/to/my/site/files
You will need to add these hostnames to your hosts file with the machine IP found at the metadata section of the Ignitefile.
A "site type" is a set of necessary configuration/tasks that needs to be executed in order to prepare for a specific website structure. For example, this sets up the virtual hosts in the correct directory and assigns directory permissions.
Supported Site Types
- Laravel
You can run shell commands to do any extra provisioning work you may need in order to get your site working.
## Runs before installing dependencies
pre_tasks:
path: /where/to/run/the/cmd
inline: ls -l
## Runs after installing dependencies
tasks:
path: /where/to/run/the/cmd
inline: ls -l
You can install any extra software by adding it to this list.
utilities:
- htop
- curl
- Ansible Community
- Vagrant Community
- Jeff Geerling - awesome Ansible roles