Giter Club home page Giter Club logo

cli's Introduction

Atomix CLI

This project provides a CLI for Atomix 4.

Atomix CLI

To install the CLI, run:

> go get -u github.com/atomix/cli/cmd/atomix

Once the CLI has been installed, initialize the settings:

> atomix init
Created ~/.atomix/config.yaml

The configuration file created in your home directory is used by the CLI to connect to the Atomix controller, provide default namespaces and application names, etc. It's also used to store configuration changes made by the CLI.

To configure completion for the CLI, source the output of atomix completion with the desired shell argument:

source <(atomix completion bash)

The CLI can be used to deploy and connect to Atomix controllers. To deploy a Kubernetes controller, pipe the output of atomix controller k8s deploy to kubectl:

> atomix controller k8s deploy -s atomix-controller -n kube-system | kubectl apply -f -

To connect the CLI to an existing Kubernetes controller, use k8s connect:

> atomix controller k8s connect
atomix-controller.kube-system.svc.cluster.local:5679

For containerized environments like Kubernetes, a Docker image is provided. The image can be build by simply running:

> make
go build -o build/_output/bin/atomix ./cmd/cli
docker build . -f build/Dockerfile -t atomix/cli:latest
...

To use the CLI in Kubernetes, run the atomix/cli Docker image in a single pod deployment:

> kubectl run cli --rm -it --image atomix/cli:latest --image-pull-policy "IfNotPresent" --restart "Never"

This command will run the CLI image as a Deployment and log into the bash shell. Once you've joined the container, be sure to connect to the Atomix controller by running:

> atomix controller k8s connect
atomix-controller.kube-system.svc.cluster.local:5679

Once connected, you should be able to see the partition groups deployed in the Kubernetes cluster:

> atomix groups
...

Once the shell is exited, the Deployment will be deleted.

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.