GithubHelp home page GithubHelp logo

silipok / uffizzi_cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uffizzicloud/uffizzi_cli

0.0 0.0 0.0 24.89 MB

The command-line interface for the Uffizzi API

License: Apache License 2.0

Shell 0.82% Ruby 98.21% Makefile 0.64% Dockerfile 0.33%

uffizzi_cli's Introduction

Uffizzi CLI

A command-line interace (CLI) for Uffizzi App

Uffizzi Overview

Uffizzi is an open-source engine for creating lightweight, ephemeral test environments for APIs and full-stack applications. Uffizzi enables teams to preview new features before merging and to mitigate the risk of introducing regressions into a codebase. Each preview gets a shareable URL that's updated when you push new commits or image tags, so teams can provide continual feedback during the development/QA process. Previews can be configured to expire or be destroyed when a pull request is closed, so environments exist only as long as they are needed. Uffizzi also helps deconflict shared development environments since previews are deployed as isolated namespaces—there is no risk of clobbering another developer's preview.

While Uffizzi depends on Kubernetes, it does not require end-users to interface with Kubernetes directly. Instead, Uffizzi leverages Docker Compose as its configuration file format, so developers do not need modify Kubernetes manifests or even know about Kubernetes.

Uffizzi is designed to integrate with any CI/CD system.

Uffizzi Architecture

Uffizzi consists of the following components:

  • Uffizzi App - The primary REST API for creating and managing Previews
  • Uffizzi Controller - A smart proxy service that handles requests from Uffizzi App to the Kubernetes API
  • Uffizzi CLI (this repository) - A command-line interface for Uffizzi App

To host Uffizzi yourself, you will also need the following external dependencies:

  • Kubernetes (k8s) cluster
  • Postgres database
  • Redis cache

Installation

The Uffizzi CLI can be used interactively or as part of an automated workflow (e.g. GitHub Actions). Both options use the uffizzi/cli container image available on Docker Hub.

Interactive mode

Run the CLI as a Docker container in interactive mode:

docker run --interactive --rm --tty --entrypoint=sh uffizzi/cli

If you specify the following environment variables, the Docker image's entrypoint script can log you into Uffizzi before executing your command.

  • UFFIZZI_USER
  • UFFIZZI_SERVER
  • UFFIZZI_PASSWORD
  • UFFIZZI_PROJECT (optional)

Automated mode

If you want to use Uffizzi as part of an automated workflow, you can pass the Uffizzi commands to the Docker run command. For example:

docker run -it --rm uffizzi/cli project list

Sample commands and examples

help

The help subcommand can be used to see more information about a particular command.

Examples:

uffizzi help
uffizzi preview help
uffizzi project compose help

login

uffizzi login --server=localhost:8080 [email protected]

Log in to the app with the specified server.

login options

Option Aliase Description
--username -u Your email for logging in
--server The URL of the Uffizzi installation

If server uses basic authentication you can specify options for it by setting basic_auth_user and basic_auth_password via config set command.

config

Use this command to configure your cli app.

$ uffizzi config

Launching interactive setup guide that sets the values for server, username and project

config subcommands

This command has 4 subcommands list, get, set, and delete.

uffizzi config list

Shows all options and their values from the config file.

uffizzi config get-value OPTION

Shows the value of the specified option.

uffizzi config set OPTION VALUE

Sets specified value for specified option. If a specified option already exists and has value it will be overwritten.

uffizzi config unset OPTION

Unsets specified option.

project

uffizzi project

Use this command to configure your projects. This command has 2 subcommands list and compose.

uffizzi project list

Shows all your projects' slugs

If you have only one project it will be added to your config file automatically, if there's more than one project you need to set up your project manually with the commands uffizzi config set YOUR_PROJECT_SLUG or uffizzi project set-default YOUR_PROJECT_SLUG

$ uffizzi project set-default PROJECT_SLUG

Create a preview from a compose file.

Sets the default project given with the given project slug. When set, all commands use this project as the default context unless overridden by the --project flag.

preview

Create and manage previews

uffizzi preview create docker-compose.uffizzi.yml

Create a preview from a compose file.

uffizzi preview delete deployment-21

Delete a preview with preview ID deployment-21.

disconnect

uffizzi disconnect CREDENTIAL_TYPE

Deletes credential of specified type

Supported credential types - docker-hub, acr, ecr, gcr

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/UffizziCloud/uffizzi_cli. See CONTRIBUTING.md in this repository.

License

This project is licensed under the terms of the Apache-2.0 license.

See this license at LICENSE.

uffizzi_cli's People

Contributors

moklidia avatar 7r41n33 avatar the38th avatar zipofar avatar antlu avatar axisofentropy avatar lidiamokevnina avatar gadkins avatar krasnobay avatar greenfrontend avatar jpthurman avatar jessikacastellano avatar sergeykirillovdb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.