zaruba

command module
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

README

zaruba-logo

⚠️ Things might change pretty fast and pretty often before we reach v.1.0.0. Please open issue if you find any problem using Zaruba.

💀 Zaruba

Zaruba is a declarative Task Runner Framework. It helps you to define and orchestrate tasks in a fun way.

Zaruba allows you to declare configurable task that extends/depends on each other. You will find it better than writing a bunch of spaghetti shell scripts.

You will find several pre-defined tasks. Some of them are useful to speed up your development by providing scaffolding.

You can even build a full-fledge FastAPI application and have it deployed to your Kubernetes cluster by performing this (no coding required 😉):

# Init project
mkdir myProject
cd myProject
zaruba please initProject

# Create FastAPI app with functional book CRUD
zaruba please makeFastApiCrud \
    generatorFastApiServiceName=myService \
    generatorFastApiModuleName=myModule \
    generatorFastApiCrudEntity=book \
    generatorFastApiCrudFields='["title","author","synopsis"]'

# Run the service locally 
# To run this command, you need:
# - pyenv
zaruba please run
# Ctrl+c to stop

# Run the service as docker container
# To run this command, you need:
# - docker
zaruba please runContainer
zaruba please stopContainer

# Deploy the service to the kubernetes cluster
# To run this command, you need:
# - kubectl
# - helm
# - cloud provider or a computer that can run kubernetes locally
zaruba please helmInstall kubeContext=docker-desktop

💡 TIPS: Execute tasks with -i or --interactive flag is probably a good idea if you don't want to memorize the parameters. Otherwise, you can also type zaruba please to select available tasks.

👨‍💻 Installation

Using docker

Using docker is probably the quickest way to set up Zaruba, especially if you need to use Zaruba in your CI/CD.

For more information about Zaruba's docker image, please visit dockerhub.

⚠️NOTE There will be some limitations if you run Zaruba container using docker-desktop for mac/windows. For example, docker-desktop doesn't support host networking, so that you need to expose the ports manually (e.g: docker run -d --name zaruba -p 8200-8300:8200-8300 -v "$(pwd):/project" stalchmst/zaruba:latest)

From source

Installing from source is the best way to setup Zaruba for day-to-day use. Currently we don't have any plan to create apt or platform-specific packages for Zaruba. If you are using windows, you need to install wsl in order to get started.

In order to install Zaruba from source, you need to have some prerequisites software:

  • go 1.13 or newer (To install go quickly you can visit it's official website)
  • wget or curl
  • git

💡HINT Ubuntu user (including ubuntu-wsl) can simply invoke sudo apt-get install golang wget curl git to install all prerequisites.

After having the prerequisites installed you can then install Zaruba by using curl or wget:

# Install zaruba by using curl
sh -c "$(curl -fsSL https://raw.githubusercontent.com/state-alchemists/zaruba/master/install.sh)"

# Install zaruba by using wget
sh -c "$(wget -O- https://raw.githubusercontent.com/state-alchemists/zaruba/master/install.sh)"

📜 Getting Started

Before getting started, it is recommended to have docker, kubectl, helm, pyenv, pipenv, and nvm installed. To install those prerequisites, please visit their websites:

  • docker is needed to build, pull or push image. You also need docker to run your services as container.
  • kubectl is needed to access your kubernetes cluster.
  • helm is needed to deploy your services.
  • pyenv and pipenv is needed to run python services locally.
  • nvm is needed to run nodejs services locally.

You should also able to install those third party packages by running zaruba's third party installer:

"${HOME}/.zaruba/setup/init.sh

Now let's get started by creating a project

🗺️ Roadmap

Doing

  • Technical Documentation
  • Third party script (i.e: Install script from github repository)

To do

  • UI (i.e: web server)
  • NLP (i.e: running tasks by using natural language)
  • OSX Setup

🐞 Bug, Feature Request and Contribution

Open issue or pull request.

🎉 Fun Fact

Madou Ring Zaruba (魔導輪ザルバ, Madōrin Zaruba?) is the Madou Ring for Golden Knight Garo's duties as a Makai Knight. He is a recurring character in the series, acting as a guide for the wearers of the Garo armor and being the narrator of the series in some episodes. (Garo Wiki | Fandom)

Documentation

Overview

Copyright © 2020 Go Frendi Gunawan <gofrendiasgard@gmail.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL