Skip to content

lucasfais/azk

 
 

Repository files navigation

azk

azk is a tool that assists web developers in the creation, maintenance and isolation of development environments through automation. You will be able to easily and quickly create isolated environments to many projects in almost any development stack. Automation happens by the use of simple scripts and images.

![Gitter](https://badges.gitter.im/Join Chat.svg) wercker status Code Climate

Main features

  • Multiplatform: Works on Linux & Mac OS X (requires 64 bit platform in both cases)
  • Images: via Docker Registry
  • Built in load-balancer
  • Built in file sync
  • Automatic start-up (and reload) script
  • Logging
  • And simple and easy to use DSL to describe its architecture:

Documentation

You can find our documentation online at: http://docs.azk.io/

If you'd like to contribute:

  1. Go to https://github.com/azukiapp/azk/tree/develop/docs
  2. Follow the instructions in the README
  3. You're awesome :)

Quick start

Installation

The azk installation is very simple. We also have Linux and Mac packages. For installation instructions and update, see the en or pt-br.

Basic Vocabulary

System of Systems

azk is based on the concept of System of Systems. Accordingly, applications (your code), services and workers (such as databases, webservers and queue systems) are treated as systems that communicate with each other and together make the primary system. Using this paradigm, azk installs and manages development environments. While this may seem overkill at first, it actually makes it a lot easier to manage the development and execution environments of an application (in its parts - the "systems" - or in its entirety - the full "system of systems").

Images

In order to automate the provisioning of development environments, azk uses pre-built custom images. These images follow the Docker standard and can be found in: Docker Index or Dockerfile.

Azkfile.js

Azkfile.js files are the cornerstone of how to use azk. These simple manifest files describe the systems that make your system of systems as well as the images used in their execution. They also describe parameters and execution options.

More information here.

Starting a new application project:

If you are starting a new application project, you can already use azk to obtain the proper runtime as well the corresponding generators for your chosen language and then generate the application's basic structure. An example in node.js would look like this:

$ cd ~/projects
$ azk shell --image dockerfile/node # obtaining the runtime
    # mkdir app-name
    # npm init                      # building the application's basic structure
    ...
    # exit
$ cd app-name
$ azk init
azk: `node` system was detected at 'app-name'
azk: 'Azkfile.js' generated

$ azk start

Taming an existing application project's development environment with azk:

When you already have an application project going on and want to use azk to streamline its development environment, all you have to do is as follows:

$ cd [my_application_folder]
$ azk init
azk: 'Azkfile.js' generated
...
$ azk start

Usage/Features

# Control azk agent
$ azk agent start                 # Starts azk agent in background
$ azk agent status                # Shows azk agent status
$ azk agent stop                  # Stops azk agent

# Generate initial Azkfile.js
$ azk init [project_path]

# Run a shell in instances context
$ azk shell                       # Runs shell in default system
$ azk shell -c "ls -l /"          # Runs specific command
$ azk shell -m ~/:/azk/user       # Running with aditional mounting

# Run a shell in arbitrary image
$ azk shell -i busybox            # Runs a shell in arbitrary imagem

# Run background systems (Azkfie.js#systems)
$ azk start                       # Starts all systems
$ azk start [system_name,...]     # Starts specific systems
$ azk stop                        # Stops specific service
$ azk status                      # Displays all systems statuses
$ azk stop [system_name,...]      # Stops specific systems by names
$ azk scale [system_name,...] 5   # Starts 5 instances of specific systems
$ azk restart [system_name,...]   # Restarts a systems
$ azk restart --reprovision       # Restarts a systems and reload provision

# View logs
$ azk logs                        # Shows last lines for all systems
$ azk logs [system_name, ...]     # Shows last lines of a specific system
$ azk logs -f                     # Shows last lines of log and follow for more

Contributions and testing (for experts only)

Clone azk from the source, and install dependencies:

$ git clone https://github.com/azukiapp/azk
$ cd azk
$ make
$ azk nvm grunt vm-download # MAC OS X only
$ azk agent start
$ azk nvm grunt test

Note that running these tests requires you to have azk agent running.

To run test with filters run use azk nvm grunt --grep "test name":

Example:

$ azk nvm grunt --grep "Azk generator"

License

"Azuki", "Azk" and the Azuki logo are copyright (c) 2013-2015 Azuki Serviços de Internet LTDA.

Azk source code is released under Apache 2 License.

Check LEGAL and LICENSE files for more information.

About

Automated installation and configuration of development environments

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 89.6%
  • Shell 9.4%
  • Makefile 1.0%