@ignitial/iio-cli
Ignitial.io (IIO) application & services project generator
Last updated 6 months ago by ignitial .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @ignitial/iio-cli 
SYNC missed versions from official npm registry.

Ignitial.io apps and services bootstrap and Kubernets/Swarm deploy

Deploy micro-services based cluster with web application front-end in minutes and 3 lines of shell commands:

asciicast

WARNING: use iio app create <name> instead of iio create app <name> which is deprecated and will be removed in the future

Install

npm install -g @ignitial/iio-cli

Test

export IIOS_CLI_CFG_PATH=test

node src/index.js templates

Usage

See tool's help:

iio

Create a new Ignitial.io app from scratch

iio app create myUberApp
...

Deploy existing app to a Kubernetes cluster

Your myUberApp application, bootstrapped with iio, has a Kubernetes deploy configuration file that you can find in the myUberApp/k8s/deploy folder.

# IIOS deploy configuration file apiVersion
apiVersion: 1
# registries to use for image pull (referenced in the app config section)
registries:
  # reference name (use JSON path to query info)
  GitLab:
    # name of the registry domain (think docker login <domain>)
    domain: registry.gitlab.com/
    # configuration data for credentials: here uses a file content
    configData: "{{filedata(~/.docker/config.json)}}"
  # use no registry when local or Docker Hub images
  Local:
    domain: ""
# IIOS app and services section
iios:
  # app section
  app:
    # app image version; here gets from app's package.json file
    version: "{{packageJSON.version}}"
    # use private registry if necessary (prod deploy)
    # registry: "{{$.registries.GitLab}}"
    # this config example uses no registry, so either Docker Hup or local images
    # (ex: deployment made with minikube)
    registry: "{{$.registries.Local}}"
    # app image pull policy
    imagePullPolicy: IfNotPresent
    # app number of replicas
    replicas: 1
  # services section
  services:
    # mandatory dlake service
    dlake:
      # service image version
      version: 3.1.0
      # service number of replicas
      replicas: 1
      # ports configuration for the service deployment
      ports:
        - containerPort: 20194
          name: dt-service
        - containerPort: 20195
          name: dt1
        - containerPort: 20196
          name: dt2
        - containerPort: 20197
          name: dt3
        - containerPort: 20198
          name: dt4
        - containerPort: 20199
          name: dt5
    # mandatory auth service
    auth:
      version: 1.1.0
      replicas: 1
      ports:
        - containerPort: 20295
# global cluster configuration
cluster:
  # cluster domain entry point (external access to the cluster)
  # here uses a local domain that has to be defined in the /etc/hosts file and
  # that needs to use LoadBalancer (MetalLB) provided IP
  domain: mini.kube
  # enable Let's Encrypt automated certificate provisioning
  letsEncrypt: false
  # secrets to be created
  secrets:
    # declare app-secrets (no other reference to the name) that is an YAML file
    # to apply to the cluster
    # WARINING: you must provide this file
    - name: app-secrets
      file: ~/data/app-secrets.yaml
  # ingress to use nginx|traefik. Default nginx
  ingress: nginx
  # path for the kube config file. This allows you to address any Kubernetes cluster
  # WARNING: kubectl must be installed on your machine
  kubeConfigPath: ~/.kube/config

Secrets file (here ~/data/app-secrets.yaml) must be provided. It has to be similar to the following:

apiVersion: v1
kind: Secret
metadata:
  name: iiosecrets
type: Opaque
data:
  emailer_smtp_pass: <base64_string>
  mongodb_pwd: <base64_string>
  s3_access_key_id: <base64_string>
  s3_secret_access_key: <base64_string>

To deploy the full app:

...
# cd to app folder or use -w option to define working directory
cd myUberApp
iio app deploy

Delete exsiting deployment

# you must be in the app folder or use -w option to define working directory
iio app remove

Create a new Ignitial.io service from scratch

iio service create myUberService
...

Current Tags

  • 3.0.3                                ...           latest (6 months ago)

40 Versions

  • 3.0.3                                ...           6 months ago
  • 3.0.2                                ...           6 months ago
  • 3.0.1                                ...           7 months ago
  • 3.0.0                                ...           7 months ago
  • 2.9.0                                ...           7 months ago
  • 2.8.6                                ...           7 months ago
  • 2.8.5                                ...           7 months ago
  • 2.8.4                                ...           7 months ago
  • 2.8.3                                ...           7 months ago
  • 2.8.2                                ...           7 months ago
  • 2.8.1                                ...           7 months ago
  • 2.8.0                                ...           7 months ago
  • 2.7.2                                ...           8 months ago
  • 2.7.1                                ...           8 months ago
  • 2.7.0                                ...           8 months ago
  • 2.6.1                                ...           8 months ago
  • 2.6.0                                ...           8 months ago
  • 2.5.0                                ...           9 months ago
  • 2.4.1                                ...           9 months ago
  • 2.4.0                                ...           a year ago
  • 2.3.3                                ...           a year ago
  • 2.3.2                                ...           a year ago
  • 2.3.1                                ...           a year ago
  • 2.3.0                                ...           a year ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 1.1.7                                ...           a year ago
  • 1.1.6                                ...           a year ago
  • 1.1.5                                ...           a year ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 40
Last Month 41
Dependencies (15)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |