Skip to main content

Ned Flanders Industries

Project description

TokkoCLI

Komm her, bleib hier, Wir sind gut zu dir

TOC

Como instalar la TokkoCLI?

La herramienta TokkoCLI debe ser instalada a nivel global usando cualquiera de las opciones de instalación que a continuación se presentan:

Mediante PIP:

sudo -H pip3 install tools/tokko-cli

O mediante el instalador:

sudo -H python3 tools/tokko-cli/setup.py install

Primeros pasos

Finalizada la instalación del paquete tokko-cli (Pip|Setup.py), tendras una nueva herramienta de consola llamada tokky. Lo primero que debemos hacer antes de comenzar a utilizar nuestra CLI es inicializarla, para ello vamos a ejecutar el siguiente comando:

# No require permisos de super usuario.
# Y no, no es buena idea ...
tokky user init [--user]

Este comando mostrara una salida similar a esta:

---
Welcome {YOUR-USER}!
Your CLI is ready to use!!

More Info:
+ Sources: /home/{your-user}/tokko/sources/services-tokkobroker
+ Github RefreshToken: r1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ Token Expiration: 2021-01-20T03:15:00.00000-03:00

Una vez inicializada la tokko-cli vamos a proceder a instalar el daemon la misma con el siguiente comando:

# Requiere permisos de super usuario.
sudo -H tokky daemon install

Y si todo salio bien, deberias tener una salida similar a esta:

Installing TokkoCLI daemon ...
TokkoCLI daemon was successfully installed

Ahora si! Ya esta todo listo para que empieces a utilizar tu tokko-cli,

Para continuar, no olvides revisar nuestra seccion de tutoriales

Secciones:

La tokkoCLI se encuentra dividida en cinco secciones, Auth, Daemon, Project, RPC y User.

Auth

Integracion con el TokkoAuthSDK. Este feature aun no se encuentra disponible en las versiones estables.

Daemon:

Proceso en background utilizado por la CLI para procesar las solucitudes del usario.

Install

Install tokkoCLI daemon as SystemD service.

$ sudo tokky daemon install

Correr deamon en Foregound

El daemon de la tokkoCLI tambien puede ser ejecutado en modo "attached".

$ tokky daemon run [--port {custom-port}]

Estado del Daemon

Obtener el estado actual del deaemon. Esta información tambien puede consultarse mediante SystemCtl.

$ tokky daemon status

La tokkoCLI y SystemCtl

El daemon de la tokkoCLI es un servicio SystemD, por tanto es fatible utilizar ``SystemCtl`

Chequear el estado del servicio
systemctl status tokko-cli-daemon.service
Activar el servicio TokkoCLI.daemon
systemctl Enable tokko-cli-daemon.service
Iniciar el servicio TokkoCLI.daemon
systemctl start tokko-cli-daemon.service

Detener es servicio TokkoCLI.daemon

systemctl stop tokko-cli-daemon.service

Desinstalar el Daemon

Desistala el proceso de la tokkoCLI.

$ tokky daemon uninstall

User

Manejo de la cuenta de usuario dentro de la tokkoCLI

Inicializar usuario de la TokkoCLI

tokky user init

RPC

Integracion TokkoRPC. LLamados a procedimientos remotos dentro del cloud de servicios.

Invocando funciones RPC

tokky rpc call {function} [--service {my-serice: String}] [--data {data: String}]

Ejemplo: Invocando a la funcion Echo:

$ tokky rpc call echo --data "Hola Mundo!"
>>> "Hola Mundo!"

Project

Herramientas para la gestion de projectos dentro del stack de servicios de TokkoBroker

Listar los servicios

tokky project ls [--details|-d]

Crear un nuevo Servicio:

Crear un nuevo Project(Servicio) utilizando los templates de Tokko. Por omision este comando creara proyectos basados en el template django, pero en caso de que quieras utilizar el template flask solo debes anexar el flag --flask

# No requiere permisos de super usuario
tokky project new {nombre-del-projecto} [--flask]

Exportar Servicio

# No requiere permisos de super usuario
tokky project export {nombre-del-projecto}

Sicronizar stack de sevicios

# No requiere permisos de super usuario
tokky project sync

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokko_cli-0.0.2.7.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokko_cli-0.0.2.7-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file tokko_cli-0.0.2.7.tar.gz.

File metadata

  • Download URL: tokko_cli-0.0.2.7.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for tokko_cli-0.0.2.7.tar.gz
Algorithm Hash digest
SHA256 5e3ef35e07d380f50d54fb03f09a79fc86fdf3c422b8faad8b779195e8ffa258
MD5 e25e950c588cb6460aad6c4f910fd6d7
BLAKE2b-256 7cd5d0f8878a662933459b1fdabdec18ecfb39bd71454496528682a64b587959

See more details on using hashes here.

File details

Details for the file tokko_cli-0.0.2.7-py3-none-any.whl.

File metadata

  • Download URL: tokko_cli-0.0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for tokko_cli-0.0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c9a070b8c075304369c8cc097610194b7aff7e6fa21ae37b1574bd69341de056
MD5 cd9dc0a43ccffd0217ba0fab28e1e8cc
BLAKE2b-256 4944946823516afedb81ae0639882eeb6253482a576496e91b3c1f4b07a98847

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page