Reproducible Deployment Management, Dependency and Configuration Management System
Ignite is a deployment and dependency management system designed to be reproducible universally.
- Simple, easy-to-use command line interface
- One-command installation
- Easily share projects
- Manage dependencies and configuration
- Automatic dockerfile creation
- Easily create your own cloud provider files to deploy to virtually any cloud provider
To run Ignite you will need NodeJS installed on your local machine. You can find out how to install NodeJS here
Once NodeJS and NPM are installed, run:
npm install ignitejs -g
Let's create a simple project with ignite, first make a new directory for the project and change into that directory:
mkdir hello_world_project && cd hello_world_project/
Now, let's run ignite init
and fill out some basic information...
ignite init
You'll be asked to fill out a few simple questions, here's the questions and sample answers:
? What's your name? Michael
? What is the project's name? ignite_helloworld_example
? What's the version number? 0.0.1
? What's the project about? This is a sample project for Ignite to get using Ignite
? Package dependencies? Seperated by commas (,). Ex: chalk,express chalk,express,ora
? Git Repository Link https://github.com/ignitejs/helloworld_example
? What file will be the start file? Ex. index.js index.js
? Use Docker? (y/n) n
? Create Dockerfile? (y/n) n
Once completed, you will get a response like this:
✔ Created configuration file.
✔ Saved configuration file
If you're interested to see how it's compiled, check the .ignite-config.js
file, it should look something liket his:
/** ------ Generated by Ignite ------ */
/**
* @name ignite_helloworld_example
* @version 0.0.1
* @author Michael
* @description This is a sample project for Ignite to get using Ignite
*/
module.exports = {
name: "ignite_helloworld_example",
version: "0.0.1",
author: "Michael",
description: "This is a sample project for Ignite to get using Ignite",
dependencies: ["chalk","express","ora"],
git: "https://github.com/ignitejs/helloworld_example",
scripts: {
"test": "exit 0",
"start": "node index.js"
},
config: {
use_docker: false,
create_dockerfile: false,
dockerfile: false
}
}
Now, if we want to install this, just run:
ignite install
You should see output similar to this:
Ignite: Installing project dependencies for you now!
✔ Wrote package.json file
✔ Installed dependencies successfully.
Installed chalk successfully
Installed ora successfully
Installed express successfully
Now, if you list the contents in the directory you'll see everything is installed.
Now that we've made a configuration file, we can create all the code we need, and then run ignite share
You'll get output similar to:
Ignite: Let's generate a share file and readme to distribute
✔ Created tar stream, and saved as 'ignite-bundle.tar'
Now you can distribute your friends the ignite-bundle.tar and they just need to run: npm install ignitejs && ignite install to get everything started
Now, all your important files, including the ignite configuration file are bundled up, you can put this anywhere you want, and extract it, then run ignite install
again.
Want to deploy to a different cloud provider, but don't have a provider file? You can create one by running ignite create-provider
- you will be prompted for a few simple questions, much like the ignite init command. Here's the questions with sample answers:
? What's your name? Michael
? What is the provider's name? my-example-provider
? What's the version number? 0.0.1
? What's this provider file do? You can now deploy to my example provider!
? Package dependencies? Seperated by commas (,). Ex: chalk,express chalk,ora
? Git Repository Link https://github.com/ignitejscl/ignite-provider-example
? What file will be the main file? Ex. index.js index.js
You should now see the following output:
✔ Created configuration file.
✔ Saved configuration file
✔ Generated file successfully.
If you're curious to how the ignite-provider-config looks like, it should match something similar to this:
/** ------ Generated by Ignite ------ */
/**
* @name my-example-provider
* @version 0.0.1
* @author Michael
* @description You can now deploy to my example provider!
*/
module.exports = {
name: "my-example-provider",
version: "0.0.1",
author: "Michael",
description: "You can now deploy to my example provider!",
git: "https://github.com/ignitejscl/ignite-provider-example",
start: "index.js",
dependencies: ["chalk","ora"]
}
Now, we can open up the index.js file and in our exports.run
we will write our code to deploy, a simple example is provided, this file looks like so:
/** ----- Generated by Ignite ----- */
const { spawn } = require('child_process');
exports.run = () => {
let sampleCommand = spawn('whoami')
sampleCommand.on('exit', (code, signal) => {
if(code === 0) {
console.log('Successfully ran whoami');
}
else {
console.error('Failed to run whoami');
}
})
}
If we want to share this provider, we can use the same ignite share
command, and it will bundle everything up.
If you want to install a provider, this can be done relatively simple, navigation to your home directory, and open the .ignite folder, make a providers folder if none exists, and put the provider code in there. Change into this directory (ex, /Users/michael/.ignite/providers/my_example_provider) and run: ignite install-provider
If you've installed the provider, you can now deploy using that provider with:
ignite deploy --provider {provider_name}
Ignite will automatically load the provider and execute the run
method.
- Creating an ignite server to host shared files securely (with authentication)
- Sunday, December 10th, 2017 - Updated Release (see changelog for more information)
- Saturday, December 9th, 2017 - Initial Release