Project

niso

0.0
No commit activity in last 3 years
No release in over 3 years
Fork of the sunzi project, Plugin based Server provisioning utility
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.8
~> 10.5

Runtime

~> 4.2
~> 3.0
~> 0.19
 Project Readme

nîso ᓃᓱ

Gem Version Build Status Code Climate Dependency Status

niso is the number 2 (two) in Cree

Quickstart

Example: https://github.com/dakotalightning/niso-example

Install:

$ [sudo] gem install niso

Go into your project directory (if it's a Rails project, config would be a good place to start with), then:

$ niso create

It generates a niso folder along with subdirectories and templates. Inside niso, there are niso.yml and install.sh. Those two are the most important files that you mainly work on.

Go into the niso directory, then run niso deploy:

$ cd niso
$ niso deploy example.com

Commands

$ niso                                           # Show command help
$ niso compile                                   # Compile niso project
$ niso create                                    # Create a new niso project
$ niso deploy [user@host:port] [role] [--sudo]   # Deploy niso project

$ niso setup                                     # Setup a new digital ocean droplet
$ niso teardown                                  # Teardown an existing digital ocean droplet

Directory structure

Here's the directory structure that niso create automatically generates:

niso/
  install.sh      # main script
  niso.yml        # add custom attributes and remote recipes here

  recipes/        # put commonly used scripts here, referred from install.sh
    niso.sh
  roles/          # when role is specified, scripts here will be concatenated
    db.sh         # to install.sh in the compile phase
    web.sh
  files/          # put any files to be transferred
  compiled/       # everything under this folder will be transferred to the
                # remote server (do not edit directly)

Dynamic values?

There are two ways to pass dynamic values to the script - ruby and bash.

Make sure eval_erb: true is set in niso.yml. In the compile phase, attributes defined in niso.yml are accessible from any files in the form of <%= @attributes.ruby_version %>.

Role-based configuration

You probably have different configurations between web servers and database servers.

No problem - how niso handles role-based configuration is refreshingly simple.

Shell scripts under the roles directory, such as web.sh or db.sh, are automatically recognized as a role. The role script will be appended to install.sh at deploy, so you should put common configurations in install.sh and role specific procedures in the role script.

For instance, when you set up a new web server, deploy with a role name:

niso deploy example.com web

It is equivalent to running install.sh, followed by web.sh.

Requirements

For niso deploy

$ [sudo] gem install droplet_kit
$ [sudo] gem install highline

DigitalOcean

You can setup a new VM, or teardown an existing VM interactively. Use niso setup and niso teardown for that.

DigitalOcean only.

v2.0 of the DigitalOcean API is supported — get your access token.

Changelong:

Please see the CHANGELOG.

Contributing

  1. Fork the project
  2. Make your changes, including tests that exercise the code
  3. Summarize your changes in CHANGELOG
  4. Make a pull request

Credits

  • This project is a hard fork of the proejct niso by kenn.